Wolfram Research

Function Repository Resource:

PhoneNumberAnagrams

Source Notebook

Find English word replacements within a phone number

Contributed by: Bob Sandheinrich

ResourceFunction["PhoneNumberAnagrams"]["num"]

gives a list of equivalent phone numbers to "num" with digits replaced by English words.

Details and Options

The following standard US keypad rules are used:
2 abc
3 def
4 ghi
5 jklm
6 nop
7 qrs
8 tuv
9 wxyz
Any separators such as dashes and parentheses are maintained in the result as separators between possible words.
0 and 1 also separate words.
Phone numbers should be given as strings.

Examples

Basic Examples

Replace sections around punctuation:

In[1]:=
ResourceFunction["PhoneNumberAnagrams"]["1(800)965-3726"]
Out[1]=

Remove the dash to get more results:

In[2]:=
ResourceFunction["PhoneNumberAnagrams"]["1(800)9653726"]
Out[2]=

If you don't understand, call for help:

In[3]:=
Last[%]
Out[3]=

Possible Issues

Numbers without many zeros, ones or dashes can be slow to evaluate:

In[4]:=
AbsoluteTiming[ResourceFunction["PhoneNumberAnagrams"]["012-3456789"]]
Out[4]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

License Information