use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanSequenceQueryJSON method queryJSONseqEmptyMiddleClass.
@Test
public void queryJSONseqEmptyMiddleClass() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("empty-middle-class.jsonld");
// der{1:[]}[tt/p=NN]
assertEquals(sqwi.toQuery().toString(), "spanNext(tokens:s:der, spanExpansion(tokens:tt/p:NN, []{1, 1}, left, class:1))");
}
use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanSequenceQueryJSON method queryJSONseqNegativeStartRepetition.
@Test
public void queryJSONseqNegativeStartRepetition() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("negative-first-repetition.jsonld");
// [tt/p!=NN]{4,5}[tt/p=NN]
assertEquals(sqwi.toQuery().toString(), "spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, left)");
}
use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanSequenceQueryJSON method queryJSONseqEmptyStartRepetition2.
@Test
public void queryJSONseqEmptyStartRepetition2() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("empty-first-repetition-2.jsonld");
// []{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 queryJSONseqNegativeEndRepetitionClass.
@Test
public void queryJSONseqNegativeEndRepetitionClass() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("negative-last-class-repetition.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 queryJSONseqEmptyEndClass.
@Test
public void queryJSONseqEmptyEndClass() throws QueryException {
SpanQueryWrapper sqwi = jsonQueryFile("empty-last-class.jsonld");
// der{3:[]}
assertEquals(sqwi.toQuery().toString(), "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{1, 1}, right, class:3)}))");
}
Aggregations