def test_daughter_and(self): dq = Q.idoms(Q.label("NP")) & Q.idoms(Q.label("VBD")) c = self.d.engine.connect() res = c.execute(dq.sql(self.d)).fetchall() self.assertEqual(len(res), 1) self.assertEqual(self.d._reconstitute(res[0][0]), self.d[0])
def setUp(self): self.q = Q.text("foo") self.q_complex = Q.label("NP") & Q.idoms(Q.text("foo"))
def test_daugher(self): dq = Q.idoms(Q.label("ADJ")) c = self.d.engine.connect() res = c.execute(dq.sql(self.d).order_by(self.d.dom.c.parent)).fetchall() self.assertEqual(len(res), 1) self.assertEqual(self.d._reconstitute(res[0][0]), self.d[0][2])
def setUp(self): self.l = Q.label("NP") & Q.idoms(Q.label("N")) self.l_oper = Q.label("NP") ^ Q.label("N")