Example usage for org.apache.lucene.analysis WordlistLoader getWordSet

List of usage examples for org.apache.lucene.analysis WordlistLoader getWordSet

Introduction

In this page you can find the example usage for org.apache.lucene.analysis WordlistLoader getWordSet.

Prototype

public static CharArraySet getWordSet(Reader reader) throws IOException 

Source Link

Document

Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace).

Usage

From source file:analysis.FtpFilePathAnalyzer.java

License:Apache License

/**
 * Builds an analyzer with the stop words from the given file.
 * /*  w  ww  .  j  av a2s . c o m*/
 * @see WordlistLoader#getWordSet(File)
 */
public FtpFilePathAnalyzer(File stopwords) throws IOException {
    stopSet = WordlistLoader.getWordSet(stopwords);
}

From source file:analysis.FtpFilePathAnalyzer.java

License:Apache License

/**
 * Builds an analyzer with the stop words from the given reader.
 * //from   w  w w .  j  a v  a2s  .  c  o m
 * @see WordlistLoader#getWordSet(Reader)
 */
public FtpFilePathAnalyzer(Reader stopwords) throws IOException {
    stopSet = WordlistLoader.getWordSet(stopwords);
}

From source file:analysis.StandardAnalyzer.java

License:Apache License

/** Builds an analyzer with the stop words from the given file.
 * @see WordlistLoader#getWordSet(File)// w  w w .ja  va 2s .co  m
 * @param matchVersion Lucene version to match See {@link
 * <a href="#version">above</a>}
 * @param stopwords File to read stop words from */
public StandardAnalyzer(Version matchVersion, File stopwords) throws IOException {
    this(matchVersion, WordlistLoader.getWordSet(stopwords));
}

From source file:analysis.StandardAnalyzer.java

License:Apache License

/** Builds an analyzer with the stop words from the given reader.
 * @see WordlistLoader#getWordSet(Reader)
 * @param matchVersion Lucene version to match See {@link
 * <a href="#version">above</a>}
 * @param stopwords Reader to read stop words from */
public StandardAnalyzer(Version matchVersion, Reader stopwords) throws IOException {
    this(matchVersion, WordlistLoader.getWordSet(stopwords));
}

From source file:brazilianStemmer.BrazilianAnalyzer.java

License:Apache License

public BrazilianAnalyzer(File stopwords) throws IOException {
    stopWords = WordlistLoader.getWordSet(stopwords);
    init();
}

From source file:brazilianStemmer.BrazilianAnalyzer.java

License:Apache License

/**
 * Builds an exclusionlist from the words contained in the given file.
 *///from  www. j a va2s.  co  m
public void setStemExclusionTable(File exclusionlist) throws IOException {
    exclusionTable = WordlistLoader.getWordSet(exclusionlist);
}

From source file:ca.ubc.cs.reverb.indexer.ReverbLuceneAnalyzer.java

License:Apache License

/** Builds an analyzer with the stop words from the given file.
 * @see WordlistLoader#getWordSet(File)/*from   ww  w  .j  a  v a2s. com*/
 * @param matchVersion Lucene version to match See {@link
 * <a href="#version">above</a>}
 * @param stopwords File to read stop words from */
public ReverbLuceneAnalyzer(Version matchVersion, File stopwords) throws IOException {
    this(matchVersion, WordlistLoader.getWordSet(stopwords));
}

From source file:ca.ubc.cs.reverb.indexer.ReverbLuceneAnalyzer.java

License:Apache License

/** Builds an analyzer with the stop words from the given reader.
 * @see WordlistLoader#getWordSet(Reader)
 * @param matchVersion Lucene version to match See {@link
 * <a href="#version">above</a>}
 * @param stopwords Reader to read stop words from */
public ReverbLuceneAnalyzer(Version matchVersion, Reader stopwords) throws IOException {
    this(matchVersion, WordlistLoader.getWordSet(stopwords));
}

From source file:ca.ubc.cs.reverb.indexer.WebPageAnalyzer.java

License:Apache License

/** Builds an analyzer with the stop words from the given file.
 * @see WordlistLoader#getWordSet(File)/*from w  w w .jav  a2 s. c o  m*/
 * @param matchVersion Lucene version to match See {@link
 * <a href="#version">above</a>}
 * @param stopwords File to read stop words from */
public WebPageAnalyzer(Version matchVersion, File stopwords) throws IOException {
    this(matchVersion, WordlistLoader.getWordSet(stopwords));
}

From source file:ca.ubc.cs.reverb.indexer.WebPageAnalyzer.java

License:Apache License

/** Builds an analyzer with the stop words from the given reader.
 * @see WordlistLoader#getWordSet(Reader)
 * @param matchVersion Lucene version to match See {@link
 * <a href="#version">above</a>}
 * @param stopwords Reader to read stop words from */
public WebPageAnalyzer(Version matchVersion, Reader stopwords) throws IOException {
    this(matchVersion, WordlistLoader.getWordSet(stopwords));
}