wordfreq
Look up the frequencies of words in many languages, based on many sources of data.
What it is and what it does
wordfreq is a lookup library for word frequencies across over 40 languages, drawing from multiple corpus sources including Wikipedia, news, books, web text, Twitter, and Reddit. It provides two main query functions: word_frequency() returns a decimal frequency between 0 and 1, while zipf_frequency() returns a logarithmic scale where a Zipf value of 6 means the word appears once per thousand words. The library offers both 'small' wordlists (words appearing at least once per million words) and 'large' lists (once per 100 million words), with a 'best' default that uses large when available.
The package combines frequencies from multiple sources using a figure-skating-inspired method that discards outliers and averages the remainder, then rescales to preserve relative precision. It handles special cases like numbers (aggregating by digit shape and applying Benford's law for first-digit distribution) and supports Unicode text including non-Latin digit systems. Dependencies are lightweight: msgpack, langcodes, regex, ftfy, and locate. It runs on Python 3.8+ and has no known security vulnerabilities.
Use it for:
- Build spell-checkers or autocomplete systems that rank suggestions by word prevalence in a target language.
- Filter or weight text analysis results by word frequency to focus on meaningful rather than common words.
- Estimate language proficiency or corpus difficulty by analyzing the frequency distribution of words in a text.
- Train NLP models with frequency-weighted word embeddings or vocabulary pruning across multiple languages.
- Validate or debug tokenization and language detection by checking whether token frequencies match expected patterns.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
wordfreq looks up word frequencies across over 40 languages from multiple corpus sources, returning frequencies as decimal values or on a logarithmic Zipf scale.
Yes, if you need multilingual word frequency data. The package is stable, well-maintained at a dormant pace (last commit January 2025), has no security issues, and covers a broad range of languages with multiple corpus sources. Install friction is low. The main consideration is whether you need active development—the package is not being enhanced, only kept functional. For lookup-only use cases, this is a solid choice.
Install
wordfreq on PyPI
pip
pip install wordfrequv
uv add wordfreqpoetry
poetry add wordfreqInstalling wordfreq
Before you install
Low install friction with a pure-Python wheel distribution. Maintenance is dormant—last release was 2023-11-21 and the repository received its most recent commit on 2025-01-04, so the package is not actively developed but remains functional and receives occasional updates.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install wordfreq
from wordfreq import word_frequency, zipf_frequency
freq = word_frequency('cafe', 'en')
zipf = zipf_frequency('the', 'en')
Requires Python 3.8 or later. Chinese, Japanese, and Korean word frequencies require additional installation steps beyond the base package.
Verify before relying
- Whether the 'large' wordlists are automatically downloaded on first use or require manual setup.
- Memory footprint and load time for different language/wordlist combinations in production.
- How frequently the underlying corpus data is refreshed or updated.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.8,<4) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — msgpack, langcodes, regex, ftfy, locate |
| Maintenance | dormant — 997 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,306,469/month — #3,150 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: wordfreq-3.1.1-py3-none-any.whl
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
syllapyCounts syllables in English words, returning an…
permissive · top 5,000 on PyPI
wordcloudGenerates word cloud visualizations from text…
permissive · top 5,000 on PyPI
english-wordsProvides curated sets of English words from…
permissive · top 15,000 on PyPI
pyspellcheckerDetects misspelled words and suggests…
permissive · top 5,000 on PyPI
stop-wordsProvides curated stop-word lists for multiple…
permissive · top 15,000 on PyPI
num2wordsConverts numbers to their word representations…
copyleft · top 5,000 on PyPI
indic-numtowordsConverts non-negative integers to their word…
permissive · top 15,000 on PyPI
wordsegmentSplits unsegmented English text into individual…
permissive · top 15,000 on PyPI
stopwordsisoProvides stopword lists for multiple languages…
permissive · top 15,000 on PyPI
wnWn is a Python library for querying and…
permissive · top 15,000 on PyPI