Word Frequency Analysis (word_freq)
This calculator analyzes word frequency in a text or URL, showing top words and their occurrence percentages.
Word Frequency Analysis
Purpose
The Word Frequency Analysis function helps you analyze the frequency of words in a given text. It provides insights into the most commonly used single and double words along with their frequency percentages.
Use Cases
- Analyzing the frequency of words in a piece of text
- Identifying the most commonly used single and double words
- Understanding the distribution of word frequencies in the text
How to Use
- Enter the text you want to analyze in the Text field.
- Optionally, you can specify the number of top words to display in the Top field.
- Click on the Analyze button to see the results.
Input Values
- Text: Enter the text you want to analyze.
- Description: The text in which you want to analyze word frequencies.
- Top: Number of top words to display.
- Description: Number of most frequently occurring words to show in the results.
- Default: 20
Output Values
- Single Word Count: Total count of single words in the text.
- Double Word Count: Total count of double words (word pairs) in the text.
- Top Words: A table showing the top words along with their counts and frequency percentages.
Any other Instruction
- The results will provide insights into the frequency of single and double words in the text.
- You can use the information to understand the key words used and their distribution in the text.
Code Analysis
- The function counts the frequency of single words and double words in the input text.
- It calculates the percentage frequency of each word.
- The function then sorts and selects the top words based on their frequency.
- Finally, it returns the total count of single and double words, along with a table of the top words.
Technical Details
- Technical Parameter names: text, top
- Return Values: Single Word Count, Double Word Count, Top Words
Example Expressions
You can use the following expressions to directly evaluate in a non-interactive manner using eva():
word_freq('Hello world, hello!')
word_freq('Lorem ipsum dolor sit amet, consectetur adipiscing elit.', top=10)
Click on Help icon to open the help page on a separate window.