WojciechMula / pyahocorasick

Python module (C extension and plain python) implementing Aho-Corasick algorithm
BSD 3-Clause "New" or "Revised" License
937 stars 122 forks source link

iter_long appears to be missing #148

Closed lesshaste closed 3 years ago

lesshaste commented 3 years ago

In version 1.4.2 it seems iter_long is not there despite being in the documentation.

source_text = 'abc'
A = ahocorasick.Automaton()
for k in ['b', 'c', 'abd']:
    A.add_word(k, k)
A.make_automaton()

list(A.iter_long(source_text))

This gives:

AttributeError: 'ahocorasick.Automaton' object has no attribute 'iter_long'

lesshaste commented 3 years ago

Turns out the problem must be the version that conda installs on Windows. iter_long is there in 1.4.2 on linux.