Apache Lucene Spell Checker

C

Chase Preuninger

I can't figure out what the Directory object that you pass to the
SpellChecker constructor does.
 
C

Chase Preuninger

No that is the part that has me baffled. You pass it a dictionary
later on but I cant figure out what to include in the directory. No
tutorials online show how to create the directory.
 
A

Abhijat Vatsyayan

Chase said:
I can't figure out what the Directory object that you pass to the
SpellChecker constructor does.
SpellChecker indexes the dictionary (rather, all words in the
dictionary) for which it needs a Directory object.
 
D

Daniel Pitts

Chase said:
I can't figure out what the Directory object that you pass to the
SpellChecker constructor does.
You should ask on the Lucene forums, but my understanding is that a
Directory is where it puts the index files that it builds. There are
several implementations of it, where it could be a "virtual" in-memory
directory, or an actual file-system directory. If you build your index
every time you load your app, and the index isn't too large, you can use
the RAMDirectory to do what you want, otherwise you might consider using
a FSDirectory

(I've guessed at the names, since I haven't used Lucene in a long time)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top