-
Notifications
You must be signed in to change notification settings - Fork 274
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
Add pythainlp.corpus.find_synonyms #890
Conversation
Find synonyms
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.
We should as much as possible trying to avoid Union/multiple types for return.
It made type checking more difficult.
@bact Fixed |
Hello @wannaphong! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2023-12-12 13:51:45 UTC |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Ok. I'm fixed about it will only return the first occurrence set of synonyms. >>> from pythainlp.corpus import find_synonyms
>>> print(find_synonyms("ลูกสาว"))
['ดนยา', 'ธิดา', 'บุตรี', 'สุดา']
>>> print(find_synonyms("สุดา"))
['กระลาพิม', 'กระลาศรี', 'กัญญา', 'กันยา', 'กันย์', 'กัลยา', 'กัลยาณี', 'กานดา', 'กามินี', 'จอมขวัญ', 'จอมใจ', 'ฉัยยา', 'ชารี', 'ดนยา', 'ดรุณี', 'ดวงสมร', 'ถี', 'ทรามวัย', 'ทรามสงวน', 'ทรามสวาท', 'ทรามเชย', 'ธิดา', 'นงคราญ', 'นงพะงา', 'นงพาล', 'นงพุธ', 'นงราม', 'นงลักษณ์', 'นงเยาว์', 'นงโพธ', 'นรี', 'นารี', 'นาเรศ', 'นิรมล', 'บังอร', 'บุตรี', 'ผู้หญิง', 'พธู', 'พนิดา', 'พุ่มพวง', 'ภีรุ', 'มาณวิกา', 'มาตุคาม', 'มารศรี', 'ยุพดี', 'ยุพยง', 'ยุพา', 'ยุพาน', 'ยุพาพาล', 'ยุพาพิน', 'ยุพิน', 'ยุพเยาว์', 'ยุพเรศ', 'ยุวดี', 'รมณี', 'ร้อยชั่ง', 'ลลนา', 'ลูกสาว', 'วธู', 'วนิดา', 'วรดนู', 'สตรี', 'สมร', 'สะคราญ', 'สายสมร', 'สุดา', 'อนงค์', 'อร', 'อรทัย', 'อรนุช', 'อังคณา', 'อิตถี', 'อิสตรี', 'อิสัตรี', 'เยาวพา', 'เยาวมาลย์', 'เยาวลักษณ์', 'เยาวเรศ', 'แก้วตา', 'โฉมตรู', 'ไฉยา'] |
So it will return synonyms of synonyms of the input word? |
Yes |
Noted as an expected behavior. |
Add pythainlp.corpus.find_synonyms for find synonyms.
From Add thai_synonym #825
Example
Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.