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

fix:修复CWSEvaluator比较切分语句时的计算错误 #1853

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

webSue
Copy link
Contributor

@webSue webSue commented Oct 19, 2023

fix:修复CWSEvaluator比较切分语句时的计算错误

Description

CWSEvaluator类中的compare方法比较标准答案与分词结果时,循环逐一比较词语时,predLen的计算存在错误,增加了另一个数组的对应index位置词语的长度,而不是predArray本身数组的

Type of Change

Please check any relevant options and delete the rest.

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

运行CWSEvaluatorTest的testGetPRF()方法debug即可

Checklist

Check all items that apply.

  • ⚠️Changes must be made on dev branch instead of master
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings

@hankcs hankcs merged commit 4ac13f1 into hankcs:1.x Oct 20, 2023
@hankcs
Copy link
Owner

hankcs commented Oct 20, 2023

感谢指正!

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

Successfully merging this pull request may close these issues.

2 participants