当前位置: 首页>>代码示例>>C#>>正文


C# IOffsetAttribute类代码示例

本文整理汇总了C#中IOffsetAttribute的典型用法代码示例。如果您正苦于以下问题:C# IOffsetAttribute类的具体用法?C# IOffsetAttribute怎么用?C# IOffsetAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IOffsetAttribute类属于命名空间,在下文中一共展示了IOffsetAttribute类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Init

		private void  Init(int bufferSize)
		{
			this.done = false;
            termAtt = AddAttribute<ITermAttribute>();
            offsetAtt = AddAttribute<IOffsetAttribute>();
			termAtt.ResizeTermBuffer(bufferSize);
		}
开发者ID:mindis,项目名称:Transformalize,代码行数:7,代码来源:KeywordTokenizer.cs

示例2: CamelCaseFilter

 public CamelCaseFilter(TokenStream stream)
     : base(stream)
 {
     _termAttribute = AddAttribute<ITermAttribute>();
     _offsetAttribute = AddAttribute<IOffsetAttribute>();
     _positionIncrementAttribute = AddAttribute<IPositionIncrementAttribute>();
 }
开发者ID:NuGet,项目名称:Entropy,代码行数:7,代码来源:CamelCaseFilter.cs

示例3: IKTokenizer

        ///<summary>
        ///Lucene Tokenizer适配器类构造函数
        /// </summary>
        /// <param name="isMaxWordLength">当为true时,分词器进行最大词长切分;当为false是,采用最细粒度切分</param>
        public IKTokenizer(TextReader inreader, bool isMaxWordLength)
            : base(inreader)
        {
			offsetAtt = AddAttribute<IOffsetAttribute>();
            termAtt = AddAttribute<ITermAttribute>();
            _IKImplement = new IKSegmentation(inreader, isMaxWordLength);
        }
开发者ID:mamboer,项目名称:IKAnalyzer.Net,代码行数:11,代码来源:IKTokenizer.cs

示例4: Init

 void Init()
 {
     InitPanGuSegment();
     termAtt = AddAttribute<ITermAttribute>();
     offsetAtt = AddAttribute<IOffsetAttribute>();
     posIncrAtt = AddAttribute<IPositionIncrementAttribute>();
     typeAtt = AddAttribute<ITypeAttribute>();
 }
开发者ID:alinote,项目名称:Lucene.Net.Analysis.PanGu,代码行数:8,代码来源:PanGuTokenizer.cs

示例5: CutLeterDigitFilter

 public CutLeterDigitFilter(TokenStream input)
     : base(input)
 {
     reusableToken = new Token();
     termAtt = AddAttribute<ITermAttribute>();
     offsetAtt = AddAttribute<IOffsetAttribute>();
     typeAtt = AddAttribute<ITypeAttribute>();
 }
开发者ID:vebin,项目名称:Lucene.Net.Analysis.MMSeg,代码行数:8,代码来源:CutLeterDigitFilter.cs

示例6: Init

        void Init(string content)
        {
            _enumerationPositions = _aufzaehlungDetector.FindAufzaehlungsspans(content).ToArray();
            _offsetAttribute = AddAttribute<IOffsetAttribute>();
            _flagsAttribute = AddAttribute<IFlagsAttribute>();

            _isInitialized = true;
        }
开发者ID:CKrowiorsch,项目名称:lucene-zealous,代码行数:8,代码来源:ContextTokenizer.cs

示例7: GraphTokenizer

 public GraphTokenizer(TextReader input)
     : base(input)
 {
     TermAtt = AddAttribute<ICharTermAttribute>();
     OffsetAtt = AddAttribute<IOffsetAttribute>();
     PosIncrAtt = AddAttribute<IPositionIncrementAttribute>();
     PosLengthAtt = AddAttribute<IPositionLengthAttribute>();
 }
开发者ID:joyanta,项目名称:lucene.net,代码行数:8,代码来源:TestGraphTokenizers.cs

示例8: MMSegTokenizer

 /*
  * 此处忽略调用base(input);因调用后input的position会被移动
  * by zh
  */
 public MMSegTokenizer(Seg seg, TextReader input)
     : base(input)
 {
     mmSeg = new MMSeg(input, seg);
     termAtt = AddAttribute<ITermAttribute>();
     offsetAtt = AddAttribute<IOffsetAttribute>();
     typeAtt = AddAttribute<ITypeAttribute>();
 }
