{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/22"}],"enrichment":{"capability":"ahocorapy implements the Aho-Corasick algorithm in pure Python to search for multiple keywords in text or arbitrary sequences in linear time, supporting unicode and case-insensitive matching.","skillfed_tags":["string-matching","algorithm-implementation","pure-python"],"use_cases":["Scan large documents for a fixed set of names, terms, or patterns without installing compiled dependencies.","Perform word-level keyword matching by building a tree from token lists instead of character sequences.","Search binary data or custom symbol sequences (tuples, lists) using the same algorithm without string conversion.","Serialize and reuse large pre-built keyword trees across application restarts via pickling.","Find all overlapping keyword matches in a single pass through text, returning both matches and their positions."],"what_it_does":"ahocorapy is a pure-Python implementation of the Aho-Corasick algorithm designed to search for multiple keywords in text or arbitrary sequences with linear-time complexity. It was created to address gaps in existing libraries: it supports unicode in Python 2.7 without C extensions (making it platform-independent), and it uses suffix-shortcutting during setup to accelerate lookup times. The library works with any hashable symbols\u2014strings, tuples of integers, lists of tokens, or bytes\u2014making it flexible for character-level, word-level, or token-level matching.\n\nThe package trades setup time for faster search performance by precomputing state transitions and match positions. On sparse text it matches C-extension performance on CPython; on dense text (many overlapping matches) it remains slower than C extensions but faster than other pure-Python alternatives. It is fully pickleable using a non-recursive serialization strategy to handle large keyword trees, and it supports case-insensitive matching for string-based searches.","worth_installing":"Yes. ahocorapy is worth installing for multi-keyword search when you need a pure-Python, platform-independent solution with unicode support and no compiled dependencies. It is actively maintained, has no security vulnerabilities, carries a permissive MIT license, and performs competitively on typical (sparse) text. Install it if C extensions are unavailable or undesirable; if you are searching very dense text with many overlapping matches and latency is critical, a C-based alternative may be faster."},"id":"ahocorapy","links":{"html":"https://skillfed.io/packages/ahocorapy","md":"https://skillfed.io/packages/ahocorapy.md","pypi":"https://pypi.org/project/ahocorapy/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-21","license_spdx":null,"license_treatment":"permissive","name":"ahocorapy","python_support":"supports_current","summary":"ahocorapy - Pure python ahocorasick implementation"},"popularity":{"monthly_downloads":77375,"position":14530,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.8.0"}
