ARCHIVES
TurboText: A Boundary-Aware Fuzzy Keyword Extraction and Replacement Library with Configurable Conflict Resolution
Published Online: May-August 2026
Pages: 911-919
Cite this article
↗ https://www.doi.org/10.59256/indjcst.20260502099Abstract
Multi-keyword extraction from large text corpora is constantly observed in information retrieval, entity normalization, and controlled-vocabulary tagging. FlashText is the library most people reach for here — it gives O(N) extraction no matter how big the dictionary gets — but it has three gaps that get in the way in practice: fuzzy matching is not really usable at scale, overlap resolution is hardcoded to one greedy policy, and keyword metadata corrupts the replacement output. TurboText is a Python library built to close these three gaps, and is open-source and available on PyPI. The matching engine runs a bounded-edit frontier search, essentially a Levenshtein-aware trie walk that collapses back to a plain trie walk when the edit budget is zero, so exact and fuzzy matching are the same code path rather than two separate implementations. Both are Cython-compiled: exact matching goes through a packed transition-table automaton (FlatAC), and fuzzy matching keeps the frontier as flat array lists with cached child-char codes instead of a Python dictionary. A separate resolution layer sits on top and offers five overlap policies, including OPTIMAL_WEIGHTED, which uses weighted interval scheduling to select the provably best non-overlapping match set rather than a greedy one. At k=0, the Cython path is 1.5× faster than FlashText on a 1-million-word corpus. At k=1, TurboText is 8.8× faster than RapidFuzz, 41× faster than python-Levenshtein, and well over 160× faster than FuzzyWuzzy and jellyfish at 5,000 keywords. None of these comparison libraries return a character span or check a word boundary; they simply score a pair of strings and leave the rest to the caller. TurboText 0.3.0 is available at https://github.com/nishankmahore/TurboText under the MIT license.
Related Articles
2026
Artificial Intelligence in Learning and Teaching
2026
Admin Assist: An AI – Driven Configuration and Orchestration for Enterprise Application
2026
Enhancing Blood Group Identification using pigeon inspired optimization: An Innovative Approach
2026
Eco-Genius: Power Up Smart, Power Down Waste
2026
Crowd-Sourced Disaster Response and Rescue Assistant
2026
Unveiling Deepfake Detection Using Vision Transformers: A Survey and Experimental Study
Share Article
Or copy link
*Instagram doesn't support direct link sharing from web. Copy the link and share it in your Instagram story or post.