5 deleted 33 characters in body
source | link

A full program that takes a single argument, the number of syllables required. I’ll post an explanation later.

A full program that takes a single argument, the number of syllables required. I’ll post an explanation later.

A full program that takes a single argument, the number of syllables required.

4 added 3823 characters in body
source | link

Explanation

The core of this is a 66-word compressed dictionary string. If the words are split into groups of consonants and vowels and the first 3 groups taken for each word, they generate the desired starting, vowel and end groups from the question. The exceptions are qu and squ because they have a vowel in, so these are added manually. The word list was built algorithmically from the Jelly dictionary using a Python script. Note some letter groups are repeated, but the question allows the outputs to not uniformly represent each possible combination. If this were preferred, it would be straightforward to make each group unique at the cost of two bytes (Q€).

Helper link 1: check whether more than 3 vowels in a row or more than 3 of the same letter in a row
                | Sample input: branggag
e€Øẹ            | For each letter, is it a vowel? [0, 0, 1, 0, 0, 0, 1, 0]
    Œr          | Run-length encode [[0, 2], [1, 1], [0, 3], [1, 1], [0, 1]]
      ḢƇ        | Filter only those with true first value, popping first value [[1], [1]]
        ,       | Pair with
         Œɠ     | Run lengths of input [[[1], [1]], [1, 1, 1, 1, 2, 1, 1]
           F    | Flatten [1, 1, 1, 1, 1, 1, 2, 1, 1]
            >2  | Greater than 2 [0, 0, 0, 0, 0, 0, 0, 0, 0]
              Ẹ | Any 0
Helper link 2: The three groups of strings
“yŒʠ...þEØ»                          | Compressed string: shmooze gaolbird hailshot shriech waeful furze ghaut cruelness stealthier gneiss shoeshine wheelchair wring build priorship knosp spoilfive karst through coalpit teschenite schoolkid theurgic zabtieh skiamachies yirth snazzier slimnastics scripted smirch droskies strift blepharism chaulmoogra glegness scarf fratch clerk brank jarvey flourless vorpal grex nard plumb larn philter sorbo tractabilities parcel mart damp rearm back bast bag bant baba boll bad bap becap basal ban bail bare
           Ḳ                         | Split at spaces
            µ        )               | For each word: e.g. hailshot
             e€Øẹ                    |   Check whether each character is a vowel [0, 1, 1, 0, 0, 0, 1, 0]
                 I                   | Increments of this [1, 0, -1, 0, 0, 1, -1]
                  k                  |   Split word at truthy values of this [h, ai, lsh, o, t]
                   ḣ3                |   Take the first three [h, ai, lsh]
                      Z              | Transpose (so now have three lists, start consonants, vowels, end consonants)
                        €        $1¦ | For the first group
                       ; “squ“qu”    | Append squ and qu
Main link
          µ³Ð¡                     | Repeat the following the input number of times, collecting results:
