-
Notifications
You must be signed in to change notification settings - Fork 356
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
Fixes from the code review on 11/17 #147
Conversation
conceptnet5/readers/cc_cedict.py
Outdated
|
||
# Remove 'lit.', 'fig.' | ||
definition = LIT_FIG_REGEX.sub('', definition) | ||
|
||
# Expand sth and sb | ||
definition = definition.replace('sth', 'something') | ||
definition = definition.replace('sb', 'someone') | ||
definition = definition.replace(' sth ', 'something') |
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.
I think this would fail for two reasons. It doesn't match words at the end of the definition, and it deletes the spaces surrounding the word.
This would convert the definition "to give sth to sb" to "to givesomethingto sb".
@@ -230,3 +206,4 @@ | |||
/c/tr/test /c/en/test 0.25 /d/wiktionary/en /r/EtymologicallyRelatedTo | |||
/c/tr/test /c/en/test 1.0 /d/wiktionary/de /r/Synonym | |||
/c/tr/test /c/en/test 1.0 /d/wiktionary/en /r/RelatedTo | |||
/c/zh/馬口鐵 /c/zh/马口铁 1.0 /d/cc_cedict /r/Synonym |
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.
Can we have a cedict test involving fixing "sth" in a definition?
Includes: