Exemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testReusableTokenStream() throws Exception
        public virtual void testReusableTokenStream()
        {
            Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "English");

            assertAnalyzesTo(a, "he abhorred accents", new string[] { "he", "abhor", "accent" });
            assertAnalyzesTo(a, "she abhorred him", new string[] { "she", "abhor", "him" });
        }
Exemplo n.º 2
0
        /// <summary>
        /// Test turkish lowercasing
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testTurkish() throws Exception
        public virtual void testTurkish()
        {
            Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "Turkish");

            assertAnalyzesTo(a, "ağacı", new string[] { "ağaç" });
            assertAnalyzesTo(a, "AĞACI", new string[] { "ağaç" });
        }
Exemplo n.º 3
0
        public virtual void testTurkishBWComp()
        {
            Analyzer a = new SnowballAnalyzer(Version.LUCENE_30, "Turkish");

            // AĞACI in turkish lowercases to ağacı, but with lowercase filter ağaci.
            // this fails due to wrong casing, because the stemmer
            // will only remove -ı, not -i
            assertAnalyzesTo(a, "ağacı", new string[] { "ağaç" });
            assertAnalyzesTo(a, "AĞACI", new string[] { "ağaci" });
        }
Exemplo n.º 4
0
        /// <summary>
        /// Test english lowercasing. Test both cases (pre-3.1 and post-3.1) to ensure
        /// we lowercase I correct for non-Turkish languages in either case.
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testEnglishLowerCase() throws Exception
        public virtual void testEnglishLowerCase()
        {
            Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "English");

            assertAnalyzesTo(a, "cryogenic", new string[] { "cryogen" });
            assertAnalyzesTo(a, "CRYOGENIC", new string[] { "cryogen" });

            Analyzer b = new SnowballAnalyzer(Version.LUCENE_30, "English");

            assertAnalyzesTo(b, "cryogenic", new string[] { "cryogen" });
            assertAnalyzesTo(b, "CRYOGENIC", new string[] { "cryogen" });
        }
Exemplo n.º 5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testStopwords() throws Exception
        public virtual void testStopwords()
        {
            Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "English", StandardAnalyzer.STOP_WORDS_SET);

            assertAnalyzesTo(a, "the quick brown fox jumped", new string[] { "quick", "brown", "fox", "jump" });
        }
Exemplo n.º 6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testEnglish() throws Exception
        public virtual void testEnglish()
        {
            Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "English");

            assertAnalyzesTo(a, "he abhorred accents", new string[] { "he", "abhor", "accent" });
        }
Exemplo n.º 7
0
        /// <summary>
        /// Test english lowercasing. Test both cases (pre-3.1 and post-3.1) to ensure
        /// we lowercase I correct for non-Turkish languages in either case.
        /// </summary>
        //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        //ORIGINAL LINE: public void testEnglishLowerCase() throws Exception
        public virtual void testEnglishLowerCase()
        {
            Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "English");
            assertAnalyzesTo(a, "cryogenic", new string[] {"cryogen"});
            assertAnalyzesTo(a, "CRYOGENIC", new string[] {"cryogen"});

            Analyzer b = new SnowballAnalyzer(Version.LUCENE_30, "English");
            assertAnalyzesTo(b, "cryogenic", new string[] {"cryogen"});
            assertAnalyzesTo(b, "CRYOGENIC", new string[] {"cryogen"});
        }
Exemplo n.º 8
0
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
 //ORIGINAL LINE: public void testEnglish() throws Exception
 public virtual void testEnglish()
 {
     Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "English");
     assertAnalyzesTo(a, "he abhorred accents", new string[]{"he", "abhor", "accent"});
 }
Exemplo n.º 9
0
 public virtual void testTurkishBWComp()
 {
     Analyzer a = new SnowballAnalyzer(Version.LUCENE_30, "Turkish");
     // AĞACI in turkish lowercases to ağacı, but with lowercase filter ağaci.
     // this fails due to wrong casing, because the stemmer
     // will only remove -ı, not -i
     assertAnalyzesTo(a, "ağacı", new string[] {"ağaç"});
     assertAnalyzesTo(a, "AĞACI", new string[] {"ağaci"});
 }
Exemplo n.º 10
0
        /// <summary>
        /// Test turkish lowercasing
        /// </summary>
        //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        //ORIGINAL LINE: public void testTurkish() throws Exception
        public virtual void testTurkish()
        {
            Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "Turkish");

            assertAnalyzesTo(a, "ağacı", new string[] {"ağaç"});
            assertAnalyzesTo(a, "AĞACI", new string[] {"ağaç"});
        }
Exemplo n.º 11
0
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
 //ORIGINAL LINE: public void testStopwords() throws Exception
 public virtual void testStopwords()
 {
     Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "English", StandardAnalyzer.STOP_WORDS_SET);
     assertAnalyzesTo(a, "the quick brown fox jumped", new string[]{"quick", "brown", "fox", "jump"});
 }
Exemplo n.º 12
0
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
 //ORIGINAL LINE: public void testReusableTokenStream() throws Exception
 public virtual void testReusableTokenStream()
 {
     Analyzer a = new SnowballAnalyzer(TEST_VERSION_CURRENT, "English");
     assertAnalyzesTo(a, "he abhorred accents", new string[]{"he", "abhor", "accent"});
     assertAnalyzesTo(a, "she abhorred him", new string[]{"she", "abhor", "him"});
 }