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:
@@ -21,6 +21,10 @@ class SyntaxDAGTest(unittest.TestCase):
|
||||
def test_causal_commit(self):
|
||||
text = "The road flooded because it rained. They waited."
|
||||
graph = self.encoder.encode(text)
|
||||
self.assertEqual(len(graph.proposals), 1, [
|
||||
(token.text, token.head.text, token.dep_, token.pos_, token.tag_)
|
||||
for token in self.encoder.nlp(text)
|
||||
])
|
||||
proposal, = graph.proposals
|
||||
self.assertTrue(any(
|
||||
len({edge.source for edge in graph.edges if edge.target == node}) > 1
|
||||
|
||||
Reference in New Issue
Block a user