Pattern consists of ordinary text and tokens that will be replaced during generation
ordinary [token] text
Each token consists of two parts:
wm- Word mode (optional)ps- Part of Speech
and looks like this: [wm ps],
or this: [ps]
ps can be one of four supported PoS'es:
verbadverbadjoradjectivenoun
By default, token will be replaced with random word of selected PoS
ps can also be followed by parentheses that contains a query for word lookup, then token will be replaced with random lookup result
Token examples:
[verb]
[adj(query)]
Word in terms of WordNet isn't just a single word, but possibly a group of words or a phrase. Word mode helps to handle situations, where you need exactly one word in place of token.
This is an example phrase, or a WordNet word that will be used to provide examples in mode list below:
golden fairy lantern
So, the actual word modes (wm) list:
- First Word
fw:golden - Last Word
lw:lantern - Random Word
rw: any ofgolden,fairyorlantern - Separator
sep(-):golden-fairy-lantern
fw and lw selects first or last word of a phrase accordingly, rw just selects random word from a phrase, and sep replaces space with separator provided in parentheses followed by it
Token examples:
[rw noun]
[lw adverb]
[fw noun(grass)]
[sep(_) noun]
[sep(-) verb]
[sep(::) adj(ironic)]