org.apache.lucene.analysis.nl
Class WordlistLoader
public class WordlistLoader
- Gerhard Schwarz
Loads a text file and adds every line as an entry to a Hashtable. Every line
should contain only one word. If the file is not found or on any error, an
empty table is returned.
getStemDict
public static HashMap getStemDict(File wordstemfile)
Reads a stemsdictionary. Each line contains:
word \t stem
i.e. tab seperated)
- Stem dictionary that overrules, the stemming algorithm
getWordtable
public static HashMap getWordtable(File wordfile)
wordfile
- File containing the wordlist
getWordtable
public static HashMap getWordtable(String wordfile)
wordfile
- Complete path to the wordlist
getWordtable
public static HashMap getWordtable(String path,
String wordfile)
path
- Path to the wordlistwordfile
- Name of the wordlist
Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.