manually editing spellcheck dictionary

2011-02-25 Thread Tanner Postert
I'm using an index based spellcheck dictionary and I was wondering if there
were a way for me to manually remove certain words from the dictionary.

Some of my content has some mis-spellings, and for example when I search for
the word sherrif (which should be spelled sheriff), it get recommendations
like sherriff or sherri instead. If I could remove those words, it would
seem like the system would work a little better.


Re: manually editing spellcheck dictionary

2011-02-25 Thread Sujit Pal
If the dictionary is a Lucene index, wouldn't it be as simple as delete
using a term query? Something like this:

IndexReader sdreader = new IndexReader();
sdreader.delete(new Term(word, sherri));
...
sdreader.optimize();
sdreader.close();

I am guessing your dictionary is built dynamically using content words.
If so, you may want to run the words through an aspell like filter
(jazzy.sf.net is a Java implementation of aspell that works quite well
with single words) to determine if more of these should be removed, and
whether they should be added in the first place.

-sujit

On Fri, 2011-02-25 at 10:41 -0700, Tanner Postert wrote:
 I'm using an index based spellcheck dictionary and I was wondering if there
 were a way for me to manually remove certain words from the dictionary.
 
 Some of my content has some mis-spellings, and for example when I search for
 the word sherrif (which should be spelled sheriff), it get recommendations
 like sherriff or sherri instead. If I could remove those words, it would
 seem like the system would work a little better.