| replace ( ) |
|
Replaces word in 'phrase' at index=idx with new
word of same Pos based on 'substitutionType'
|
| replaceAll ( ) |
|
Replaces as many words as possible in the phrase
according to pos and substitution-type constraints
starting from a random position in the phrase.
|
| replaceN ( ) |
|
Replaces up to n=maxSubstutions words in the phrase
according to pos and substitution-type constraints
starting from a random position in the phrase.
|
| replaceNOthers ( ) |
|
Replaces up to n=maxSubs tokens in the phrase according to substitution type and
pos based on the argument passed (does not mutate the argument String) Note:
this method is useful for implementing (internal) rhyme, alliteration, etc.
|
| replaceOther ( ) |
|
Replaces a single token in the phrase according to substitution type and pos
based on the argument passed (does not mutate the argument String) Note:
this method is useful for implementing (internal) rhyme, alliteration, etc.
|