//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
 //ORIGINAL LINE: public void testGraphs() throws java.io.IOException
 public virtual void testGraphs()
 {
     TokenStream tk = new LetterTokenizer(TEST_VERSION_CURRENT, new StringReader("abc d efgh ij klmno p q"));
     tk = new ShingleFilter(tk);
     tk = new EdgeNGramTokenFilter(TEST_VERSION_CURRENT, tk, 7, 10);
     assertTokenStreamContents(tk, new string[] {"efgh ij", "ij klmn", "ij klmno", "klmno p"}, new int[] {6,11,11,14}, new int[] {13,19,19,21}, new int[] {3,1,0,1}, new int[] {2,2,2,2}, 23);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Tests ShingleFilter up to six shingles against six terms.
        ///  Tests PositionFilter setting all but the first positionIncrement to zero. </summary> </exception>
        /// <exception cref="java.io.IOException"> <seealso cref= Token#next(Token) </seealso>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void test6GramFilterNoPositions() throws Exception
        public virtual void test6GramFilterNoPositions()
        {
            ShingleFilter filter = new ShingleFilter(new TestTokenStream(this, TEST_TOKEN), 6);

            assertTokenStreamContents(new PositionFilter(filter), SIX_GRAM_NO_POSITIONS_TOKENS, SIX_GRAM_NO_POSITIONS_INCREMENTS);
        }