Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

最新的u2更新包,对于输入的utf8编码的句子仍然没有合并0结尾的量词。 #40

Closed
GoogleCodeExporter opened this issue Apr 7, 2016 · 12 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
辛苦了。
使用最新的u2更新包,对于输入的utf8编码的句子仍然没有合��
�0结尾的量词。
例子见下:
1.      [java]    64    66  |1丈|
     [java]    66    69  |三百克|
     [java]    69    72  |1公克|
     [java]    72    74  |5克|
     [java]    74    76  |10|
     [java]    76    77  |克|
     [java]    77    78  |向|
     [java]    78    80  |迭代|
     [java]    80    81  |最|
     [java]    81    84  |细粒度|
     [java]    84    86  |切分|
     [java]    86    88  |算法|
     [java]    88    94  |2000ml|
     [java]    96    99  |300|
     [java]    99   100  |克|
     [java]   101   104  |550|
     [java]   104   106  |毫升|
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.

Original issue reported on code.google.com by junli...@gmail.com on 16 Mar 2012 at 1:49

@GoogleCodeExporter
Copy link
Author

我本地测试没有发生你说的这样情况,这是我这边的测试结��
�


$$  0-2 : 1丈 :    CN_QUAN
$$  2-5 : 三百克 :   CN_QUAN
$$  5-8 : 1公克 :     CN_QUAN
$$  8-10 : 5克 :   CN_QUAN
$$  10-13 : 10克 :     CN_QUAN
$$  13-14 : 向 :   CN_WORD
$$  14-16 : 迭代 :    CN_WORD
$$  16-17 : 最 :   CN_WORD
$$  17-20 : 细粒度 :     CN_WORD
$$  20-22 : 切分 :    CN_WORD
$$  22-24 : 算法 :    CN_WORD
$$  24-30 : 2000ml :    LETTER
$$  32-36 : 300克 :    CN_QUAN
$$  37-42 : 550毫升 :     CN_QUAN

Original comment by linliang...@gmail.com on 16 Mar 2012 at 2:28

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

我的win7  & linux 下都是这样。 使用ant运行。 
但是应该关系不大。

我的build.xml 见下。 
顺便可以附加到项目里,方便各类环境下编译。

Original comment by junli...@gmail.com on 16 Mar 2012 at 3:03

Attachments:

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

我回持续关注这个问题,并继续获取其他用户的反馈!

顺便提醒,你是否使用了IK分词的smart模式,非smart模式的数��
�和量词是分开的。

Original comment by linliang...@gmail.com on 16 Mar 2012 at 9:14

@GoogleCodeExporter
Copy link
Author

ant 编译的就有问题。
如果是 eclipse 的鼠标右键 run As application 
就没有问题,合并到一起了。
奇怪。

Original comment by junli...@gmail.com on 16 Mar 2012 at 9:41

@GoogleCodeExporter
Copy link
Author

代码是 smart 模式。 
编译处理的为啥不一样的呢?

        Analyzer analyzer 
            = new IKAnalyzer(true);
        AnalyzerTokenizerFactory tokFact = new AnalyzerTokenizerFactory(analyzer,"foo");

Original comment by junli...@gmail.com on 16 Mar 2012 at 9:42

@GoogleCodeExporter
Copy link
Author

   61    63  |算法|
   64    66  |1丈|
   66    69  |三百克|
   69    72  |1公克|
   72    74  |5克|
   74    77  |10克|
   77    78  |向|
   78    80  |迭代|
   80    81  |最|
   81    84  |细粒度|
   84    86  |切分|
   86    88  |算法|
   88    94  |2000ml|
   96   100  |300克|
  101   106  |550毫升|
这是正常的用eclipse的鼠标右键运行时得到的结果。

Original comment by junli...@gmail.com on 16 Mar 2012 at 9:44

@GoogleCodeExporter
Copy link
Author

补充一下。  我的.java文件是 utf8编码的。
ant编译时,也是添加了 utf8的编译选项。
    <javac debug="yes"
           debuglevel="source,lines,vars"
           destdir="build/classes"
           includeantruntime="false">
      <compilerarg value="-Xlint:all"/>
      <compilerarg line="-encoding UTF-8"/>

Original comment by junli...@gmail.com on 21 Mar 2012 at 6:49

@GoogleCodeExporter
Copy link
Author

智能切分模式下,[20千克]可以分成一个词,[20公斤]却不能分
成一个词,这是为什么?(千克、公斤都已经添加入量词词��
�)

Original comment by PEAKWang...@gmail.com on 9 Aug 2012 at 7:49

@GoogleCodeExporter
Copy link
Author

原文: 我卖了20公斤水果
—————————————————————— 
我 | 卖了 | 20公斤 | 水果 | 

这个是我的本地测试结果!!

基于上述问题,我将持续收集跟进

Original comment by linliang...@gmail.com on 10 Aug 2012 at 2:08

@GoogleCodeExporter
Copy link
Author

分词信息都会在控制台打印出来,请问这个能去掉吗,应该��
�么设置呢。

Original comment by 214191...@qq.com on 7 Sep 2012 at 2:45

@GoogleCodeExporter
Copy link
Author

Comment 11 by 214191776@qq.com, Sep 6, 2012
分词信息都会在控制台打印出来,请问这个能去掉吗,应该��
�么设置呢。

你用的是那个版本啊,IK不会将分词都打印出来啊,那样严重
影响效率的,减低100倍不止的

Original comment by linliang...@gmail.com on 11 Jan 2013 at 2:52

  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant