metadata1984 / pyAhocorasick

a pure python Aho-corasick algorithm implementation
MIT License
25 stars 27 forks source link

bug: wrong answer #2

Open soledada opened 8 years ago

soledada commented 8 years ago
ah = Ahocorasick()
ah.addWord("in morphine preservativ free")
ah.addWord("medicine")
ah.make()
all_the_text = "in medicine."
arraylist = ah.search(all_the_text)
print arraylist

ans: [(0, 10)]

right ans: (3,10)

yuanlisky commented 7 years ago

@soledada your ans should be: [(0, 10), (3, 10)]