use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestKrillQueryJSON method queryJSONfoundryForOrthBug.
@Test
public void queryJSONfoundryForOrthBug() throws QueryException {
SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bugs/foundry_for_orth.jsonld").getFile());
// opennlp/orth:Baum
assertEquals(sqwi.toQuery().toString(), "tokens:s:Baum");
}
use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestKrillQueryJSON method queryJSONfoundryForOrthBug2.
@Test
public void queryJSONfoundryForOrthBug2() throws QueryException {
SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bugs/foundry_for_orth_2.jsonld").getFile());
// baum/i
assertEquals(sqwi.toQuery().toString(), "tokens:i:baum");
}
use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanRelationQueryJSON method testFocusEmptyBoth.
@Test
public void testFocusEmptyBoth() throws QueryException {
String filepath = getClass().getResource("/queries/relation/focus-empty-both.json").getFile();
SpanQueryWrapper sqwi = getJSONQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("focus(2: focus(#[1,2]{1: source:{2: target:spanRelation(tokens:>:mate/d:HEAD)}}))", sq.toString());
}
use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanRelationQueryJSON method testMatchOperandWithAttribute.
@Test
public void testMatchOperandWithAttribute() throws QueryException {
//
String filepath = getClass().getResource("/queries/relation/operand-with-attribute.json").getFile();
SpanQueryWrapper sqwi = getJSONQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("focus(#[1,2]spanSegment(<tokens:c:vp />, focus(#2: spanSegment(spanRelation(tokens:>:mate/d:HEAD), " + "spanElementWithAttribute(<tokens:c:s />, spanAttribute(tokens:type:top))))))", sq.toString());
}
use of de.ids_mannheim.korap.query.wrap.SpanQueryWrapper in project Krill by KorAP.
the class TestSpanRelationQueryJSON method testFocusTarget.
@Test
public void testFocusTarget() throws QueryException {
String filepath = getClass().getResource("/queries/relation/focus-target.json").getFile();
SpanQueryWrapper sqwi = getJSONQuery(filepath);
SpanQuery sq = sqwi.toQuery();
assertEquals("focus(2: focus(#[1,2]spanSegment({2: <tokens:c:np />}, " + "focus(#2: spanSegment(spanRelation(tokens:>:mate/d:HEAD), {1: <tokens:c:s />})))))", sq.toString());
}
Aggregations