Function Repository Resource:

 SpellingBeeSolve

Source Notebook

Find dictionary words for a Spelling Bee puzzle

Contributed by: Stevenzly00

ResourceFunction["SpellingBeeSolve"]["letters"]

finds words that contain the first letter in letters and use only letters from letters.

Details and Options

SpellingBeeSolve extracts alphabetic characters from the input string and ignores spaces, punctuation and other non-letter characters.
The first extracted letter is the required center letter. All extracted letters, after duplicate removal, form the allowed letter set.
By default, words are taken from DictionaryLookup, filtered, deduplicated and sorted first by length and then alphabetically.
If the input contains no letters, or if option values are invalid, SpellingBeeSolve returns a Failure object.
ResourceFunction["SpellingBeeSolve"] has the following options:
"MinimumLength"4positive integer minimum number of letters in returned words
"PangramsOnly"Falsewhether to return only words using every allowed letter at least once
"WordList"AutomaticAutomatic or a list of strings to search; Automatic uses DictionaryLookup
IgnoreCaseTruewhether to treat uppercase and lowercase letters as equivalent

Examples

Basic Examples (3) 

Solve a typical Spelling Bee puzzle, with the "a" being required:

In[1]:=
ResourceFunction["SpellingBeeSolve"]["abcdefg"]
Out[1]=

Find words from a small sample word list, where the "a" is required:

In[2]:=
ResourceFunction["SpellingBeeSolve"]["abcdefg", "WordList" -> {"face", "cafe", "bead", "feed", "aged", "badge", "caged"}]
Out[2]=

List only the longer solutions:

In[3]:=
ResourceFunction["SpellingBeeSolve"]["abcdefg", "MinimumLength" -> 6]
Out[3]=

Scope (3) 

Non-letter characters are ignored before choosing the center letter and allowed letters:

In[4]:=
ResourceFunction["SpellingBeeSolve"]["a-b c!d?e f.g", "WordList" -> {"face", "cafe", "feed", "badge", "caged"}]
Out[4]=

Count the number of candidate words for a puzzle:

In[5]:=
Length @ ResourceFunction["SpellingBeeSolve"]["abcdefg", "WordList" -> {"aged", "bead", "cafe", "face", "badge", "caged"}]
Out[5]=

Make a picture of a sample puzzle:

In[6]:=
hex[c_] := Polygon[(c + {Cos[#], Sin[#]}) & /@ (Range[0, 5] Pi/3)];
outer = {{0, Sqrt[3]}, {3/2, Sqrt[3]/2}, {3/2, -Sqrt[3]/2}, {0, -Sqrt[3]}, {-3/2, -Sqrt[3]/
     2}, {-3/2, Sqrt[3]/2}};
Graphics[{EdgeForm[{White, AbsoluteThickness[4]}], GrayLevel[.9], hex /@ outer, RGBColor[1, .85, .05], hex[{0, 0}], MapThread[
   Text[Style[#1, 24, Bold, Black], #2] &, {{"I", "P", "E", "A", "C", "T"}, outer}], Black, Text[Style["H", 24, Bold], {0, 0}]}, PlotRange -> 2.7, ImageSize -> 300, Background -> White]
Out[8]=

Solve the puzzle:

In[9]:=
ResourceFunction["SpellingBeeSolve"]["hipetca"]
Out[9]=

Options (2) 

Use "MinimumLength" to include shorter words:

In[10]:=
ResourceFunction["SpellingBeeSolve"]["abcdefg", "MinimumLength" -> 3, "WordList" -> {"bad", "cab", "ace", "fed", "face"}]
Out[10]=

Use "PangramsOnly" to keep only words that use every allowed letter:

In[11]:=
ResourceFunction["SpellingBeeSolve"]["retails", "PangramsOnly" -> True]
Out[11]=

Properties and Relations (1) 

The first extracted letter is always required:

In[12]:=
ResourceFunction["SpellingBeeSolve"]["bcdefga"]
Out[12]=

Possible Issues (2) 

Inputs with no letters return a Failure object:

In[13]:=
ResourceFunction["SpellingBeeSolve"]["123"]
Out[13]=

Results depend on the dictionary or word list used:

In[14]:=
ResourceFunction["SpellingBeeSolve"]["abcdefg", "WordList" -> {"cafe", "cafes", "face"}]
Out[14]=

Neat Examples (1) 

Group candidate words by length:

In[15]:=
GroupBy[ResourceFunction["SpellingBeeSolve"]["aeiolns"], StringLength]
Out[15]=

Publisher

Stevenzly00

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.0.0 – 15 June 2026

Source Metadata

Related Resources

Author Notes

SpellingBeeSolve is intended as a lightweight helper for Spelling Bee-style word puzzles. It does not implement any official scoring system and does not claim to reproduce any particular puzzle publisher's word list.

License Information