Handle standalone past verbs tagged as participles
This commit is contained in:
+5
-1
@@ -80,6 +80,10 @@ class Encoder:
|
||||
clauses = []
|
||||
proposals = []
|
||||
for sentence in doc.sents:
|
||||
content = [token.i for token in sentence if not token.is_space]
|
||||
if not content:
|
||||
continue
|
||||
sentence = doc[content[0]:content[-1] + 1]
|
||||
match = self._causal_marker(sentence)
|
||||
if match is None:
|
||||
continue
|
||||
@@ -112,7 +116,7 @@ class Encoder:
|
||||
or not marker.i < verb.i < end
|
||||
or sentence.root.pos_ != "VERB"
|
||||
or verb.pos_ != "VERB"
|
||||
or sentence.root.tag_ != "VBD"
|
||||
or sentence.root.tag_ not in {"VBD", "VBN"}
|
||||
or verb.tag_ != "VBD"
|
||||
or any(token.is_punct or token.is_space for token in sentence[:-1])
|
||||
or any(token.dep_ in {"neg", "aux", "conj"} for token in sentence)
|
||||
|
||||
Reference in New Issue
Block a user