code: private static Analyzer buildAnalyzer(final String language, final CharArraySet stopwords) {
          return new Analyzer() {
              protected TokenStreamComponents createComponents(String field, Reader reader) {
                  final Tokenizer source = new StandardTokenizer(reader);
                  TokenStream result = new StandardFilter(source);
                  result = new LowerCaseFilter(result);
                  result = new StopFilter(result, stopwords);
                  result = new SnowballFilter(result, language);
                  return new TokenStreamComponents(source, result);
              }
          };
      }
docs: Returns the snowball {@link Analyzer} for the specified language and stopwords.
  
  @param language  The language code. The supported languages are English, French, Spanish, Portuguese, Italian,
  Romanian, German, Dutch, Swedish, Norwegian, Danish, Russian, Finnish, Irish, Hungarian,
  Turkish, Armenian, Basque and Catalan.
  @param stopwords The stop words.
  @return The snowball {@link Analyzer} for the specified language and stopwords.