https://github.com/aboutcode-org/ahocode
https://github.com/aboutcode-org/ahocode
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aboutcode-org/ahocode
- Owner: aboutcode-org
- Created: 2023-06-05T16:30:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-30T04:02:05.000Z (over 1 year ago)
- Last Synced: 2025-10-04T22:45:51.157Z (3 months ago)
- Language: Python
- Size: 373 KB
- Stars: 0
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- Code of conduct: CODE_OF_CONDUCT.rst
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
ahocode
==================
This repo is a pure python implementation for `pyahocorasick `_, inspired by `abusix/ahocorapy `_.
Installation
-------------------
Requirements
###################
* Python 3.8 or later
.. code-block:: bash
pip install ahocode
Documentation
---------------------------
ahocode is a fallback library for pyahocorasick, so the ``Automaton`` class and its methods
have same names and parameters.
Below listed are the implemented classes and methods.
Classes
##########
* ``Automaton``
Methods for Automaton class
###############################
* ``add_word``
* ``get``
* ``clear``
* ``exists``
* ``find_all``
* ``items``
* ``make_automaton``
* ``iter``
* ``keys``
* ``values``
* ``__getstate__``
* ``__setstate__``
* ``__len__``
* ``__contains__``
For documentation please refer to: https://pyahocorasick.readthedocs.io/en/latest