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

Fixes from the code review on 11/17 #147

Merged
merged 11 commits into from
Dec 1, 2017
Merged

Conversation

jlowryduda
Copy link
Contributor

Includes:

  • changes to CEDICT reader, including adding tests
  • changes to emoji reader
  • additional documentation for BATS analogy


# 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')
Copy link
Member

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
Copy link
Member

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?

@rspeer rspeer merged commit 21d7fab into master Dec 1, 2017
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