“ئµ£‘                             |   18, 5, 9, 2
      ḃ3$                          |   bijective base 3: [1,2,3],[1,2],[2,3],[2]
         X                         |   Take one at random
              Ḋ                    | Remove first item (which will be the input to the link because if the way С works
               F                   | Flatten; we now have e.g. [1,2,3,2,3,1,2,3,2]. This corresponds to SC V EC V EC AC V EC V
                µ⁺    ¿            | Do everything so far once and then repeat while:
                  wØ2$             |   The output contains two twos (i.e. vowel-vowel)
                       ịÇ          | Look these up in the previous link, so we now have a group of letter groups for each position
                         X€F       | Pick a random letter group for each position
                            ß¹Ñ?   | If helper link 1 is true, retry the whole of this link again. Otherwise implicitly output

Explanation

The core of this is a 66-word compressed dictionary string. If the words are split into groups of consonants and vowels and the first 3 groups taken for each word, they generate the desired starting, vowel and end groups from the question. The exceptions are qu and squ because they have a vowel in, so these are added manually. The word list was built algorithmically from the Jelly dictionary using a Python script. Note some letter groups are repeated, but the question allows the outputs to not uniformly represent each possible combination. If this were preferred, it would be straightforward to make each group unique at the cost of two bytes (Q€).

Helper link 1: check whether more than 3 vowels in a row or more than 3 of the same letter in a row
                | Sample input: branggag
e€Øẹ            | For each letter, is it a vowel? [0, 0, 1, 0, 0, 0, 1, 0]
    Œr          | Run-length encode [[0, 2], [1, 1], [0, 3], [1, 1], [0, 1]]
      ḢƇ        | Filter only those with true first value, popping first value [[1], [1]]
        ,       | Pair with
         Œɠ     | Run lengths of input [[[1], [1]], [1, 1, 1, 1, 2, 1, 1]
           F    | Flatten [1, 1, 1, 1, 1, 1, 2, 1, 1]
            >2  | Greater than 2 [0, 0, 0, 0, 0, 0, 0, 0, 0]
              Ẹ | Any 0
Helper link 2: The three groups of strings
“yŒʠ...þEØ»                          | Compressed string: shmooze gaolbird hailshot shriech waeful furze ghaut cruelness stealthier gneiss shoeshine wheelchair wring build priorship knosp spoilfive karst through coalpit teschenite schoolkid theurgic zabtieh skiamachies yirth snazzier slimnastics scripted smirch droskies strift blepharism chaulmoogra glegness scarf fratch clerk brank jarvey flourless vorpal grex nard plumb larn philter sorbo tractabilities parcel mart damp rearm back bast bag bant baba boll bad bap becap basal ban bail bare
           Ḳ                         | Split at spaces
            µ        )               | For each word: e.g. hailshot
             e€Øẹ                    |   Check whether each character is a vowel [0, 1, 1, 0, 0, 0, 1, 0]
                 I                   | Increments of this [1, 0, -1, 0, 0, 1, -1]
                  k                  |   Split word at truthy values of this [h, ai, lsh, o, t]
                   ḣ3                |   Take the first three [h, ai, lsh]
                      Z              | Transpose (so now have three lists, start consonants, vowels, end consonants)
                        €        $1¦ | For the first group
                       ; “squ“qu”    | Append squ and qu
Main link
          µ³Ð¡                     | Repeat the following the input number of times, collecting results:
“ئµ£‘                             |   18, 5, 9, 2
      ḃ3$                          |   bijective base 3: [1,2,3],[1,2],[2,3],[2]
         X                         |   Take one at random
              Ḋ                    | Remove first item (which will be the input to the link because if the way С works
               F                   | Flatten; we now have e.g. [1,2,3,2,3,1,2,3,2]. This corresponds to SC V EC V EC AC V EC V
                µ⁺    ¿            | Do everything so far once and then repeat while:
                  wØ2$             |   The output contains two twos (i.e. vowel-vowel)
                       ịÇ          | Look these up in the previous link, so we now have a group of letter groups for each position
                         X€F       | Pick a random letter group for each position
                            ß¹Ñ?   | If helper link 1 is true, retry the whole of this link again. Otherwise implicitly output
3 added 734 characters in body
source | link

Jelly, 231 bytes

e€ØẹŒrḢƇ,ŒɠF>2Ẹ
“yŒʠT¬ḅɼṬɦṀUżGv¶æɲCĊQ>ṙȦẇɼṄ0IḤhDẋDċṀĊṪɗĖƇẊ;1JƒṾỊżỵhṖ8>Ȯ⁶]¦Qṭ|Ṛṇẹm⁵ØKƈBNɦÇȯ¢ṣḟPṇMʠ¬YėĊÇẒỊĿXJÑḷÞeȮȮɼ$ỴœeṂṠɲẓḊ⁺ċŻ⁽⁶Ẓ⁹<>#nẇṬ⁴\¤ÐṡḞF5ƙẇwḶȤYḍ¡¢~ṚⱮ-ṃƲ⁻Ṙ6ɱṬ?İẆḌỊþEØ»Ḳµe€ØẹIkḣ3)Z;€“squ“qu”$1¦
“ئµ£‘ḃ3$Xµ³Ð¡ḊFµ⁺wØ2$¿ịÇX€Fß¹Ñ?

e€ØẹŒrḢƇ,ŒɠF>2Ẹ “yŒʠT¬ḅɼṬɦṀUżGv¶æɲCĊQ>ṙȦẇɼṄ0IḤhDẋDċṀĊṪɗĖƇẊ;1JƒṾỊżỵhṖ8>Ȯ⁶]¦Qṭ|Ṛṇẹm⁵ØKƈBNɦÇȯ¢ṣḟPṇMʠ¬YėĊÇẒỊĿXJÑḷÞeȮȮɼ$ỴœeṂṠɲẓḊ⁺ċŻ⁽⁶Ẓ⁹<>#nẇṬ⁴\¤ÐṡḞF5ƙẇwḶȤYḍ¡¢~ṚⱮ-ṃƲ⁻Ṙ6ɱṬ?İẆḌỊþEØ»Ḳµe€ØẹIkḣ3)Z;€“squ“qu”$1¦ “ئµ£‘ḃ3$Xµ³Ð¡ḊFµ⁺wØ2$¿ịÇX€Fß¹Ñ?Try it online!

