Conversation
Find synonyms
bact
requested changes
Dec 12, 2023
Member
bact
left a comment
There was a problem hiding this comment.
We should as much as possible trying to avoid Union/multiple types for return.
It made type checking more difficult.
bact
reviewed
Dec 12, 2023
Member
Author
|
@bact Fixed |
bact
approved these changes
Dec 12, 2023
|
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 |
|
Member
Author
|
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("สุดา"))
['กระลาพิม', 'กระลาศรี', 'กัญญา', 'กันยา', 'กันย์', 'กัลยา', 'กัลยาณี', 'กานดา', 'กามินี', 'จอมขวัญ', 'จอมใจ', 'ฉัยยา', 'ชารี', 'ดนยา', 'ดรุณี', 'ดวงสมร', 'ถี', 'ทรามวัย', 'ทรามสงวน', 'ทรามสวาท', 'ทรามเชย', 'ธิดา', 'นงคราญ', 'นงพะงา', 'นงพาล', 'นงพุธ', 'นงราม', 'นงลักษณ์', 'นงเยาว์', 'นงโพธ', 'นรี', 'นารี', 'นาเรศ', 'นิรมล', 'บังอร', 'บุตรี', 'ผู้หญิง', 'พธู', 'พนิดา', 'พุ่มพวง', 'ภีรุ', 'มาณวิกา', 'มาตุคาม', 'มารศรี', 'ยุพดี', 'ยุพยง', 'ยุพา', 'ยุพาน', 'ยุพาพาล', 'ยุพาพิน', 'ยุพิน', 'ยุพเยาว์', 'ยุพเรศ', 'ยุวดี', 'รมณี', 'ร้อยชั่ง', 'ลลนา', 'ลูกสาว', 'วธู', 'วนิดา', 'วรดนู', 'สตรี', 'สมร', 'สะคราญ', 'สายสมร', 'สุดา', 'อนงค์', 'อร', 'อรทัย', 'อรนุช', 'อังคณา', 'อิตถี', 'อิสตรี', 'อิสัตรี', 'เยาวพา', 'เยาวมาลย์', 'เยาวลักษณ์', 'เยาวเรศ', 'แก้วตา', 'โฉมตรู', 'ไฉยา'] |
Member
|
So it will return synonyms of synonyms of the input word? |
Member
Author
Yes |
Member
|
Noted as an expected behavior. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.