Beispiel #1
0
        private static IInputPreprocessorPipeline CreatePipeline(bool caseInsensitive = false, bool accentInsensitive = false)
        {
            var pipeline = new InputPreprocessorPipeline();

            ((IConfiguredBy <TokenizationOptions>)pipeline).Configure(
                new TokenizationOptions(
                    TokenizerKind.Default,
                    caseInsensitive: caseInsensitive,
                    accentInsensitive: accentInsensitive));
            return(pipeline);
        }
        private static IInputPreprocessorPipeline CreatePipeline(bool caseInsensitive = false, bool accentInsensitive = false)
        {
            var pipeline = new InputPreprocessorPipeline();

            ((IConfiguredBy <TokenizationOptions>)pipeline).Configure(
                new TokenizationOptions(TokenizerKind.PlainText)
            {
                CaseInsensitive   = caseInsensitive,
                AccentInsensitive = accentInsensitive
            });
            return(pipeline);
        }