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


C# StandardTokenizer.SetMaxTokenLength方法代码示例

本文整理汇总了C#中Lucene.Net.Analysis.Standard.StandardTokenizer.SetMaxTokenLength方法的典型用法代码示例。如果您正苦于以下问题:C# StandardTokenizer.SetMaxTokenLength方法的具体用法?C# StandardTokenizer.SetMaxTokenLength怎么用?C# StandardTokenizer.SetMaxTokenLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lucene.Net.Analysis.Standard.StandardTokenizer的用法示例。


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

示例1: TokenStream

		/// <summary>Constructs a {@link StandardTokenizer} filtered by a {@link
		/// StandardFilter}, a {@link LowerCaseFilter} and a {@link StopFilter}. 
		/// </summary>
		public override TokenStream TokenStream(System.String fieldName, System.IO.TextReader reader)
		{
			StandardTokenizer tokenStream = new StandardTokenizer(reader, replaceInvalidAcronym);
			tokenStream.SetMaxTokenLength(maxTokenLength);
			TokenStream result = new StandardFilter(tokenStream);
			result = new LowerCaseFilter(result);
			if (useDefaultStopPositionIncrements)
			{
				result = new StopFilter(result, stopSet);
			}
			else
			{
				result = new StopFilter(enableStopPositionIncrements, result, stopSet);
			}
			return result;
		}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:19,代码来源:StandardAnalyzer.cs

示例2: TokenStream

			public override TokenStream TokenStream(string fieldName, TextReader reader)
			{
				var tokenizer = new StandardTokenizer(Version.LUCENE_29, reader);
				tokenizer.SetMaxTokenLength(255);
				TokenStream filter = new StandardFilter(tokenizer);
				filter = new LowerCaseFilter(filter);
				filter = new StopFilter(false,filter, StandardAnalyzer.STOP_WORDS_SET);
				return new NGramTokenFilter(filter, 2, 6);
			}
开发者ID:neiz,项目名称:ravendb,代码行数:9,代码来源:NGramSearch.cs

示例3: TokenStream

 /// <summary>Constructs a {@link StandardTokenizer} filtered by a {@link
 /// StandardFilter}, a {@link LowerCaseFilter} and a {@link StopFilter}. 
 /// </summary>
 public override TokenStream TokenStream(System.String fieldName, System.IO.TextReader reader)
 {
     StandardTokenizer tokenStream = new StandardTokenizer(reader, replaceInvalidAcronym);
     tokenStream.SetMaxTokenLength(maxTokenLength);
     TokenStream result = new StandardFilter(tokenStream);
     result = new LowerCaseFilter(result);
     result = new StopFilter(result, stopSet);
     return result;
 }
开发者ID:cqm0609,项目名称:lucene-file-finder,代码行数:12,代码来源:StandardAnalyzer.cs


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