The most bigram-plausible legal non-word at the smallest edit distance
Source:R/generation.R
make_pseudoword.RdSearches single-letter substitutions first, then two-letter substitutions; candidates are ranked by summed bigram frequency with a byte-order tie-break, so the choice is deterministic and identical across engines.
Arguments
- word
The base word to derive the pseudoword from.
- bigrams
Named integer vector of bigram counts, from
bigram_counts().- lexset
Environment used as a set of the real word forms a pseudoword must avoid.
- usedset
Environment used as a set of the pseudowords already taken.