lucence .net 3.0 测试分词的方法
来源:互联网 发布:苏享茂 知乎 编辑:程序博客网 时间:2024/05/21 11:37
Analyzer aStandardAnalyzer = new CJKAnalyzer(Lucene.Net.Util.Version.LUCENE_CURRENT);
TokenStream ts = aStandardAnalyzer.TokenStream("", new System.IO.StringReader("密云的门票"));
ITermAttribute termAtt = ts.GetAttribute<ITermAttribute>();
while (ts.IncrementToken())
{
Console.WriteLine(termAtt.Term);
}
TokenStream ts = aStandardAnalyzer.TokenStream("", new System.IO.StringReader("密云的门票"));
ITermAttribute termAtt = ts.GetAttribute<ITermAttribute>();
while (ts.IncrementToken())
{
Console.WriteLine(termAtt.Term);
}
Console.Read();
lucence .net 3.0 如果想使用CJKAnalyzer 二元分词需要引入 Lucene.Net.Contrib.Analyzers.dll
只用代码中
using Lucene.Net.Analysis.CJK;
- lucence .net 3.0 测试分词的方法
- 输出Lucence的分词信息
- 基于Lucence的同义词分词器
- Lucence自定义分词器
- lucence分词器
- Lucence .net 参数说明
- 分词器的测试
- Lucence的基本原理
- Lucence索引的存储
- Lucence的各种查询
- Lucence的见解
- lucence
- lucence
- lucence
- lucence
- lucence
- Lucence
- Lucence
- src目录下的包由文件夹恢复成包的方法
- 黑马程序员-javaSE学习之语言基础细节详解
- 页面加载Loading
- 2.30 Constructing and Displaying Styled Texts
- Android 开发中的多线程编程技术(例子:计时器)
- lucence .net 3.0 测试分词的方法
- JavaSE_网络编程_TCP_练习2_文本文件
- 导入junit4.11.jar包进行单元测试报错的解决方法
- java清除字符串中的html标签
- 生命周期
- VC++ Runtime Error 异常捕获之不挂的程序
- Android: NDK编程入门笔记
- oracle sqlserver mysql随机行
- CATransition的动画效果类型及实现方法