Beispiel #1
0
 /**
  * Builds an analyzer with the stop words from the given reader.
  *
  * @see WordlistLoader#getWordSet(Reader, Version)
  * @param matchVersion Lucene version to match See {@link <a href="#version">above</a>}
  * @param stopwords Reader to read stop words from
  */
 public PhaidraAnalyzer(Version matchVersion, Reader stopwords) throws IOException {
   this(matchVersion, WordlistLoader.getWordSet(stopwords, matchVersion));
 }
Beispiel #2
0
 /**
  * Builds an analyzer with the stop words from the given file.
  *
  * @see WordlistLoader#getWordSet(Reader, Version)
  * @param matchVersion Lucene version to match See {@link <a href="#version">above</a>}
  * @param stopwords File to read stop words from
  */
 public PhaidraAnalyzer(Version matchVersion, File stopwords) throws IOException {
   this(
       matchVersion,
       WordlistLoader.getWordSet(
           IOUtils.getDecodingReader(stopwords, IOUtils.CHARSET_UTF_8), matchVersion));
 }
 /**
  * Builds an analyzer with the stop words from the given file.
  *
  * @see WordlistLoader#getWordSet(File)
  * @param matchVersion See <a href="#version">above</a>
  * @param stopwordsFile File to load stop words from
  */
 public StopAnalyzer(Version matchVersion, File stopwordsFile) throws IOException {
   this(matchVersion, WordlistLoader.getWordSet(stopwordsFile));
 }