Re: Reading in a Dictionary File





boanerges35@xxxxxxxxx wrote On 06/30/06 15:18,:
John W. Kennedy wrote:

Fahd Shariff wrote:

Reading in a dictionary file is the same as reading in any other file.
You use a BufferedReader and store the contents of the dictionary in
some kind of data structure, for example.

Not necessarily a BufferedReader. An DataInputStream or a
RandomAccessFile might be necessary. There's just no way of knowing
without more information.



What kind of info do you need? [...]

Well, you asked how to read the dictionary. Before you
can even begin, you need to know how the file is organized.
I for one am unable to advise you without such knowledge.

A few plausible file formats for a dictionary:

- Simple word list: Aarhus Aaron Ababa aback ...

- List with abbreviated prefixes: Aarhus3on1baba0aback ...

- Structure-sensitive: {,mis,over}take{,n,-ing,s}

.... and there are many, many more. Different formats call
for different approaches, and we can't advise you until
you tell us what you're dealing with.

--
Eric.Sosman@xxxxxxx

.



Relevant Pages

  • Re: Mixing text and binary I/O
    ... The ideal thing to use would be BufferedReader, ... doesn't allow reading raw bytes. ... The next best thing (though slower) ... would be DataInputStream, but its readLinemethod is deprecated for ...
    (comp.lang.java.programmer)
  • Re: Reading in a Dictionary File
    ... John W. Kennedy wrote: ... You use a BufferedReader and store the contents of the dictionary in ... some kind of data structure, ... Not necessarily a BufferedReader. ...
    (comp.lang.java.help)
  • Re: Reading in a Dictionary File
    ... Fahd Shariff wrote: ... You use a BufferedReader and store the contents of the dictionary in ... some kind of data structure, ... Not necessarily a BufferedReader. ...
    (comp.lang.java.help)