Awkwords is a simple online application that randomly generates words based on a given pattern. You can use it to make words for a constructed language, to get an original nickname, just for fun or whatever.
note: Awkwords the word generator has nothing to do with Awkwords the documentation markup language nor with the awk text processing language as such. The matching names are purely coincidental.
The most notable parts of the generator's interface are the parts labeled shortcuts and pattern. Shortcuts allow you to assign each capital letter something to generate. Everywhere you use one of them in the word pattern the content assigned to it will be used in that place. It's useful to put the language's sounds here.
There are several predefined groups of sounds - V for vowels, C for consonants, T for stops, F for fricatives, and N for nasals - with a few very common sounds filled in, but you can change these assignments to whatever you desire.
A shortcut can be used also to represent syllable onset, coda and other clusters, or whatever. Simply make shortcuts you find useful when making the pattern. A shortcut can be thought of as a pattern that can be inserted into another patterns - that's right how it works. A shortcut can be used in other shortcuts as well. You can use everything the same way in the shortcuts as in the main word pattern - slashes, brackets, weighting, escaping. These will be discussed next.
The content of the field named pattern defines how the word will be formed. Lower case (small) letters represents these letters in the word, while capital letters are used as shortcuts (what each of them stand for is defined in the rows above). To write the structure, there are these characters:
/ Slashes divide the text into options, from which one is randomly chosen.
tu/top/kan generates either tu, top, or kan
By default, all of them have the same chance of being chosen. This can be changed by giving each option a weight.
[ ] What's inside square brackets is treated as a single unit.
s[tu/top/kan] generates either stu, stop or skan
( ) Round brackets work the same way as square brackets, the only difference is that what's inside them can either appear in the word or not. Both variants are equally probable.
s(tu/top/kan) renders a word that always begins with s and in half of
the cases continues with either of tu, top, or kan - so the possible results are:
s, stu, stop, skan
Brackets can be unlimitedly nested one into another.
at(a(z)) in half of the cases renders only at.
In the other half, the result can be equally probably ata or ataz. atz is impossible
because the block
(z) is inside requires
a to be rendered.
Weight is a number that multiplies the chance of being chosen of the option it applies to. Weight is written after an asterisk in the option it applies to.
This generates a, c, or d each with the same probability. Compared to each of these, the probability of generating b is three times higher and for kek six times higher (that means, kek is twice as probable as b). That's because b has weight 3 and kek has weight 6. Options without specified weight have weight 1. The number used as weight must be an integer between 1 and 128.
Double quotes ("these") have a special function: characters enclosed by them are simply put into the word, ignoring the meaning they would otherwise have for the generator. This way anything including capital letters, slashes, brackets, etc. can be generated.
heh"[mY/worD)]" generates literally heh[mY/worD)]
When using a pattern to generate words, you may want to somehow restrict it so that some combinations in certain places are forbidden. This is what filters can do. If a filter is set for some part of the pattern it is always checked whether what generated by that part of the pattern matches the filter. If it does the word is filtered out - it will not appear in the output.
Filters are defined by writing the
^ character right after the fragment of the pattern to be filtered
followed by the content to filter out: [pattern fragment]^filter .
Multiple filters can be set for the same fragment: [pattern fragment]^filter2^filter2^filter3 .
[VV]t[VV]^aa^ii^uu (let V be a shortcut for [a/i/u])
In this example, the first
[VV] yield any of all the nine combinations - for any of the three letters
for the first V there may appear any of them for the second V. Thus the possibilities are:
aa, ai, au, ia, ii, iu, ua, ui, uu .
For the second [VV], there are three filters applied: these exclude cases when the [VV] yields aa, ii, oruu, i.e. when the letters happen to be the same. Thus, just ai, au, ia, iu, ua, ui are accepted results.
When everything is set up, click the Generate button to generate the words. There are several adjustments:
After the words are generated, some statistics are shown below them. These tell how many words were printed to the output, how many words were filtered out, how much time it took, and how many possible ways the pattern can render. Note that the number of actually different words possible to get with the pattern may be actually lower because of there being more ways to get the same word.
By clicking the Save... button you get a file with the current settings of Awkwords. Save this file to your disk. Next time when you need these settings again, click on Load > , select the file you want to load and click Load settings.
Awkwords 1.1 © Petr Mejzlík | e-mail: email@example.com ICQ: 331953665
Everyone is allowed to freely use and distribute this software. It can be incorporated into other software without any limitations. Modifying the software and distributing a modified version is allowed as long as the modified version is clearly marked distinct from the original one. This license is GNU LGPL compatible.
The complete source code of Awkwords is available here: awkwords-1.1.zip