Skip to content

Commit

Permalink
Wikt reader: explain why we specifically throw out '-'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Speer committed Jan 5, 2018
1 parent 3197cc1 commit 703099f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions conceptnet5/readers/wiktionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ def transform_relation(rel):

def transform_term(data_language, termdata, assumed_languages, db, use_etyms=True):
text = termdata['text']

# Sometimes - is used to fill a slot in a Wiktionary template where the
# term would usually be. It typically means "don't show this part", with
# the implication "the term in question is obvious from context".
#
# Context is hard, so let's just cope with a hyphen as the term by
# discarding it.
if text == '-':
return None
language = termdata.get('language')
Expand Down

0 comments on commit 703099f

Please sign in to comment.