A full program that takes a single argument, the number of syllables required. I’ll post an explanation later.

e€ØẹŒrḢƇ,ŒɠF>2Ẹ “yŒʠT¬ḅɼṬɦṀUżGv¶æɲCĊQ>ṙȦẇɼṄ0IḤhDẋDċṀĊṪɗĖƇẊ;1JƒṾỊżỵhṖ8>Ȯ⁶]¦Qṭ|Ṛṇẹm⁵ØKƈBNɦÇȯ¢ṣḟPṇMʠ¬YėĊÇẒỊĿXJÑḷÞeȮȮɼ$ỴœeṂṠɲẓḊ⁺ċŻ⁽⁶Ẓ⁹<>#nẇṬ⁴\¤ÐṡḞF5ƙẇwḶȤYḍ¡¢~ṚⱮ-ṃƲ⁻Ṙ6ɱṬ?İẆḌỊþEØ»Ḳµe€ØẹIkḣ3)Z;€“squ“qu”$1¦ “ئµ£‘ḃ3$Xµ³Ð¡ḊFµ⁺wØ2$¿ịÇX€Fß¹Ñ?

A full program that takes a single argument, the number of syllables required. I’ll post an explanation later.

Jelly, 231 bytes

e€ØẹŒrḢƇ,ŒɠF>2Ẹ
“yŒʠT¬ḅɼṬɦṀUżGv¶æɲCĊQ>ṙȦẇɼṄ0IḤhDẋDċṀĊṪɗĖƇẊ;1JƒṾỊżỵhṖ8>Ȯ⁶]¦Qṭ|Ṛṇẹm⁵ØKƈBNɦÇȯ¢ṣḟPṇMʠ¬YėĊÇẒỊĿXJÑḷÞeȮȮɼ$ỴœeṂṠɲẓḊ⁺ċŻ⁽⁶Ẓ⁹<>#nẇṬ⁴\¤ÐṡḞF5ƙẇwḶȤYḍ¡¢~ṚⱮ-ṃƲ⁻Ṙ6ɱṬ?İẆḌỊþEØ»Ḳµe€ØẹIkḣ3)Z;€“squ“qu”$1¦
“ئµ£‘ḃ3$Xµ³Ð¡ḊFµ⁺wØ2$¿ịÇX€Fß¹Ñ?

Try it online!

A full program that takes a single argument, the number of syllables required. I’ll post an explanation later.

2 deleted 717 characters in body
source | link
1
source | link