Travers Naran wrote:
> John Machin wrote:
>
>> 3. If you want to roll your own, start with Gonzalo Navarro's
>> publications: http://www.dcc.uchile.cl/~gnavarro/subj-multiple.html
>
>
> I don't suffer from NMH syndrome. If ahocorasick does the job, or even
> count, I'm OK with that.
Do you m
John Machin wrote:
> Are you comparing BMH implemented in Python with str.count() implemented
> in C?
Tee-hee. Yes. I figured out that was the problem pretty quickly and just
went back to count().
> 1. A pure Python suggestion:
>
> Presuming there is a character SEP that cannot appear in the
Travers Naran wrote:
> Here's the basic idea. I have a dictionary of substrings (the
> substrings stored as keys). I have a list of strings. I want to find
> out, for each word in the dictionary, how many times the substring
> occurs non-overlapping occurrences there are in the list of string
Travers Naran wrote:
> Here's the basic idea. I have a dictionary of substrings (the substrings
> stored as keys). I have a list of strings. I want to find out, for each
> word in the dictionary, how many times the substring occurs non-overlapping
> occurrences there are in the list of string
Here's the basic idea. I have a dictionary of substrings (the substrings
stored as keys). I have a list of strings. I want to find out, for each
word in the dictionary, how many times the substring occurs non-overlapping
occurrences there are in the list of strings. This is the best I could