Skip to content

Instantly share code, notes, and snippets.

@iantruslove
Created May 11, 2015 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iantruslove/fd12c336742e862dc224 to your computer and use it in GitHub Desktop.
Save iantruslove/fd12c336742e862dc224 to your computer and use it in GitHub Desktop.
English stop words in Lucene (lucene-5.1.0/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java)
static {
final List<String> stopWords = Arrays.asList(
"a", "an", "and", "are", "as", "at", "be", "but", "by",
"for", "if", "in", "into", "is", "it",
"no", "not", "of", "on", "or", "such",
"that", "the", "their", "then", "there", "these",
"they", "this", "to", "was", "will", "with"
);
final CharArraySet stopSet = new CharArraySet(stopWords, false);
ENGLISH_STOP_WORDS_SET = CharArraySet.unmodifiableSet(stopSet);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment