Crossword, Scrabble and Anagram Solver

Provides a large English words list and tools to find words by patterns. In particular, anagram finder and scrabble word finder.


wfindr

This package provides a large English words list and tools to find words by patterns. In particular, anagram finder and scrabble word finder.

devtools::install_github("idmn/wfindr")

Describe a pattern that a word should match by marking unknown letters.

  • Unknown letter is denoted by dot ".".
  • Dot may be followed by regex {...} repetition quantifier. Namely, .{n} means exactly n unknown letters, .{n,} - n or more, .{n, m} - from n to m.
  • Asterisk * denotes unknown number of unknown letters.

Then pass this pattern to a find_word function. Examples:

#> words starting with "aa"
find_word("aa*")
#> 4-letter words stating with "w" and ending with "d"
find_word("w..d")
#> 30 or more letter words
find_word(".{30,}")

You can also specify letters that you don't want to be used to fill the gaps with ban argument.

find_word("w..d", ban = "oe")

Or you can determine the list of letters to be used with allow argument.

find_word("w..d", allow = "oe")

To find words that can be constructed from the specified set of letters, use scrabble function

#> words constructed from the "thing" word's letters
scrabble("thing")

This function is actually built on top of the find_word function. To give you an idea, the previous call is equivalent to this:

find_word(allow = "thing", type = "scrabble")

It is also possible to specify a pattern in scrabble, as it was in find_word. For, example, to get at least 4-letter words:

scrabble("thing", ".{4,}")

To find anagrams, use anagram function.

anagram("thing")

This function is also built on top of find_word and the previous call is equivalent to

find_word(allow = "thing", type = "anagram")

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("wfindr")

0.1.0 by Iaroslav Domin, a year ago


https://github.com/idmn/wfindr


Report a bug at https://github.com/idmn/wfindr/issues


Browse source code at https://github.com/cran/wfindr


Authors: Iaroslav Domin [aut, cre]


Documentation:   PDF Manual  


GPL-2 license


Imports dplyr, magrittr


See at CRAN