Skip to content

Commit

Permalink
Since we now have ExtPos, no need to skip rel-upos-advmod for fixed e…
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-zeman committed Nov 18, 2024
1 parent 41d4807 commit 556e0fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,8 +1493,9 @@ def validate_upos_vs_deprel(id, tree):
# Nevertheless, we should allow adjectives because they can be used as adverbs in some languages.
# https://github.com/UniversalDependencies/docs/issues/617#issuecomment-488261396
# Bohdan reports that some DET can modify adjectives in a way similar to ADV.
# I am not sure whether advmod is the best relation for them but the alternative det is not much better, so maybe we should not enforce it. Adding DET to the tolerated UPOS tags.
if deprel == 'advmod' and not re.match(r"^(ADV|ADJ|CCONJ|DET|PART|SYM)", upos) and not 'fixed' in childrels and not 'goeswith' in childrels:
# I am not sure whether advmod is the best relation for them but the alternative
# det is not much better, so maybe we should not enforce it. Adding DET to the tolerated UPOS tags.
if deprel == 'advmod' and not re.match(r"^(ADV|ADJ|CCONJ|DET|PART|SYM)", upos) and not 'goeswith' in childrels:
testid = 'rel-upos-advmod'
testmessage = "'advmod' should be 'ADV' but it is '%s'" % (upos)
warn(testmessage, testclass, testlevel, testid, nodeid=id, lineno=tree['linenos'][id])
Expand Down

0 comments on commit 556e0fe

Please sign in to comment.