Skip to content

Commit aa30a54

Browse files
committed
ud.MarkBugs allows unlimited number of nsubj:outer children
Multiple subjects should be still marked as bugs, but outer subjects (nsubj:outer and csubj:outer) are an exception from this rule. The [guidelines](https://universaldependencies.org/u/dep/nsubj-outer.html) do not give any restriction on the maximal number of [nc]subj:outer children and it seems that we could have sentences like The problem is that the title is Some Like It Hot. Fixes #117
1 parent b27a213 commit aa30a54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

udapi/block/ud/markbugs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ def process_node(self, node):
131131
self.log(node, 'degree-upos',
132132
'Degree=%s upos!=ADJ|ADV (but %s)' % (feats['Degree'], upos))
133133

134-
subject_children = [n for n in node.children if 'subj' in n.udeprel]
134+
subject_children = [n for n in node.children if 'subj' in n.udeprel and n.sdeprel != 'outer']
135135
if len(subject_children) > 1:
136-
self.log(node, 'multi-subj', 'More than one [nc]subj(:pass)? child')
136+
self.log(node, 'multi-subj', 'More than one (non-outer) [nc]subj child')
137137

138138
object_children = [n for n in node.children if n.udeprel in ('obj', 'ccomp')]
139139
if len(object_children) > 1:

0 commit comments

Comments
 (0)