org.apache.lucene.analysis.nl
Class WordlistLoader

java.lang.Object
  extended by org.apache.lucene.analysis.nl.WordlistLoader

public class WordlistLoader
extends Object

Author:
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.


Constructor Summary
WordlistLoader()
           
 
Method Summary
static HashMap getStemDict(File wordstemfile)
          Reads a stemsdictionary.
static HashMap getWordtable(File wordfile)
           
static HashMap getWordtable(String wordfile)
           
static HashMap getWordtable(String path, String wordfile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordlistLoader

public WordlistLoader()
Method Detail

getWordtable

public static HashMap getWordtable(String path,
                                   String wordfile)
Parameters:
path - Path to the wordlist
wordfile - Name of the wordlist

getWordtable

public static HashMap getWordtable(String wordfile)
Parameters:
wordfile - Complete path to the wordlist

getStemDict

public static HashMap getStemDict(File wordstemfile)
Reads a stemsdictionary. Each line contains: word \t stem i.e. tab seperated)

Returns:
Stem dictionary that overrules, the stemming algorithm

getWordtable

public static HashMap getWordtable(File wordfile)
Parameters:
wordfile - File containing the wordlist


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.