org.apache.lucene.analysis.de
Class WordlistLoader

java.lang.Object
  |
  +--org.apache.lucene.analysis.de.WordlistLoader

public class WordlistLoader
extends Object

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.

Version:
$Id: WordlistLoader.java,v 1.3 2002/04/19 19:09:36 otis Exp $
Author:
Gerhard Schwarz

Constructor Summary
WordlistLoader()
           
 
Method Summary
static Hashtable getWordtable(File wordfile)
           
static Hashtable getWordtable(String wordfile)
           
static Hashtable 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 Hashtable getWordtable(String path,
                                     String wordfile)
Parameters:
path - Path to the wordlist
wordfile - Name of the wordlist

getWordtable

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

getWordtable

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


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