use of de.ids_mannheim.korap.query.QueryBuilder in project Krill by KorAP.
the class TestKrillQuery method KorapSequenceQuery8.
@Test
public void KorapSequenceQuery8() throws QueryException {
QueryBuilder kq = new QueryBuilder("field");
SpanQuery sq = kq.seq(kq.seg("try1")).append(kq.seg("try2")).append("try3").withConstraint(5, 6).withConstraint(2, 3, "s", true).toQuery();
assertEquals("spanMultipleDistance(spanMultipleDistance(field:try1, field:try2, [(w[5:6], ordered, notExcluded), (s[2:3], ordered, excluded)]), field:try3, [(w[5:6], ordered, notExcluded), (s[2:3], ordered, excluded)])", sq.toString());
}
use of de.ids_mannheim.korap.query.QueryBuilder in project Krill by KorAP.
the class TestKrillQuery method KorapShrinkQuery2.
@Test
public void KorapShrinkQuery2() throws QueryException {
QueryBuilder kq = new QueryBuilder("field");
SpanQuery sq = kq.focus(1, kq.nr(1, kq.tag("np"))).toQuery();
assertEquals("focus(1: {1: <field:np />})", sq.toString());
}
use of de.ids_mannheim.korap.query.QueryBuilder in project Krill by KorAP.
the class TestKrillQuery method KorapTagQuery4.
@Test
public void KorapTagQuery4() throws QueryException {
QueryBuilder kq = new QueryBuilder("field");
SpanQuery sq = kq.seq(kq.tag("np"), kq.tag("vp")).append("test").toQuery();
assertEquals("spanNext(spanNext(<field:np />, <field:vp />), field:test)", sq.toString());
}
use of de.ids_mannheim.korap.query.QueryBuilder in project Krill by KorAP.
the class TestKrillQuery method KorapShrinkQuery.
@Test
public void KorapShrinkQuery() throws QueryException {
QueryBuilder kq = new QueryBuilder("field");
SpanQuery sq = kq.focus(kq.tag("np")).toQuery();
assertEquals("focus(1: <field:np />)", sq.toString());
}
use of de.ids_mannheim.korap.query.QueryBuilder in project Krill by KorAP.
the class TestKrillQuery method KorapSequenceQuery4.
@Test
public void KorapSequenceQuery4() throws QueryException {
QueryBuilder kq = new QueryBuilder("field");
SpanQuery sq = kq.seq(kq.seg("try1")).append(kq.seg("try2")).withConstraint(2, 3, "s").withConstraint(5, 6, "w").toQuery();
assertEquals("spanMultipleDistance(field:try1, field:try2, [(s[2:3], ordered, notExcluded), (w[5:6], ordered, notExcluded)])", sq.toString());
}
Aggregations