zhangmt / jcseg

Automatically exported from code.google.com/p/jcseg
0 stars 0 forks source link

请问对于IP地址的分词有如下的要求怎么做到?(已解决) #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. IP地址或者MAC地址:如192.161.1.11 或 abc:13ab:2132:1fabc
2. 
想通过IP地址或MAC地址的一部分就能搜索到文档,如:192/192./192.
161/192.161.都能搜到192.161.1.11 相关的文档;

请问怎么配置才能做到?谢谢!

Original issue reported on code.google.com by china...@gmail.com on 29 Mar 2014 at 4:17

GoogleCodeExporter commented 9 years ago
首先请使用最新版本的Jcseg-1.9.3:下载地址已经放到了SF:http
://sourceforge.net/projects/jcseg/

不用配置就能实现的:

jcseg>> 192.161.1.11
分词结果:
192/en 161/en 11/en 192.161.1.11/en
Done, total:12, split:4, cost: 0.00000sec(less than)

对于基于倒排文档的索引:对于上面的例子:检索切分出来��
�任何一部分都可以检索的到。

至于想实现检索‘1’也拿到结果需要配置:jcseg.stokenminlen = 
1来将1也作为切分结果,不过不建议这么做,会在索引中产生
很多无用的索引信息,毕竟包含1的文档太多了,而且没有检�
��意义。

Best
--lionsoul

Original comment by chenxin6...@gmail.com on 30 Mar 2014 at 10:41