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
[EMAIL PROTECTED]

Privat:
Fabristr. 13
89075 Ulm
Deutschland/Old Europe

Tel. 0731 602 803 60
Fax. 0731 602 803 61
Mob. 0171 272 03 04
[EMAIL PROTECTED]

Helfen Sie mit: www.meyers-konversationslexikon.de



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to