wordninja
Probabilistically split concatenated words using NLP based on English Wikipedia uni-gram frequencies.
What it is and what it does
Word Ninja is a lightweight word segmentation library that splits concatenated English text into individual words using probabilistic modeling based on English Wikipedia uni-gram frequencies. It takes strings like 'imateapot' and returns ['im', 'a', 'teapot'], making it useful for humanizing database table names, reversing camelCase concatenations, or processing text where word boundaries have been lost. The library has no runtime dependencies and performs the segmentation quickly, handling both short strings and long passages. It also supports custom language models if you need non-English segmentation or want to override the default English model.
However, the package has been abandoned since 2019-08-10 with no updates since. Python version support is unspecified, and the license treatment is unclear, creating uncertainty about compatibility with modern Python releases and legal usage terms.
Use it for:
- Humanize database table or column names by splitting concatenated identifiers into readable words for display.
- Reverse camelCase or PascalCase strings back into space-separated words for logging or user-facing output.
- Process text where word boundaries have been removed or munged together, such as in legacy data formats.
- Build custom language models for word segmentation in non-English languages or specialized domains.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Splits concatenated words into their constituent parts using probabilistic English language modeling—for example, turning 'imateapot' into ['im', 'a', 'teapot'].
No. The package is abandoned (latest release 2019-08-10), Python version support is unspecified, the license is undeclared, and compatibility with modern Python is uncertain. For a simple, maintained alternative, consider other word segmentation libraries. If you have a specific legacy dependency on wordninja, verify the license terms from the repository and test thoroughly on your target Python version before deploying.
Install
wordninja on PyPI
pip
pip install wordninjauv
uv add wordninjapoetry
poetry add wordninjaInstalling wordninja
Before you install
High install friction: the package has been abandoned since its latest release on 2019-08-10 with no updates since. No runtime dependencies, but the stalled maintenance and lack of Python version specification create uncertainty about compatibility with current Python releases.
License in practice
License treatment is unclear—no SPDX identifier or raw license text is declared. Before using in production or distribution, verify the actual license terms from the GitHub repository to ensure compliance with your project's requirements.
Quickstart
pip install wordninja
import wordninja
wordninja.split('derekanderson')
# Returns: ['derek', 'anderson']
Python version support is unspecified; compatibility with modern Python versions is uncertain given the package's abandonment since 2019-08-10.
Verify before relying
- Whether the package works reliably on current Python versions, given no updates since 2019-08-10.
- Whether the bundled English language model remains accurate for modern English usage.
- Actual license terms and permissions (SPDX and raw license text are both absent from metadata).
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,561 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,163,884/month — #4,280 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: wordninja-2.0.0.tar.gz
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
jieba3kPerforms Chinese word segmentation, breaking…
unclear · top 15,000 on PyPI
jiebaJieba segments Chinese text into words using…
permissive · top 5,000 on PyPI
nagisaNagisa performs Japanese word segmentation and…
permissive · top 5,000 on PyPI
conlluParses CoNLL-U formatted text (a standard NLP…
unclear · top 15,000 on PyPI
english-wordsProvides curated sets of English words from…
permissive · top 15,000 on PyPI
wordsegmentSplits unsegmented English text into individual…
permissive · top 15,000 on PyPI
segtokSplits Indo-European text into sentences and…
permissive · top 15,000 on PyPI
wonderwordsGenerates random English words and sentences…
permissive · top 15,000 on PyPI
stop-wordsProvides curated stop-word lists for multiple…
permissive · top 15,000 on PyPI
sentence-streamSplits text streams into sentences even when…
permissive · top 15,000 on PyPI