N-gram Analyzer
Frequency analysis of unigrams, bigrams, trigrams, and custom n-grams. Useful for finding common phrases, keyword patterns, and content themes.
Install
pip install -r requirements.txtRun
python ngram_analyzer.py --url https://example.com/page --max-ngram 4 --top 30python ngram_analyzer.py --file content.txt --output ngrams.xlsxExport
Add --output report.xlsx to save results as a spreadsheet.
| Flag | Description |
|---|---|
--url | URL to analyze |
--file | Text/HTML file |
--text | Raw text |
--min-ngram | Min ngram (integer) |
--max-ngram | Max ngram (integer) |
--top | Top N per n-gram size. Default: 20 (integer) |
--keep-stopwords | Enable keep stopwords mode (flag, no value needed) |
--output | Save as XLSX |
python ngram_analyzer.py --helpRun across all your blog posts to score quality. Sort by score in the XLSX export, then prioritize rewrites for the lowest-scoring pages.
Before publishing freelance content, run this tool to check quality signals. Use specific metrics as concrete feedback for writers.
Include the analysis in your SEO audit report. Clients appreciate data-backed recommendations over subjective opinions.
Combine with other tools for a complete workflow:
Requires: beautifulsoup4, nltk, pandas, requests. All included in requirements.txt.
Get all 154 Python SEO tools — $49
One-time payment. Lifetime access. No monthly fees.
Learn 25 tools and get 25% back. Earn from client work and get 50% back.
AAIO Inc — aaioinc.com/tools/ngram_analyzer/