@Test public void testExistingCoordReferent() throws Exception { AnalysisEngine ae = AnalysisEngineFactory.createEngine(CorefBrackets.class); jCas.setDocumentText(LOC_TEXT); ReferenceTarget rt1 = Annotations.createReferenceTarget(jCas); Annotations.createLocation(jCas, 0, 9, SOMEWHERE, null); Coordinate c1 = Annotations.createCoordinate(jCas, 11, 19, MRGS); c1.setReferent(rt1); ae.process(jCas); assertEquals(1, JCasUtil.select(jCas, ReferenceTarget.class).size()); ReferenceTarget rt = JCasUtil.selectByIndex(jCas, ReferenceTarget.class, 0); Location l = JCasUtil.selectByIndex(jCas, Location.class, 0); Coordinate c = JCasUtil.selectByIndex(jCas, Coordinate.class, 0); assertEquals(rt, l.getReferent()); assertEquals(rt, c.getReferent()); assertEquals(c.getReferent(), l.getReferent()); }
private ReferenceTarget createReferenceTarget(JCas jCas) { ReferenceTarget rt = new ReferenceTarget(jCas); rt.setBegin(0); rt.setEnd(jCas.getDocumentText().length()); addToJCasIndex(rt); return rt; }
CorefBrackets extends BaleenAnnotator { private ReferenceTarget createReferenceTarget(JCas jCas) { ReferenceTarget rt = new ReferenceTarget(jCas); rt.setBegin(0); rt.setEnd(jCas.getDocumentText().length()); addToJCasIndex(rt); return rt; } }
CorefBrackets extends BaleenAnnotator { private ReferenceTarget createReferenceTarget(JCas jCas) { ReferenceTarget rt = new ReferenceTarget(jCas); rt.setBegin(0); rt.setEnd(jCas.getDocumentText().length()); addToJCasIndex(rt); return rt; }  }
CorefBrackets extends BaleenAnnotator { private ReferenceTarget createReferenceTarget(JCas jCas) { ReferenceTarget rt = new ReferenceTarget(jCas); rt.setBegin(0); rt.setEnd(jCas.getDocumentText().length()); addToJCasIndex(rt); return rt; }  @Override void doInitialize(UimaContext aContext); @Override void doProcess(JCas jCas); @Override AnalysisEngineAction getAction(); }
CorefBrackets extends BaleenAnnotator { private ReferenceTarget createReferenceTarget(JCas jCas) { ReferenceTarget rt = new ReferenceTarget(jCas); rt.setBegin(0); rt.setEnd(jCas.getDocumentText().length()); addToJCasIndex(rt); return rt; }  @Override void doInitialize(UimaContext aContext); @Override void doProcess(JCas jCas); @Override AnalysisEngineAction getAction(); static final String PARAM_MERGE_REFERENTS; static final String PARAM_TYPE; }