org.apache.lucene.analysis.de

Class WordlistLoader

public class WordlistLoader extends Object

Loader for text files that represent a list of stopwords.

Version: $Id: WordlistLoader.java,v 1.10 2004/03/30 15:54:48 otis Exp $

Author: Gerhard Schwarz

UNKNOWN: this is not specific to German, it should be moved up

Method Summary
static HashSetgetWordSet(File wordfile)
Loads a text file and adds every line as an entry to a HashSet (omitting leading and trailing whitespace).
static HashtablegetWordtable(String path, String wordfile)
static HashtablegetWordtable(String wordfile)
static HashtablegetWordtable(File wordfile)

Method Detail

getWordSet

public static HashSet getWordSet(File wordfile)
Loads a text file and adds every line as an entry to a HashSet (omitting leading and trailing whitespace). Every line of the file should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like GermanAnalyzer).

Parameters: wordfile File containing the wordlist

Returns: A HashSet with the file's words

getWordtable

public static Hashtable getWordtable(String path, String wordfile)

Deprecated: Use {@link #getWordSet(File)} getWordSet(File)} instead

Parameters: path Path to the wordlist wordfile Name of the wordlist

getWordtable

public static Hashtable getWordtable(String wordfile)

Deprecated: Use {@link #getWordSet(File)} getWordSet(File)} instead

Parameters: wordfile Complete path to the wordlist

getWordtable

public static Hashtable getWordtable(File wordfile)

Deprecated: Use {@link #getWordSet(File)} getWordSet(File)} instead

Parameters: wordfile File object that points to the wordlist

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