Exemplo n.º 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("books"), false);
     Analyzer a = new EnglishAnalyzer(TEST_VERSION_CURRENT, EnglishAnalyzer.DefaultStopSet, exclusionSet);
     checkOneTerm(a, "books", "books");
     checkOneTerm(a, "book", "book");
 }
Exemplo n.º 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("books"), false);
            Analyzer     a            = new EnglishAnalyzer(TEST_VERSION_CURRENT, EnglishAnalyzer.DefaultStopSet, exclusionSet);

            checkOneTerm(a, "books", "books");
            checkOneTerm(a, "book", "book");
        }
Exemplo n.º 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 EnglishAnalyzer(TEST_VERSION_CURRENT);
     // stemming
     checkOneTerm(a, "books", "book");
     checkOneTerm(a, "book", "book");
     // stopword
     assertAnalyzesTo(a, "the", new string[] {});
     // possessive removal
     checkOneTerm(a, "steven's", "steven");
     checkOneTerm(a, "steven\u2019s", "steven");
     checkOneTerm(a, "steven\uFF07s", "steven");
 }
Exemplo n.º 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 EnglishAnalyzer(TEST_VERSION_CURRENT);

            // stemming
            checkOneTerm(a, "books", "book");
            checkOneTerm(a, "book", "book");
            // stopword
            assertAnalyzesTo(a, "the", new string[] {});
            // possessive removal
            checkOneTerm(a, "steven's", "steven");
            checkOneTerm(a, "steven\u2019s", "steven");
            checkOneTerm(a, "steven\uFF07s", "steven");
        }