本文整理汇总了C#中IPositionIncrementAttribute类的典型用法代码示例。如果您正苦于以下问题:C# IPositionIncrementAttribute类的具体用法?C# IPositionIncrementAttribute怎么用?C# IPositionIncrementAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPositionIncrementAttribute类属于命名空间,在下文中一共展示了IPositionIncrementAttribute类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MockHoleInjectingTokenFilter
public MockHoleInjectingTokenFilter(Random random, TokenStream @in)
: base(@in)
{
RandomSeed = random.Next();
PosIncAtt = AddAttribute<IPositionIncrementAttribute>();
PosLenAtt = AddAttribute<IPositionLengthAttribute>();
}
示例2: ASCIIFoldingFilter
/// <summary>
/// Create a new <seealso cref="ASCIIFoldingFilter"/>.
/// </summary>
/// <param name="input">
/// TokenStream to filter </param>
/// <param name="preserveOriginal">
/// should the original tokens be kept on the input stream with a 0 position increment
/// from the folded tokens?
/// </param>
public ASCIIFoldingFilter(TokenStream input, bool preserveOriginal)
: base(input)
{
this.preserveOriginal = preserveOriginal;
termAtt = AddAttribute<ICharTermAttribute>();
posIncAttr = AddAttribute<IPositionIncrementAttribute>();
}
示例3: FilteringTokenFilter
public FilteringTokenFilter(Lucene.Net.Util.LuceneVersion version, bool enablePositionIncrements, TokenStream input)
: this(version, input)
{
posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
CheckPositionIncrement(version, enablePositionIncrements);
this.enablePositionIncrements = enablePositionIncrements;
}
示例4: FilteringTokenFilter
/// <summary>
/// Create a new <seealso cref="FilteringTokenFilter"/>. </summary>
/// <param name="version"> the Lucene match version </param>
/// <param name="in"> the <seealso cref="TokenStream"/> to consume </param>
public FilteringTokenFilter(LuceneVersion version, TokenStream @in)
: base(@in)
{
posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
this.version = version;
this.enablePositionIncrements = true;
}
示例5: CannedTokenizer
public CannedTokenizer(System.IO.TextReader reader, TokenAndPos[] tokens)
: base(reader)
{
this.tokens = tokens;
this.termAtt = AddAttribute<ICharTermAttribute>();
this.posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
}
示例6: MockTokenFilter
/// <summary>
/// Create a new MockTokenFilter.
/// </summary>
/// <param name="input"> TokenStream to filter </param>
/// <param name="filter"> DFA representing the terms that should be removed. </param>
public MockTokenFilter(TokenStream input, CharacterRunAutomaton filter)
: base(input)
{
this.Filter = filter;
TermAtt = AddAttribute<ICharTermAttribute>();
PosIncrAtt = AddAttribute<IPositionIncrementAttribute>();
}
示例7: CamelCaseFilter
public CamelCaseFilter(TokenStream stream)
: base(stream)
{
_termAttribute = AddAttribute<ITermAttribute>();
_offsetAttribute = AddAttribute<IOffsetAttribute>();
_positionIncrementAttribute = AddAttribute<IPositionIncrementAttribute>();
}
示例8: Init
void Init()
{
InitPanGuSegment();
termAtt = AddAttribute<ITermAttribute>();
offsetAtt = AddAttribute<IOffsetAttribute>();
posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
typeAtt = AddAttribute<ITypeAttribute>();
}
示例9: SynonymFilter
/// <summary>
///
/// </summary>
/// <remarks></remarks>
/// <seealso cref=""/>
/// <param name="input"></param>
/// <param name="synonymEngine"></param>
/// <return></return>
public SynonymFilter(TokenStream input, ISynonymEngine synonymEngine)
: base(input)
{
synonymStack = new Stack<String>();
this.engine = synonymEngine;
this.termAtt = AddAttribute<ITermAttribute>();
this.posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
}
示例10: GraphTokenizer
public GraphTokenizer(TextReader input)
: base(input)
{
TermAtt = AddAttribute<ICharTermAttribute>();
OffsetAtt = AddAttribute<IOffsetAttribute>();
PosIncrAtt = AddAttribute<IPositionIncrementAttribute>();
PosLengthAtt = AddAttribute<IPositionLengthAttribute>();
}
示例11: HunspellStemFilter
/// <summary>
/// Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using
/// affix rules in the provided HunspellDictionary.
/// </summary>
/// <param name="input">TokenStream whose tokens will be stemmed.</param>
/// <param name="dictionary">HunspellDictionary containing the affix rules and words that will be used to stem the tokens.</param>
/// <param name="dedup">true if only unique terms should be output.</param>
public HunspellStemFilter(TokenStream input, HunspellDictionary dictionary, Boolean dedup = true)
: base(input)
{
_posIncAtt = AddAttribute<IPositionIncrementAttribute>();
_termAtt = AddAttribute<ITermAttribute>();
_dedup = dedup;
_stemmer = new HunspellStemmer(dictionary);
}
示例12: SuggestStopFilter
/// <summary>
/// Sole constructor. </summary>
public SuggestStopFilter(TokenStream input, CharArraySet stopWords)
: base(input)
{
this.stopWords = stopWords;
this.termAtt = AddAttribute<ICharTermAttribute>();
this.posIncAtt = AddAttribute<IPositionIncrementAttribute>();
this.keywordAtt = AddAttribute<IKeywordAttribute>();
this.offsetAtt = AddAttribute<IOffsetAttribute>();
}
示例13: CannedBinaryTokenStream
public CannedBinaryTokenStream(params BinaryToken[] tokens)
: base()
{
this.Tokens = tokens;
TermAtt = AddAttribute<IBinaryTermAttribute>();
PosIncrAtt = AddAttribute<IPositionIncrementAttribute>();
PosLengthAtt = AddAttribute<IPositionLengthAttribute>();
OffsetAtt = AddAttribute<IOffsetAttribute>();
}
示例14: MockPayloadFilter
public MockPayloadFilter(TokenStream input, string fieldName)
: base(input)
{
this.FieldName = fieldName;
Pos = 0;
i = 0;
PosIncrAttr = input.AddAttribute<IPositionIncrementAttribute>();
PayloadAttr = input.AddAttribute<IPayloadAttribute>();
TermAttr = input.AddAttribute<ICharTermAttribute>();
}
示例15: ExpandAcronymsFilter
public ExpandAcronymsFilter(TokenStream input, IAcronymExpansionProvider acronymExpansionProvider)
: base(input)
{
_acronymExpansionProvider = acronymExpansionProvider;
_termAttribute = AddAttribute<ITermAttribute>();
_positionIncrementAttribute = AddAttribute<IPositionIncrementAttribute>();
_tokenSet = new Queue<string>();
_recognizedTokens = new HashSet<string>();
}