Function Repository Resource:

RandomPseudoSymbolName

Source Notebook

Generate a new symbol name in the spirit of the Wolfram Language

Contributed by: Bob Sandheinrich

ResourceFunction["RandomPseudoSymbolName"][]

creates a Wolfram-y symbol name.

ResourceFunction["RandomPseudoSymbolName"][n]

generates n symbol names.

Details and Options

The symbol name is returned as a string.
ResourceFunction["RandomPseudoSymbolName"] accepts the option "NameParts", which determines how many words should be included. The default value is RandomInteger[{1,4}].
The names are created using parts of existing Wolfram Language symbols weighted by how frequently they appear and positioned as they appear in the Wolfram Language.

Examples

Basic Examples (3) 

Create a new random symbol name that feels like it belongs in the Wolfram Language:

In[1]:=
ResourceFunction["RandomPseudoSymbolName"][]
Out[1]=

Create several names:

In[2]:=
ResourceFunction["RandomPseudoSymbolName"][10]
Out[2]=

Create and BirdSay a word cloud of names:

In[3]:=
ResourceFunction["BirdSay"][
 WordCloud[ResourceFunction["RandomPseudoSymbolName"][25]]]
Out[3]=

Options (2) 

Use the option "NameParts" to create only names with a single word:

In[4]:=
ResourceFunction["RandomPseudoSymbolName"][10, "NameParts" -> 1]
Out[4]=

Create an absurdly long name:

In[5]:=
ResourceFunction["RandomPseudoSymbolName"]["NameParts" -> 25]
Out[5]=

Properties and Relations (1) 

The results are never existing names:

In[6]:=
Intersection[Names["*"], ResourceFunction["RandomPseudoSymbolName"][1000]]
Out[6]=

Version History

  • 1.0.0 – 29 March 2021

Related Resources

Author Notes

I will submit a NetModel to the Neural Net repository that writes code for the randomly symbols... eventually ;)

License Information