text_word_frequency
Count how often each word appears in text and get a ranked frequency table with percentages. Options to ignore case, filter common words, set minimum length, sort by frequency or alphabetically, and limit results.
Instructions
Word Frequency Counter. Count how often each word appears in a block of text and return a ranked frequency table with per-word percentage and rank. Options let you fold case, drop common stop words, set a minimum word length, sort by frequency or alphabetically, and cap the number of rows returned. Use text_word_frequency when you only need a plain single-word frequency list with aggregate counts; use text_statistics for a full linguistic profile (readability scores, sentence and paragraph metrics) and word_counter for raw word, character, sentence, and paragraph totals without per-word breakdown. Runs locally on the text you provide: read-only, non-destructive, contacts no external service, and is rate-limited (60 requests/minute for anonymous callers). Returns the ranked results array plus summary statistics (total words processed, unique words, lexical diversity) and the effective options.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to analyze. Words are extracted as runs of letters and digits; punctuation is treated as a separator. Must not be blank. | |
| caseSensitive | No | When true, treat differing letter case as distinct words; when false, lowercase every word before counting. | |
| ignoreCommonWords | No | When true, exclude a built-in list of about 80 common English stop words (the, and, of, to, and similar) from the results. | |
| minWordLength | No | Minimum character length a word must have to be counted; values above 1 filter out shorter words. | |
| sortOrder | No | Result ordering: frequency sorts most-frequent first; alphabetical sorts words A to Z. | frequency |
| maxResults | No | Maximum number of word rows to return after sorting. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | Whether the analysis succeeded. | |
| results | No | Ranked word rows, ordered per sortOrder and capped at maxResults. | |
| statistics | No | Aggregate metrics for the processed text. | |
| options | No | The effective request options after defaults were applied. |