mirror of https://github.com/apache/lucene.git
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:
parent
94d7f6e9f5
commit
ca5b0a3ca0
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue