TokenStream() public method

public TokenStream ( String fieldName, String text ) : TokenStream
fieldName String
text String
return TokenStream
        /// <summary>
        /// Verify the analyzer analyzes to the expected contents. For PatternAnalyzer,
        /// several methods are verified:
        /// <ul>
        /// <li>Analysis with a normal Reader
        /// <li>Analysis with a FastStringReader
        /// <li>Analysis with a String
        /// </ul>
        /// </summary>
        private void Check(PatternAnalyzer analyzer, string document, string[] expected)
        {
            // ordinary analysis of a Reader
            AssertAnalyzesTo(analyzer, document, expected);

            // analysis with a "FastStringReader"
            TokenStream ts = analyzer.TokenStream("dummy", new PatternAnalyzer.FastStringReader(document));

            AssertTokenStreamContents(ts, expected);

            // analysis of a String, uses PatternAnalyzer.tokenStream(String, String)
            TokenStream ts2 = analyzer.TokenStream("dummy", new StringReader(document));

            AssertTokenStreamContents(ts2, expected);
        }
        /*
         * Verify the analyzer analyzes to the expected contents. For PatternAnalyzer,
         * several methods are verified:
         * <ul>
         * <li>Analysis with a normal Reader
         * <li>Analysis with a FastStringReader
         * <li>Analysis with a String
         * </ul>
         */
        private void Check(PatternAnalyzer analyzer, String document,
            String[] expected)
        {
            // ordinary analysis of a Reader
            AssertAnalyzesTo(analyzer, document, expected);

            // analysis with a "FastStringReader"
            TokenStream ts = analyzer.TokenStream("dummy",
                new PatternAnalyzer.FastStringReader(document));
            AssertTokenStreamContents(ts, expected);

            // analysis of a String, uses PatternAnalyzer.tokenStream(String, String)
            TokenStream ts2 = analyzer.TokenStream("dummy", document);
            AssertTokenStreamContents(ts2, expected);
        }