flashtext
Extract/Replaces keywords in sentences.
Decision gist · record as of 2026-08-14
Yes, if you need fast keyword extraction or replacement on modern Python and can verify compatibility. The algorithm is sound and the library is widely used (2.5M+ monthly downloads), but the lack of updates since 2018 and high install friction (source build required) mean you should test it on your target Python version first. No known security vulnerabilities. Consider it a stable, specialized tool rather than an actively maintained package.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- No runtime dependencies, but package requires building from source during installation.
- Installation requires building from source (high friction).
- The package has not been updated since February 2018, though the repository remains active with recent commits as of April 2025.
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), which allows commercial and private use with minimal restrictions.
last release 2018-02-16 (3101 days) · last repo commit 2025-04-13 · 5,714 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,560,496 downloads/mo, #3,000 on PyPI
Alternatives
Verify before relying
from flashtext import KeywordProcessor
kp = KeywordProcessor()
kp.add_keyword('Big Apple', 'New York')
kp.add_keyword('Bay Area')
keywords_found = kp.extract_keywords('I love Big Apple and Bay Area.')
# Returns: ['New York', 'Bay Area']- Current Python 3 compatibility beyond the stated 3.5 and 3.6 support (classifiers are from 2018).
- Whether the package works reliably with modern Python versions given the age of the last release.
What it is and what it does
FlashText is a keyword extraction and replacement library that implements a specialized algorithm optimized for finding and replacing multiple keywords in text. Instead of using regex, it builds on Aho-Corasick and Trie data structures to achieve faster performance, especially when working with large keyword dictionaries or processing many documents. The library lets you add keywords with optional clean-name mappings, extract them from text with position information, or replace them with substitutes. It also supports case-sensitive matching, custom word boundaries, and bulk keyword operations via dictionaries or lists.
The package has no external runtime dependencies and works as a pure Python implementation. However, it requires compilation during installation and has not received updates since early 2018, though the repository remains accessible. The classifiers indicate support for Python 2.7, 3.5, and 3.6, but actual compatibility with modern Python versions is unclear.
Use it for
- Extract named entities or domain-specific terms from documents at scale faster than regex-based approaches.
- Replace product names, abbreviations, or aliases with canonical forms in bulk text processing pipelines.
- Build keyword-based text classification or tagging systems where you need to match many terms efficiently.
- Normalize variations of terms (e.g., 'Big Apple' → 'New York') across large document collections.
- Detect and extract keywords with associated metadata (e.g., category labels) from unstructured text.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need fast keyword extraction or replacement on modern Python and can verify compatibility.
The algorithm is sound and the library is widely used (2.5M+ monthly downloads), but the lack of updates since 2018 and high install friction (source build required) mean you should test it on your target Python version first. No known security vulnerabilities. Consider it a stable, specialized tool rather than an actively maintained package.
Install
flashtext on PyPI
Before you install
Installation requires building from source (high friction). The package has not been updated since February 2018, though the repository remains active with recent commits as of April 2025. Maintenance is aging but not abandoned.
No runtime dependencies, but package requires building from source during installation.
License in practice
Licensed under MIT (permissive), which allows commercial and private use with minimal restrictions.
Quickstart
from flashtext import KeywordProcessor
kp = KeywordProcessor()
kp.add_keyword('Big Apple', 'New York')
kp.add_keyword('Bay Area')
keywords_found = kp.extract_keywords('I love Big Apple and Bay Area.')
# Returns: ['New York', 'Bay Area']
Verify before relying
- Current Python 3 compatibility beyond the stated 3.5 and 3.6 support (classifiers are from 2018).
- Whether the package works reliably with modern Python versions given the age of the last release.
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Aging 3,101 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,560,496 / month, #3,000 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6 |
Evidence: flashtext-2.7.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “keyword replacement in sentences”
- flashtextExtracts or replaces keywords in text using the FlashText algorithm,…
- rake-nltkExtracts keywords and key phrases from text using the RAKE algorithm,…
- pytextrankPyTextRank implements graph-based TextRank and related algorithms as…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also textsearch · retrie · pyahocorasick · ahocorapy · ahocorasick-rs · keybert · textract · yake · textdistance