acora
acora copied to clipboard
Building mildly deep automatons takes a long time
With this snippet and the latest 2.0, which creates an automaton with 1000 strings of 2000 characters each build() takes forever to complete, I eventually killed it:
>>> from array import array
>>> from acora import AcoraBuilder
>>> tks =[array('h', range(x, x+1000)).tostring() for x in range(1000)]
>>> builder = AcoraBuilder(*tks)
>>> ac=builder.build()
note this is a follow up on #6
FWIW, the building of an automaton in @WojciechMula 's https://github.com/WojciechMula/pyahocorasick/blob/master/py/pyahocorasick.py (not even the C implementation) is much much faster.