コード例 #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" });
        }
コード例 #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ç" });
        }
コード例 #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" });
        }
コード例 #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" });
        }
コード例 #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" });
        }
コード例 #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" });
        }
コード例 #7
0
ファイル: TestSnowball.cs プロジェクト: Cefa68000/lucenenet
        /// <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"});
        }
コード例 #8
0
ファイル: TestSnowball.cs プロジェクト: Cefa68000/lucenenet
 //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"});
 }
コード例 #9
0
ファイル: TestSnowball.cs プロジェクト: Cefa68000/lucenenet
 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"});
 }
コード例 #10
0
ファイル: TestSnowball.cs プロジェクト: Cefa68000/lucenenet
        /// <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ç"});
        }
コード例 #11
0
ファイル: TestSnowball.cs プロジェクト: Cefa68000/lucenenet
 //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"});
 }
コード例 #12
0
ファイル: TestSnowball.cs プロジェクト: Cefa68000/lucenenet
 //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"});
 }