Daniel Yoo wrote:
John Machin <[EMAIL PROTECTED]> wrote:
: tree.search("I went to alpha beta the other day to pick up some spam")
: could use a startpos (default=0) argument for efficiently restarting
: the search after finding the first match
Ok, that's easy to fix. I'll do that tonight.
I have a (very high speed) modified Aho-Corasick machine that I sell.
The calling model that I found works well is:
def chases(self, sourcestream, ...):
'''A generator taking a generator of source blocks,
yielding (matches, position) pairs where position is an
offset within the "current" block.
'''
You might consider taking a look at providing that form.
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list