File: automaton_iter.rst

package info (click to toggle)
python-pyahocorasick 1.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 748 kB
  • sloc: ansic: 4,554; python: 2,823; sh: 312; makefile: 242
file content (17 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
iter(string, [start, [end]], ignore_white_space=False)
----------------------------------------------------------------------

Perform the Aho-Corasick search procedure using the provided input string.

Return an iterator of tuples (``end_index``, ``value``) for keys found in
string where:

- ``end_index`` is the end index in the input string where a trie key
  string was found.
- ``value`` is the value associated with the found key string.

The ``start`` and ``end`` optional arguments can be used to limit the search
to an input string slice as in ``string[start:end]``.

The ``ignore_white_space`` optional arguments can be used to ignore white
spaces from input string.