Analyzer for Polish.
Inheritance: Lucene.Net.Analysis.Util.StopwordAnalyzerBase
 public void TestExclude()
 {
     CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, AsSet("studenta"), false); ;
     Analyzer a = new PolishAnalyzer(TEST_VERSION_CURRENT,
         PolishAnalyzer.GetDefaultStopSet(), exclusionSet);
     CheckOneTerm(a, "studenta", "studenta");
     CheckOneTerm(a, "studenci", "student");
 }
 public void TestBasics()
 {
     Analyzer a = new PolishAnalyzer(TEST_VERSION_CURRENT);
     // stemming
     CheckOneTerm(a, "studenta", "student");
     CheckOneTerm(a, "studenci", "student");
     // stopword
     AssertAnalyzesTo(a, "był", new String[] { });
 }
Beispiel #3
0
        public void TestExclude()
        {
            CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, AsSet("studenta"), false);;
            Analyzer     a            = new PolishAnalyzer(TEST_VERSION_CURRENT,
                                                           PolishAnalyzer.DefaultStopSet, exclusionSet);

            CheckOneTerm(a, "studenta", "studenta");
            CheckOneTerm(a, "studenci", "student");
        }
Beispiel #4
0
        public void TestBasics()
        {
            Analyzer a = new PolishAnalyzer(TEST_VERSION_CURRENT);

            // stemming
            CheckOneTerm(a, "studenta", "student");
            CheckOneTerm(a, "studenci", "student");
            // stopword
            AssertAnalyzesTo(a, "był", new String[] { });
        }
Beispiel #5
0
        public void TestOutOfRange()
        {
            var a         = new PolishAnalyzer(TEST_VERSION_CURRENT);
            var text      = "zyaolz 96619727 p";
            var reader    = new StringReader(text);
            int remainder = 2;

            using var ts = a.GetTokenStream("dummy", (TextReader) new MockCharFilter(reader, remainder));
            ts.Reset();

            while (ts.IncrementToken())
            {
            }

            ts.End();
        }
        public void TestOutOfRange()
        {
            var a = new PolishAnalyzer(TEST_VERSION_CURRENT);
            var text = "zyaolz 96619727 p";
            var reader = new StringReader(text);
            int remainder = 2;
            using (var ts = a.TokenStream("dummy", (TextReader)new MockCharFilter(reader, remainder)))
            {
                ts.Reset();

                while (ts.IncrementToken())
                {
                }

                ts.End();
            }
        }