[Tutor] Searching through large number of string items

Kent Johnson kent37 at tds.net
Thu Apr 10 16:41:56 CEST 2008


Dinesh B Vadhia wrote:
> Ignore the 'adjacent items' remark.   The rest is correct ie. looking 
> for all strings containing a substring x.

Perhaps this would help:
http://hkn.eecs.berkeley.edu/~dyoo/python/suffix_trees/

A SubstringDict that maps each string to itself would do exactly what 
you want. I have no idea what the performance would be...

Kent


More information about the Tutor mailing list