Lucene.Net.Analysis.CommonGrams.CommonGramsFilter.CommonGramsFilter C# (CSharp) Method

CommonGramsFilter() public method

Construct a token stream filtering the given input using a Set of common words to create bigrams. Outputs both unigrams with position increment and bigrams with position increment 0 type=gram where one or both of the words in a potential bigram are in the set of common words .
public CommonGramsFilter ( LuceneVersion matchVersion, TokenStream input, CharArraySet commonWords ) : Lucene.Net.Analysis.Tokenattributes
matchVersion LuceneVersion
input TokenStream TokenStream input in filter chain
commonWords CharArraySet The set of common words.
return Lucene.Net.Analysis.Tokenattributes
        public CommonGramsFilter(LuceneVersion matchVersion, TokenStream input, CharArraySet commonWords)
            : base(input)
        {
            termAttribute = AddAttribute<ICharTermAttribute>();
            offsetAttribute = AddAttribute<IOffsetAttribute>();
            typeAttribute = AddAttribute<ITypeAttribute>();
            posIncAttribute = AddAttribute<IPositionIncrementAttribute>();
            posLenAttribute = AddAttribute<IPositionLengthAttribute>();
            this.commonWords = commonWords;
        }