Werds (werds v1.0.0)
A module to generate valid word variants from a base word.
Summary
Functions
Check that the number of letters in the candidate word are less than or equal to the number of letters in the word we used as a source
This takes a string mask like "...x.." and creates a string that can be turned into a regex for searching
Give us a list of words from the dictionary, using the letters from
source
, that conform to the match pattern. The match looks like
a "normal" regex, but when we have a . it matches the unused letters
from the source word
Functions
@spec check_word(Map, Map) :: true | false
Check that the number of letters in the candidate word are less than or equal to the number of letters in the word we used as a source
This takes a string mask like "...x.." and creates a string that can be turned into a regex for searching:
Say the word is "banana" and we want to see words that will match a pattern like "..ana", as in each . would match the unused characters from our source word. You would need /[ban][ban]ana/ - this method generates it.
Give us a list of words from the dictionary, using the letters from
source
, that conform to the match pattern. The match looks like
a "normal" regex, but when we have a . it matches the unused letters
from the source word