{"categories":[{"label":"Linguistic","url":"https://skillfed.io/packages/category/text-processing-linguistic"}],"enrichment":{"capability":"wordfreq looks up word frequencies across over 40 languages from multiple corpus sources, returning frequencies as decimal values or on a logarithmic Zipf scale.","skillfed_tags":["nlp","multilingual","corpus-data"],"use_cases":["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."],"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.\n\nThe 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.","worth_installing":"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\u2014the package is not being enhanced, only kept functional. For lookup-only use cases, this is a solid choice."},"id":"wordfreq","links":{"html":"https://skillfed.io/packages/wordfreq","md":"https://skillfed.io/packages/wordfreq.md","pypi":"https://pypi.org/project/wordfreq/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2023-11-21","license_spdx":null,"license_treatment":"permissive","name":"wordfreq","python_support":"supports_current","summary":"Look up the frequencies of words in many languages, based on many sources of data."},"popularity":{"monthly_downloads":2306469,"position":3150,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"3.1.1"}
