Skip to content

Commit 759c5ae

Browse files
committed
Softening the new rule.
https://universaldependencies.org/u/overview/syntax.html#function-word-modifiers admits that some function words can be modified by light adverbials. The example there that involves a "det" parent of an "advmod" is negation, for which we have a separate exception earlier in this function, but perhaps other advmods may be valid, too.
1 parent 1e4debd commit 759c5ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,7 @@ def validate_functional_leaves(id, tree):
17311731
testid = 'leaf-aux-cop'
17321732
testmessage = "'%s' not expected to have children (%s:%s:%s --> %s:%s:%s)" % (pdeprel, idparent, tree['nodes'][idparent][FORM], pdeprel, idchild, tree['nodes'][idchild][FORM], cdeprel)
17331733
warn(testmessage, testclass, testlevel, testid, nodeid=id, lineno=tree['linenos'][idchild])
1734-
if re.match(r"^(det|clf)$", pdeprel) and not re.match(r"^(goeswith|fixed|reparandum|conj|cc|punct)$", cdeprel):
1734+
if re.match(r"^(det|clf)$", pdeprel) and not re.match(r"^(advmod|obl|goeswith|fixed|reparandum|conj|cc|punct)$", cdeprel):
17351735
testid = 'leaf-det-clf'
17361736
testmessage = "'%s' not expected to have children (%s:%s:%s --> %s:%s:%s)" % (pdeprel, idparent, tree['nodes'][idparent][FORM], pdeprel, idchild, tree['nodes'][idchild][FORM], cdeprel)
17371737
warn(testmessage, testclass, testlevel, testid, nodeid=id, lineno=tree['linenos'][idchild])

0 commit comments

Comments
 (0)