use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanSequenceQueryJSON method queryJSONseqEmptyMiddle.
@Test
public void queryJSONseqEmptyMiddle() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("empty-middle.jsonld");
// der[][tt/p=NN]
assertEquals(sqwi.toQuery().toString(), "spanNext(tokens:s:der, spanExpansion(tokens:tt/p:NN, []{1, 1}, left))");
}
use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanSequenceQueryJSON method queryJSONkoralSimpleDistanceBug.
@Test
public void queryJSONkoralSimpleDistanceBug() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("distance-simple.jsonld");
assertEquals("spanDistance(tokens:s:der, tokens:s:Baum, [(w[2:2], ordered, notExcluded)])", sqwi.toQuery().toString());
}
use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanSequenceQueryJSON method queryJSONseqNegativeEndRepetitionClass2.
@Test
public void queryJSONseqNegativeEndRepetitionClass2() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("negative-last-class-repetition-2.jsonld");
// [tt/p=NN]{2:[tt/p!=NN]}{4,5}
assertEquals(sqwi.toQuery().toString(), "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, right, class:2)}))");
}
use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanSequenceQueryJSON method queryJSONseqNegativeStartRepetition3.
@Test
public void queryJSONseqNegativeStartRepetition3() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("negative-first-repetition-3.jsonld");
// [tt/p!=NN]{0,0}[tt/p=NN]
assertEquals(sqwi.toQuery().toString(), "tokens:tt/p:NN");
}
use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanSequenceQueryJSON method queryJSONseqNegativeStartRepetition2.
@Test
public void queryJSONseqNegativeStartRepetition2() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("negative-first-repetition-2.jsonld");
// [tt/p!=NN]{0,5}[tt/p=NN]
assertEquals(sqwi.toQuery().toString(), "spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{0, 5}, left)");
}
Aggregations