I came across some spurious matches on my data. I've whittled down the text to reproduce, so here's a minimal example:
from suffix_trees.STree import STree
text = "name language w en url http w namelanguage en url http"
stree = STree(text)
print "STree finds 'law' at index:", stree.find_all('law')
print "'law' in text -->", 'law' in text
which outputs
STree finds 'law' at index: [5]
'law' in text --> False
I came across some spurious matches on my data. I've whittled down the text to reproduce, so here's a minimal example:
which outputs