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

Using Spacy instead of Jieba for chinese text segmentation #114

Conversation

ahmednasserswe
Copy link
Contributor

Description

Using Spacy instead of Jieba for Chinese text segmentation

Reference: CV2-5247

How has this been tested?

Locally and added unittests

Are there any external dependencies?

Spacy

test_text = '''哈里斯同意与特朗普再进行一次美大选辩论'''
expected = "哈里 里斯 哈里斯 同意 与 特朗普 再 进行 一次 美 大选 辩论"
self.assertEqual(self.yake_model.run_chinese_segmentation_with_jieba(test_text), expected)
expected = "哈里斯 同意 与 特朗 普再 进行 一 次 美 大选 辩论"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add tests with some of the examples I provided where jieba was giving multiple terms?

@skyemeedan
Copy link
Contributor

skyemeedan commented Oct 11, 2024

The code for switching over looks fine, but I wouldn't want to merge it in yet unless we've done some sort of comparison (perhaps you already did?). We could dump some example text from piyaoba workspace and compare results side by side? Edit: I see there is already a notebook linked on the ticket, so maybe extend that with results for some sample text side by side?

@ahmednasserswe ahmednasserswe deleted the CV2-5247-support-yake-keyword-extraction-for-chinese branch October 18, 2024 14:54
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