Letter Frequency
letter_frequencyAnalyze character frequency distribution in text. Return sorted counts, most and least common characters, with customizable options for case, spaces, punctuation, and letters only.
Instructions
Get frequency distribution of all characters in text.
Provides a complete breakdown of character frequencies.
Args:
text (string): The text to analyze
case_sensitive (boolean): Distinguish upper/lowercase (default: false)
include_spaces (boolean): Include spaces in count (default: false)
include_punctuation (boolean): Include punctuation (default: false)
letters_only (boolean): Only count a-z letters (default: true)
Returns: Frequency map, sorted list, most/least common characters.
Example: letter_frequency("hello") → h: 1, e: 1, l: 2, o: 1
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to analyze | |
| letters_only | No | Only count a-z letters | |
| case_sensitive | No | Distinguish upper/lowercase | |
| include_spaces | No | Include spaces | |
| include_punctuation | No | Include punctuation |