You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
automaton = ahocorasick.Automaton()
input='π¨βπ¨βπ¦'
for c in input:
automaton.add_word(c, c)
automaton.add_word(input, input)
automaton.make_automaton()
for end_index, value in automaton.iter_long(input):
end_index += 1
start_index = end_index - len(value)
print('FOUND', start_index, end_index, value)
Response is:
FOUND 1 2 β
FOUND 3 4 β
FOUND 4 5 π¦
It should found one match: 0 5 π¨βπ¨βπ¦
The text was updated successfully, but these errors were encountered:
Response is:
It should found one match:
0 5 π¨βπ¨βπ¦
The text was updated successfully, but these errors were encountered: