match
Match tokenized words and phrases within the original, untokenized, often messy, text.
Decision gist · record as of 2026-08-14
Yes, if you need token-to-offset alignment and can tolerate an abandoned package. The core functionality is stable and no known vulnerabilities exist. However, consider maintenance risk: no updates since 2022-10-03, and any bugs in Unicode or edge-case handling will not be fixed. Suitable for one-off scripts or internal tools; risky for production systems requiring ongoing support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires nltk and regex as runtime dependencies; Python >= 3.8 required.
- High install friction: the package is abandoned (last release 2022-10-03, last commit 2023-04-11) and depends on nltk and regex, which add non-trivial setup overhead.
- No maintenance activity for an extended period.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions.
last release 2022-10-03 (1411 days) · last repo commit 2023-04-11 · 20 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,331,116 downloads/mo, #4,045 on PyPI
Alternatives
Verify before relying
pip install match
import match
result = match.match(original_text, ['token', 'sequence'])
# Returns: [(start_offset, end_offset, 'matched substring'), ...]- Whether nltk and regex versions have known incompatibilities or security issues affecting match's usability.
- Whether the abandoned status means critical bugs in Unicode or edge-case tokenization remain unfixed.
- Performance characteristics on very large texts or deeply nested tokenization structures.
What it is and what it does
Match is a utility for recovering the character offsets of tokenized words and phrases within their original, untokenized source text. Given a messy, whitespace-irregular, or Unicode-heavy source string and a sequence of tokens (or a single token), it returns all matching spans as (start, end, substring) tuples. This solves the alignment problem that arises when a tokenizer normalizes or splits text in ways that obscure the original character positions—essential for tasks like annotation, error correction, or mapping NLP pipeline outputs back to source documents.
The package handles common real-world messiness: irregular spacing, punctuation normalization (e.g., parentheses converted to -LRB- and -RRB-), and Unicode characters. It depends on nltk and regex for tokenization and pattern matching. The project is no longer actively maintained, with the last release in 2022-10-03 and no commits since 2023-04-11.
Use it for
- Recover source text spans for tokens output by an NLP tokenizer to annotate or highlight original text.
- Map named entity recognition or part-of-speech tags back to character offsets in messy source documents.
- Align corrected or normalized token sequences with their original positions for error analysis.
- Extract substring context around matched token sequences for debugging tokenization issues.
- Support document annotation workflows where token-level labels must be converted to character offsets.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need token-to-offset alignment and can tolerate an abandoned package.
The core functionality is stable and no known vulnerabilities exist. However, consider maintenance risk: no updates since 2022-10-03, and any bugs in Unicode or edge-case handling will not be fixed. Suitable for one-off scripts or internal tools; risky for production systems requiring ongoing support.
Install
match on PyPI
Before you install
High install friction: the package is abandoned (last release 2022-10-03, last commit 2023-04-11) and depends on nltk and regex, which add non-trivial setup overhead. No maintenance activity for an extended period.
Requires nltk and regex as runtime dependencies; Python >= 3.8 required.
License in practice
Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install match
import match
result = match.match(original_text, ['token', 'sequence'])
# Returns: [(start_offset, end_offset, 'matched substring'), ...]
Verify before relying
- Whether nltk and regex versions have known incompatibilities or security issues affecting match's usability.
- Whether the abandoned status means critical bugs in Unicode or edge-case tokenization remain unfixed.
- Performance characteristics on very large texts or deeply nested tokenization structures.
Package facts
| License | permissive license permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,411 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,331,116 / month, #4,045 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Text Processing |
Evidence: match-0.3.2.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 › “token to character offset mapping”
- matchMaps tokenized words and phrases back to their character offsets in…
- sentencepieceSentencePiece is an unsupervised text tokenizer and detokenizer that…
- silpa_commonProvides common utility functions for SILPA, including character…
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 tensorflow-text · confusables · segments · normality · tokenizer · uniseg · sacremoses · pyuca · tokenize-rt