[Zope] Design Question
Mon, 18 Sep 2000 23:13:13 +0200
Hi Tim !
Tim Cook wrote:
> Tim Cook wrote:
> > Anyway I pickled the dictionary and it's just over 1.3MB so I
> > thought I'd use an external method to read the pickled object,
> > pass it the paragraph and test for the correct code(s), then
> > return a list. Is this the most effective way to use Python/Zope
> > for this situation?
I guess this is effective, but not efficient whatever language
you use ;-)
> Adding to my own post:
> I did play around with shelving but did not see that there was
> much of an increase in speed. The real estate requirement went up
> to 8MB+.
> Thinking outloud again...
> I think I'll take the original comma delimited file.
> Get all words and remove the common ones (the, of, and, etc)
> Find every line where each particular word appears.
That uses substring matching I guess, which is not efficient
in this case.
> Store those codes in a dictionary with the word as the key.
> (Basically, I'm turning the file around backwards I guess?)
> Then for every keyword hit from the paragraph I'll have a list of
> codes that I can count the nmber of positive hits on each code.
Here you use the quality of dictionaries, which provide quick
How to search for the codes with the most hits is another story :-)
> Hmm, sounds like a search engine to me. Anybody got one written
> in Python <g>. That's faster than a Zope Catalog?
I guess the Catalog doesn't support OR searches, which would
do what you need.
Uzopia - Digging la vida Zopa - http://uzopia.editthispage.com