Inheritance: Lucene.Net.Analysis.TokenFilter
        public virtual void TestWithKeywordAttribute()
        {
            CharArraySet set = new CharArraySet(TEST_VERSION_CURRENT, 1, true);

            set.add("Brasília");
            BrazilianStemFilter filter = new BrazilianStemFilter(new SetKeywordMarkerFilter(new LowerCaseTokenizer(TEST_VERSION_CURRENT, new StringReader("Brasília Brasilia")), set));

            AssertTokenStreamContents(filter, new string[] { "brasília", "brasil" });
        }
Example #2
0
        /**
         * Creates a TokenStream which tokenizes all the text in the provided Reader.
         *
         * @return  A TokenStream build from a StandardTokenizer filtered with
         *          StandardFilter, StopFilter, GermanStemFilter and LowerCaseFilter.
         */
        public override TokenStream TokenStream(string fieldName, TextReader reader)
        {
            TokenStream result = new StandardTokenizer(reader);

            result = new LowerCaseFilter(result);
            result = new StandardFilter(result);
            result = new StopFilter(result, stoptable);
            result = new BrazilianStemFilter(result, excltable);
            return(result);
        }
 public virtual void TestWithKeywordAttribute()
 {
     CharArraySet set = new CharArraySet(TEST_VERSION_CURRENT, 1, true);
     set.add("Brasília");
     BrazilianStemFilter filter = new BrazilianStemFilter(new SetKeywordMarkerFilter(new LowerCaseTokenizer(TEST_VERSION_CURRENT, new StringReader("Brasília Brasilia")), set));
     AssertTokenStreamContents(filter, new string[] { "brasília", "brasil" });
 }
Example #4
0
 /**
  * Creates a TokenStream which tokenizes all the text in the provided Reader.
  *
  * @return  A TokenStream build from a StandardTokenizer filtered with
  * 			StandardFilter, StopFilter, GermanStemFilter and LowerCaseFilter.
  */
 public override TokenStream TokenStream(string fieldName, TextReader reader)
 {
     TokenStream result = new StandardTokenizer(reader);
     result = new LowerCaseFilter(result);
     result = new StandardFilter(result);
     result = new StopFilter(result, stoptable);
     result = new BrazilianStemFilter(result, excltable);
     return result;
 }