Пример #1
0
 /// <summary>
 /// test use of exclusion set </summary>
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
 //ORIGINAL LINE: public void testExclude() throws java.io.IOException
 public virtual void testExclude()
 {
     CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, asSet("ağacı"), false);
     Analyzer a = new TurkishAnalyzer(TEST_VERSION_CURRENT, TurkishAnalyzer.DefaultStopSet, exclusionSet);
     checkOneTerm(a, "ağacı", "ağacı");
     checkOneTerm(a, "ağaç", "ağaç");
 }
Пример #2
0
        /// <summary>
        /// test use of exclusion set </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testExclude() throws java.io.IOException
        public virtual void testExclude()
        {
            CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, asSet("ağacı"), false);
            Analyzer     a            = new TurkishAnalyzer(TEST_VERSION_CURRENT, TurkishAnalyzer.DefaultStopSet, exclusionSet);

            checkOneTerm(a, "ağacı", "ağacı");
            checkOneTerm(a, "ağaç", "ağaç");
        }
Пример #3
0
 /// <summary>
 /// test stopwords and stemming </summary>
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
 //ORIGINAL LINE: public void testBasics() throws java.io.IOException
 public virtual void testBasics()
 {
     Analyzer a = new TurkishAnalyzer(TEST_VERSION_CURRENT);
     // stemming
     checkOneTerm(a, "ağacı", "ağaç");
     checkOneTerm(a, "ağaç", "ağaç");
     // stopword
     assertAnalyzesTo(a, "dolayı", new string[] {});
     // apostrophes
     checkOneTerm(a, "Kıbrıs'ta", "kıbrıs");
     assertAnalyzesTo(a, "Van Gölü'ne", new string[]{"van", "göl"});
 }
Пример #4
0
        /// <summary>
        /// test stopwords and stemming </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testBasics() throws java.io.IOException
        public virtual void testBasics()
        {
            Analyzer a = new TurkishAnalyzer(TEST_VERSION_CURRENT);

            // stemming
            checkOneTerm(a, "ağacı", "ağaç");
            checkOneTerm(a, "ağaç", "ağaç");
            // stopword
            assertAnalyzesTo(a, "dolayı", new string[] {});
            // apostrophes
            checkOneTerm(a, "Kıbrıs'ta", "kıbrıs");
            assertAnalyzesTo(a, "Van Gölü'ne", new string[] { "van", "göl" });
        }