Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get the frequency of letters appearing in texts
ResourceFunction["LetterFrequencyData"][] gives the frequency of letters appearing in English texts. | |
ResourceFunction["LetterFrequencyData"][lang] gives the frequency of letters for the language lang. | |
ResourceFunction["LetterFrequencyData"][All] gives the available languages. |
Ask for the frequency of the letters in English texts:
| In[1]:= |
| Out[1]= | ![]() |
Ask for the frequency of the letters in Spanish texts:
| In[2]:= |
| Out[2]= | ![]() |
Query the supported languages:
| In[3]:= |
| Out[3]= |
Let's compare with a sample text:
| In[4]:= | ![]() |
| Out[8]= | ![]() |
Find the top 3 guesses for which language Hamlet is written in, just based on the letter frequencies:
| In[9]:= | ![]() |
| Out[13]= |
This work is licensed under a Creative Commons Attribution 4.0 International License