Re: File searching in pocket pc by caprice
caprice
Fri Jan 02 09:13:37 CST 2004
Sorry for posting in a wrong section...
but anyway, thanks very much.
It runs quite smoothly with hashing now.
>-----Original Message-----
>this is not really a pocketpc question...it's an
algorithm
>question. anyways...
>
>you don't want to load the entire dictionary for obvious
reasons
>that you found out.
>
>what you want to do is a fast file based search...but
searching
>the disk for a word will take a very long time.
>
>so you have to use something called an index table (which
>could be part of the dictionary file or a separate
file)..it
>basically allows you to do quick searches.
>
>you want to be able to narrow down quickly to a small
subset.
>....do a search in the internet for "hash tables".
>
>every word can be represented by a number - for example a
>simple one is the sum of all it's ascii letters. it
won't be unique
>number but the resulting arrow will be small enough.
>
>then save all the numbers with the same number (hash
value) in
>a separate array in the index table along with a pointer
to the
>real word and chinese text in the dictionary.
>
>----
>
>so the user types in a english word...this is what your
program
>does:
> - convert the word to it's hash value
> - search the index table for the array of similar
hash values
> - for each value in the index table
> search in dictionary
> if word is same as english
> found - display chinese
translation.
>
>
>as i wrote before, do a search in the internet for "hash
tables"
>or "hash algorithm"
>
>
>"Caprice" <caprice_1982@hotmail.com> wrote in message
>news:04c901c3d0fc$23c00a70$a101280a@phx.gbl...
>> I've asked similar things months ago but couldn't get
>> reply... so I'd like to ask in another way.
>>
>> I'm writing a English-Chinese dictionary for pocket pc.
>> But the problem is the it's very time consuming and
also
>> seems impossible to load all data (word and meaning) to
>> an array before perform searching.
>>
>> So shall I use some file-based searching techniques? If
>> yes, can anyone give me some suggestions? Or there's
some
>> other methods for pocket pc actually? I'm writing the
>> program by evc.
>>
>> I've searching for informations for few months already
>> and really feel so hopeless.
>>
>> Thanks alot!
>
>
>.
>