searching algorithm

Gigs_ gigs at hi.t-com.hr
Thu May 10 13:26:07 EDT 2007


Hi all!

I have text file (english-croatian dictionary) with words in it in alphabetical 
order.
This file contains 179999 words in this format:
english word: croatian word

I want to make instant search for my gui
Instant search, i mean that my program search words and show words to user as 
user type letters.
yes, it needs to be fast

Can someone give me some points (approaches) how to make this
Should i make indexes and go with file.seek

or should breake dictionary in peaces and put words that start with a in one and 
with b in another...
?????

So if i have this words
absinth:pelin
absinthe:pelin
absolute:apsolutan
absolute:apsolutni kod
absolute:apsolutno
absolute:čist
absolute:nesumnjiv
absolute:potpun
absolute:savršen
absolute coordinates:apsolutne koordinate
absolute frequency:apsolutna učestalost
absolute gap:apsolutni jaz
absolute line spacing:apsolutni međurazmak linija
absolute majority:apsolutna većina
absolute pointing device:apsolutni pokazivački uređaj
absolute quantity:apsolutni udio
absolute value:apsolutna vrijednost
absolute zero:apsolutna nula
absolutely:apsolutno
absolutely:bezuvjetno
absolutely:nezavisno
absolutely:potpuno
absolutely:samostalno
absolutely:sasvim
absolution:odrješenje
absolution:oproštaj
absolutism:apsolutizam
absolve:odriješiti
absolve:osloboditi
absorb:absorbirati
absorb:apsorbirati
absorb:crpsti

if user type: "abs" program should list all words above in english and in croatian
if user type: "absorb" than program should list last 3 words in english and in 
croatian





any help would be appreciate!
my apologies for bad english



More information about the Python-list mailing list