Searching a dictionary file in DOS



I have an HP 100LX PDA that I want to use as a pocket German
translator. It is basically a DOS PC with a 16mhz 286 processer, 640k
RAM. and MS DOS 5.0. I found a nice dictionary list I want to use that
is 10mb. I have a 64mb CF flash card I can use to hold the list. The
list is not just pairs of words. It also contains short phrases. I
would want "peanut butter and jelly" to match a search for "peanut" as
well as a search for "butter" or "jelly". Using Turbo C++ 1.01
(available free from Borland), it took about 4 seconds to load a 64k
chunk of memory from Flash and less than a second to capitalize
everything and find the first occurrence of a search string using
strstr from string.h. The main bottleneck seems to be reading from
Flash.

Can anyone suggest an indexing or search method to minimize flash
access?

I thought about preparsing the file and making multiple entries for
any multiple word entry. In other words "peanut butter and jelly"
would appear in the list after "peanut" but also between "butter" and
"butterfly". That way, if the program loaded into RAM the section of
the file with all words beginning with "b" or "bu" looking for
"butter", "peanut butter and jelly" would also be found. Another idea
is to split the file up and do a simple search for single words pairs.
The more complex and time consuming search for multiple words could be
done while the user is looking at the results from the first search.
Those are the only ideas I have so far. Please let me know what you
think.

.



Relevant Pages

  • Re: Searching a dictionary file in DOS
    ... It is basically a DOS PC with a 16mhz 286 processer, ... I have a 64mb CF flash card I can use to hold the list. ... If your original file is already sorted, ... words in a sentence' in your original file, and do a binary search on ...
    (comp.programming)
  • Re: Need Help - Computer Only Operatres (limited too!) in Safe Mode
    ... The flash is a BIOS update provided by HP. ... floppy allow me to flash from DOS? ... I don't know where I would find a DOS flasher for my BIOS. ... Computer and pointer froze so I held the power button down ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Create Bootable CF card
    ... >>(Compact Flash) card with DOS, from a Linux box? ... > linux scripts to install a small Linux distro on a card. ...
    (comp.os.linux.hardware)
  • Re: What is worng with Ebay?
    ... ver 5.5 is bloatware. ... Keeping away from flash, using minimal java ... I'm starting to think the DOS ... Good luck finding a DOS based web browser that works with anything ...
    (alt.marketing.online.ebay)