You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
但是我做了这个改动以后发现会一直循环在最后一个“非”不和谐词里面, 比如
it 'should find harmonious chinese words' do
HarmoniousDictionary.clean?('李XX在中国').should == false
end
这个case就是会一直在“在” 那里循环。。。
The text was updated successfully, but these errors were encountered:
#2 带来一个新的问题, 使用说明里面的字典, 如果在Spec加入这个case, 会失败。
原因是因为 rseg.rb 的第87行 word = '' if engine.class == English && !@english_dictionary.include?(word) , 第一个engine把word覆盖成“代开普通发票”, 第二个又把结果覆盖成""
等到了下面check no match的时候, 就已经找不到这个词了。
revert掉这个patch就可以pass这个case
因为两个engine的结果应该是有可能互相覆盖的, 所以最好nomatch 和 word的结果应该用存在一个dict里面, 各保持各得。
但是我做了这个改动以后发现会一直循环在最后一个“非”不和谐词里面, 比如
it 'should find harmonious chinese words' do
HarmoniousDictionary.clean?('李XX在中国').should == false
end
这个case就是会一直在“在” 那里循环。。。
The text was updated successfully, but these errors were encountered: