Class LuceneStopwords

java.lang.Object
org.opensextant.util.LuceneStopwords

public class LuceneStopwords extends Object
Utility class to help access Lucene stop words, mainly as they exist in Solr index stopword files are in either list form or snowball format. getStopwords()
  • Constructor Details

    • LuceneStopwords

      public LuceneStopwords()
  • Method Details

    • getStopwords

      public static Set<Object> getStopwords(org.apache.lucene.analysis.util.ResourceLoader loader, String givenLang) throws IOException
      Simple wrapper around Lucene resource loading to access Solr-provided stop lists.
      Parameters:
      loader - classpath loader
      givenLang - ISO 2-char language ID used by lucene for lang-specific filters (./lang)
      Returns:
      set of stopwords in Lucene API construct
      Throws:
      IOException - if resource files are not found in classpath (JAR or solr core ./conf/lang/