[Zope] Design Question
Tim Cook
twcook@iswt.com
Sun, 17 Sep 2000 23:02:54 -0500
>From a performance standpoint I'd like to know how to best
implement this. Speed is important:
I have a comma delimited file that I imported into a (Python)
dictionary. This may not be the best way to do this though. Maybe
just nested lists would be better? The comma delimited file will
only need to be updated annually. So it's pretty static.
Original line from file: 1234, This list describes this code
My decidely backwards dictionary: {1234: ['This','list',
'describes', 'this', 'code']}
I have a set of codes 2 - 6 characters long. A string of varying
lengths (usually 3 - 10 words) describe the code. I will need to
take a paragraph of text and determine the most appropriate code
based on key words from the paragraph that match up to code
descriptions.
I was going to do this in DTML but 15,000+ codes (even using a
BTree folder) is painfully slow.
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?
Thanks,
-- Tim Cook --
Cook Information Systems | Office: (901) 884-4126 8am-5pm CDT
* Specializing in Open Source Business Systems *
FreePM Project Coordinator http://www.freepm.org
OSHCA Founding Supporter http://www.oshca.org