Phrase frequency counters
How phrase frequency counters tokenize and count word sequences, which settings change the results, and when styled or transformed text skews the counts.
A phrase counter reports how often word sequences appear in a text. Examples include two-word pairs (bigrams), three-word runs (trigrams) or longer fixed phrases. Writers use these tools to spot repetitive wording, editors use them to check keyword density, and researchers use them for quick corpus exploration. This review explains what such a tool does to your text, which settings decide the numbers you see, and where the results stop being trustworthy. No specific product was tested for this article, so the points below describe general mechanisms rather than the behavior of any named tool.
Is a phrase frequency counter suitable for your use?
A phrase frequency counter is a good fit when you need a fast, repeatable view of which word sequences recur in ordinary prose. This applies to drafts, transcripts, product descriptions and survey answers written in a language that separates words with spaces. Its main benefit is that it surfaces repetition you would miss by reading.
The decisive tradeoff is that the counts reflect the tool's rules, not the meaning of the text. Each of these choices can change the totals: case handling, punctuation handling, sentence boundaries, contractions and Unicode normalization. Two tools can return different numbers for the same passage. Neither is wrong. They simply define a word and a phrase differently.
Plain, unstyled source text is preferable whenever accurate counts matter. Do not run the counter on text that has been reversed, mirrored, or converted into decorative Unicode letters. Restore or retype the plain version first, because a counter cannot recognize those transformed forms as the words they imitate.
What the tool actually changes
A phrase counter usually does not change your stored text at all. It reads the input, builds a temporary working copy and outputs a derived list of phrases with counts. The terms 'reverse', 'mirror' and 'font' do not apply here. Nothing is flipped, and no glyphs are swapped or restyled. Any changes happen only inside that working copy, in a few common steps.
- Normalization: may fold case so 'The' and 'the' match, and may unify equivalent Unicode forms.
- Tokenization: splits the text into words, deciding how to treat punctuation, hyphens, apostrophes, numbers and symbols.
- Segmentation: may split the text into sentences so that phrases do not run across a full stop.
- N-gram extraction: slides a window of a chosen length across the tokens and records every sequence it sees, usually counting overlapping windows.
- Filtering: may drop stopwords, very short tokens or phrases below a minimum frequency, and may apply stemming or lemmatization so 'counting' and 'counted' merge.
Here is a small worked example. Take 'The cat sat on the mat. The cat slept.' With case folding and punctuation removed, the tokens are: the, cat, sat, on, the, mat, the, cat, slept. The word 'the' appears three times. If phrases may not cross sentence boundaries, the bigrams are: the cat, cat sat, sat on, on the, the mat, the cat, cat slept. That gives 'the cat' a count of two and every other pair a count of one. If the tool ignores sentence boundaries, it adds an extra pair, 'mat the', which is an artifact rather than a real phrase. Without case folding, 'The cat' and 'the cat' would land in separate rows.
| Setting | Typical effect on counts |
| Case folding on | Merges capitalized and lowercase forms of the same phrase |
| Case folding off | Splits sentence-initial phrases from the same phrase mid-sentence |
| Sentence boundaries respected | Avoids phrases spanning a full stop; may miss phrases split by abbreviations such as 'Dr.' |
| Stopwords removed | Hides function words, so 'on the mat' may collapse to 'mat' or vanish as a phrase |
| Stemming or lemmatization | Merges inflected forms; can also merge words with different meanings |
| Minimum frequency threshold | Shortens the list; can hide phrases that matter but appear only once |
| Unicode normalization | Lets visually identical or compatibility forms count as one word |
For sensitive material, or when you want full control over these rules, a short local script avoids uploading text anywhere. The Python example below folds case, applies compatibility normalization, unifies the curly apostrophe, splits on sentence-ending punctuation and counts overlapping n-grams. Its sentence splitting is deliberately naive and will break on abbreviations and decimal numbers.
import re
import unicodedata
from collections import Counter
def phrase_counts(text, n=2):
text = unicodedata.normalize("NFKC", text).casefold()
text = text.replace("\u2019", "'")
counts = Counter()
for sentence in re.split(r"[.!?]+", text):
words = re.findall(r"\w+(?:'\w+)*", sentence)
for i in range(len(words) - n + 1):
counts[" ".join(words[i:i + n])] += 1
return counts
print(phrase_counts("The cat sat on the mat. The cat slept.").most_common(3))
On the sample sentence, this script ranks 'the cat' first with a count of two, matching the hand count above. Its word pattern treats underscores and digits as word characters. It also does nothing for languages written without spaces between words.
Will the input and results stay usable after copying or sharing?
The bigger copy-and-paste risk sits on the input side. Text pasted from styled sources can look normal while containing characters a counter treats as different words. Common cases are listed below.
- Decorative 'font' text: generators that produce bold, italic or script lettering substitute mathematical alphanumeric symbols for ordinary letters. NFKC normalization maps many of these back to plain letters, but a counter that skips normalization will count them separately or fail to recognize them as words.
- Upside-down or mirrored text: these effects rely on look-alike characters from other scripts and symbol blocks. Normalization does not map them back, so the original phrases cannot be recovered by counting.
- Reversed text: reversing characters or word order produces different tokens and sequences, so phrase counts on reversed text describe the reversed string, not the original wording. Character-level reversal can also detach combining accents from their base letters and break emoji built from several code points.
- Curly versus straight apostrophes and quotes: 'don't' typed two ways can become two separate entries unless the tool unifies them.
- Composed versus decomposed accents: 'café' can be stored as one accented character or as a letter plus a combining mark; without normalization these may not match.
- Invisible characters: zero-width spaces and joiners, sometimes carried over from web pages or documents, can split one word into two or glue two words together.
- PDF extraction: pasted PDF text may contain hard line breaks, hyphenated line ends or ligature characters that alter tokenization.
Languages written without spaces between words, such as Chinese, Japanese and Thai, need a dedicated word segmenter. A counter that splits only on whitespace will treat long runs of characters as single words and produce meaningless phrase counts. Check a tool's documentation for explicit support before relying on it for these languages.
On the output side, a phrase list is plain words and numbers, so it generally copies cleanly into spreadsheets or documents. Prefer an export to a plain-text format such as CSV or a simple table over a screenshot or chart image. Assistive technology can read plain text and properly marked-up tables, but it cannot read a picture of a table without separate alternative text. How a specific tool's interface works with a particular screen reader was not tested here. Verify that with the tool's accessibility documentation or your own check in the environment you use.
Privacy and data handling
Many phrase counters run in a web page, and some send text to a server for processing. A clean design or a statement that the tool is 'free' or 'secure' says nothing reliable about whether text is stored, logged or shared. Read the tool's published privacy terms. For confidential drafts, client material or personal data, use an offline tool or a local script like the one above.
What this review could not confirm
No subject evidence was available for any particular phrase frequency counter. This review therefore cannot confirm several points: which tools apply Unicode normalization, how any named tool handles sentence boundaries or stopwords by default, any size limits or speed figures, any accessibility test results, or any data retention practices. Before choosing a tool, check these points against its documentation. A quick test also helps: paste a short passage you have counted by hand, including a capitalized phrase, a curly apostrophe and a sentence break, and see whether the results match.