-
Notifications
You must be signed in to change notification settings - Fork 273
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
crfcut: Ensure splitting of sentences using Terminal Punctuation #905
crfcut: Ensure splitting of sentences using Terminal Punctuation #905
Conversation
Crfcut creating issues for split using terminal punctuation commonly '.' (full stop) which should be treated as end of the sentence, Modified the function such that it should split using terminal punctuations and avoid any kind of empty strings.
Hello @varunkatiyar819! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-04-03 07:51:42 UTC |
Formatting checks handled
Removed redundant brackets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It look great!
This pull request change crfcut.
Before
>>> sent_tokenize("สวัสดีชาวโลก. \n โลกนี้เต็มไปด้วยความลึกลับ")
['สวัสดีชาวโลก. \n โลกนี้เต็มไปด้วยความลึกลับ']
>>> sent_tokenize("สวัสดีชาวโลก! \n โลกนี้เต็มไปด้วยความลึกลับ")
['สวัสดีชาวโลก! \n โลกนี้เต็มไปด้วยความลึกลับ']
After
>>> sent_tokenize("สวัสดีชาวโลก. \n โลกนี้เต็มไปด้วยความลึกลับ")
['สวัสดีชาวโลก.', ' \n โลกนี้เต็มไปด้วยความลึกลับ']
>>> sent_tokenize("สวัสดีชาวโลก! \n โลกนี้เต็มไปด้วยความลึกลับ")
['สวัสดีชาวโลก!', ' \n โลกนี้เต็มไปด้วยความลึกลับ']
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It look the test is break. Can you fix? @varunkatiyar819
['ฉันไปโรงเรียน เธอไปโรงพยาบาล'] != ['ฉันไปโรงเรียน ', 'เธอไปโรงพยาบาล']
Modified the logic for splitting of sentences due to empty strings or spaces.
Quality Gate passedIssues Measures |
Logic for the Code is been modified and tested as well. Please do have a check. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Crfcut creating issues for split using terminal punctuation commonly '.' (full stop) which should be treated as end of the sentence, Modified the function such that it should split using terminal punctuations and avoid any kind of empty strings.
What does this changes
Brief summary of the changes
What was wrong
Description of what was the root cause of the issue.
How this fixes it
Description of how the changes fix the issue.
Fixes #904
Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.