Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate a random piece of text
| ResourceFunction["RandomText"][n] gives text containing n random words. | |
| ResourceFunction["RandomText"][n,type] gives text containing n instances of textual unit type, consisting of random words. | |
| ResourceFunction["RandomText"][] gives text containing 100 random words. | 
| "Word" | gives n words | 
| "Sentence" | gives n sentences | 
| "Paragraph" | gives n paragraphs | 
Generate text containing 15 random words:
| In[1]:= | ![ResourceFunction["RandomText"][15]](https://www.wolframcloud.com/obj/resourcesystem/images/b72/b72849e7-6789-4080-81a9-0ad149694d6a/6e1d646756504134.png) | 
| Out[1]= |  | 
Text containing 100 random words:
| In[2]:= | ![ResourceFunction["RandomText"][]](https://www.wolframcloud.com/obj/resourcesystem/images/b72/b72849e7-6789-4080-81a9-0ad149694d6a/2330651aba288eb4.png) | 
| Out[2]= |  | 
Generate text containing two sentences of random words:
| In[3]:= | ![ResourceFunction["RandomText"][2, "Sentence"]](https://www.wolframcloud.com/obj/resourcesystem/images/b72/b72849e7-6789-4080-81a9-0ad149694d6a/40c0bdd5e0ce0be2.png) | 
| Out[3]= |  | 
RandomText formats words into sentences and paragraphs if these types are specified:
| In[4]:= | ![ResourceFunction["RandomText"][2, "Paragraph"]](https://www.wolframcloud.com/obj/resourcesystem/images/b72/b72849e7-6789-4080-81a9-0ad149694d6a/42ce5b453239154c.png) | 
| Out[4]= |  | 
RandomText[n,"Word"] gives unformatted words:
| In[5]:= | ![ResourceFunction["RandomText"][200, "Word"]](https://www.wolframcloud.com/obj/resourcesystem/images/b72/b72849e7-6789-4080-81a9-0ad149694d6a/0a30b64e2fbcb99f.png) | 
| Out[5]= |  | 
Generate random German text:
| In[6]:= | ![ResourceFunction["RandomText"][20, Language -> "German"]](https://www.wolframcloud.com/obj/resourcesystem/images/b72/b72849e7-6789-4080-81a9-0ad149694d6a/7462d17214f026b4.png) | 
| Out[6]= |  | 
Language specification can also be "Language" entities:
| In[7]:= | ![ResourceFunction["RandomText"][20, Language -> Entity["Language", "Hindi"]]](https://www.wolframcloud.com/obj/resourcesystem/images/b72/b72849e7-6789-4080-81a9-0ad149694d6a/2f71928dca855600.png) | 
| Out[7]= |  | 
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License