lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Aschoff <christian.asch...@uni-ulm.de>
Subject Problems with stemming/SpellChecker
Date Fri, 12 Oct 2007 13:48:23 GMT
Hi,

i tried to implement a 'did you mean'-function (and successed in some  
way). But the hints from the SpellChecker are the stemmed versions of  
the keywords.

For example, the search for the wrong word 'wasseraalfingen' results  
in the hint 'wasseralfing' but should be 'wasseralfingen'. My first  
try was to use a field with the option 'NO_NORMS' but that did not  
worked.

[...]
             indexWriter = new IndexWriter(MiscConstants.luceneDir,  
new GermanAnalyzer(), create);
[...]
             Field didyoumean = new Field 
(LuceneFieldNames.didyoumean, content.toString(), Field.Store.YES,  
Field.Index.NO_NORMS, Field.TermVector.NO);
             document.add(didyoumean);
[...]
         IndexReader indexReader = IndexReader.open 
(MiscConstants.luceneDir);
         SpellChecker spellChecker = new SpellChecker 
(FSDirectory.getDirectory(MiscConstants.luceneDYMDir));
         spellChecker.indexDictionary(new LuceneDictionary 
(indexReader, LuceneFieldNames.didyoumean));
         indexReader.close();
[...]

Has anyone a suggestion how i can get 'unstemmed' hints from  
SpellChecker? Do i have to create some kind of 'unstemmed' index just  
for the creation of the SpellCheckers-index?

Regards,
Christian Aschoff


---
Dipl. Ing. (FH) Christian Aschoff

Büro:
Universität Ulm
Kommunikations- und Informationszentrum
Abt. Informationssysteme
Raum O26/5403
Albert-Einstein-Allee 11
89081 Ulm

Tel. 0731 50-22432
Fax. 0731 50-22471
christian.aschoff@uni-ulm.de

Privat:
Fabristr. 13
89075 Ulm
Deutschland/Old Europe

Tel. 0731 602 803 60
Fax. 0731 602 803 61
Mob. 0171 272 03 04
caschoff@mac.com

Helfen Sie mit: www.meyers-konversationslexikon.de



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message