开发者ID:vebin,项目名称:Lucene.Net.Analysis.MMSeg,代码行数:12,代码来源:MMSegTokenizer.cs

示例9: 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>();
 }
开发者ID:ChristopherHaws,项目名称:lucenenet,代码行数:11,代码来源:SuggestStopFilter.cs

示例10: CannedBinaryTokenStream

 public CannedBinaryTokenStream(params BinaryToken[] tokens)
     : base()
 {
     this.Tokens = tokens;
     TermAtt = AddAttribute<IBinaryTermAttribute>();
     PosIncrAtt = AddAttribute<IPositionIncrementAttribute>();
     PosLengthAtt = AddAttribute<IPositionLengthAttribute>();
     OffsetAtt = AddAttribute<IOffsetAttribute>();
 }
开发者ID:Cefa68000,项目名称:lucenenet,代码行数:9,代码来源:CannedBinaryTokenStream.cs

示例11: Init

        private void Init(System.IO.TextReader _input, HebMorph.DataStructures.DictRadix<int> _prefixesTree)
        {
			termAtt = AddAttribute <ITermAttribute>();
			offsetAtt = AddAttribute <IOffsetAttribute>();
            //posIncrAtt = (PositionIncrementAttribute)AddAttribute(typeof(PositionIncrementAttribute));
			typeAtt = AddAttribute <ITypeAttribute>();
        	input = _input;
            hebMorphTokenizer = new HebMorph.Tokenizer(_input);
            prefixesTree = _prefixesTree;
        }
开发者ID:doronuziel71,项目名称:HebMorph,代码行数:10,代码来源:HebrewTokenizer.cs

示例12: JiebaTokenizer

        public JiebaTokenizer(JiebaSegmenter seg, string input)
        {
            segmenter = seg;
            termAtt = AddAttribute<ITermAttribute>();
            offsetAtt = AddAttribute<IOffsetAttribute>();
            typeAtt = AddAttribute<ITypeAttribute>();

            var text = input;
            tokens = segmenter.Tokenize(text, TokenizerMode.Search).ToList();
        }
开发者ID:applenele,项目名称:SmallCode,代码行数:10,代码来源:JiebaTokenizer.cs

示例13: CommonGramsFilter

 /// <summary>
 /// 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 .
 /// </summary>
 /// <param name="input"> TokenStream input in filter chain </param>
 /// <param name="commonWords"> The set of common words. </param>
 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;
 }
开发者ID:Cefa68000,项目名称:lucenenet,代码行数:18,代码来源:CommonGramsFilter.cs

示例14: IterTokenStream

 public IterTokenStream(params Token[] tokens)
         : base()
 {
     this.tokens = tokens;
     this.termAtt = AddAttribute<ICharTermAttribute>();
     this.offsetAtt = AddAttribute<IOffsetAttribute>();
     this.posIncAtt = AddAttribute<IPositionIncrementAttribute>();
     this.flagsAtt = AddAttribute<IFlagsAttribute>();
     this.typeAtt = AddAttribute<ITypeAttribute>();
     this.payloadAtt = AddAttribute<IPayloadAttribute>();
 }
开发者ID:ChristopherHaws,项目名称:lucenenet,代码行数:11,代码来源:TestTrimFilter.cs

示例15: ThaiTokenizer

 /// <summary>
 /// Creates a new ThaiTokenizer, supplying the AttributeFactory </summary>
 public ThaiTokenizer(AttributeFactory factory, TextReader reader)
       : base(factory, reader, BreakIterator.CreateSentenceInstance(Locale.GetUS()))
 {
     if (!DBBI_AVAILABLE)
     {
         throw new System.NotSupportedException("This JRE does not have support for Thai segmentation");
     }
     wordBreaker = new ThaiWordBreaker(BreakIterator.CreateWordInstance(Locale.GetUS()));
     termAtt = AddAttribute<ICharTermAttribute>();
     offsetAtt = AddAttribute<IOffsetAttribute>();
 }
开发者ID:ChristopherHaws,项目名称:lucenenet,代码行数:13,代码来源:ThaiTokenizer.cs


注:本文中的IOffsetAttribute类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。