small javadoc improvements

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@192989 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2005-06-22 19:59:03 +00:00
parent 94d7f6e9f5
commit ca5b0a3ca0
2 changed files with 16 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public class WordlistLoader {
* 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).
* Analyzer which uses LowerCaseFilter (like StandardAnalyzer).
*
* @param wordfile File containing the wordlist
* @return A HashSet with the file's words
@ -56,6 +56,15 @@ public class WordlistLoader {
return result;
}
/**
* Reads lines from a Reader and adds every line as an entry to a HashSet (omitting
* leading and trailing whitespace). Every line of the Reader should contain only
* one word. The words need to be in lowercase if you make use of an
* Analyzer which uses LowerCaseFilter (like StandardAnalyzer).
*
* @param reader Reader containing the wordlist
* @return A HashSet with the reader's words
*/
public static HashSet getWordSet(Reader reader) throws IOException {
HashSet result = new HashSet();
BufferedReader br = null;

View File

@ -46,11 +46,16 @@ public class StandardAnalyzer extends Analyzer {
stopSet = StopFilter.makeStopSet(stopWords);
}
/** Builds an analyzer with the stop words from the given file. */
/** Builds an analyzer with the stop words from the given file.
* @see WordlistLoader#getWordSet(File)
*/
public StandardAnalyzer(File stopwords) throws IOException {
stopSet = WordlistLoader.getWordSet(stopwords);
}
/** Builds an analyzer with the stop words from the given reader.
* @see WordlistLoader#getWordSet(Reader)
*/
public StandardAnalyzer(Reader stopwords) throws IOException {
stopSet = WordlistLoader.getWordSet(stopwords);
}