Package org.opensextant.util
Class LuceneStopwords
java.lang.Object
org.opensextant.util.LuceneStopwords
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetStopwords
(org.apache.lucene.analysis.util.ResourceLoader loader, String givenLang) Simple wrapper around Lucene resource loading to access Solr-provided stop lists.
-
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 loadergivenLang
- 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/
-