Match causal clauses independently of punctuation attachment
Verify syntax DAG / verify (push) Failing after 13s
Verify syntax DAG / verify (push) Failing after 13s
This commit is contained in:
+2
-1
@@ -118,7 +118,8 @@ class Encoder:
|
||||
or any(token.dep_ in {"neg", "aux", "conj"} for token in sentence)
|
||||
or not any(child.dep_ == "nsubj" for child in sentence.root.children)
|
||||
or not any(child.dep_ == "nsubj" for child in verb.children)
|
||||
or {token.i for token in verb.subtree} != set(range(marker.i, end))
|
||||
or {token.i for token in verb.subtree if not token.is_punct}
|
||||
!= set(range(marker.i, end))
|
||||
):
|
||||
return None
|
||||
return marker, end
|
||||
|
||||
Reference in New Issue
Block a user