/** * @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public Document(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** * @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public Document(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
@Test public void testOutputData() throws Exception { final AnalysisEngine consumer = AnalysisEngineFactory.createEngine( StructuralHtml.class, Html5.PARAM_OUTPUT_FOLDER, outputFolder.getPath(), StructuralHtml.PARAM_OUTPUT_DATA, true); final DocumentAnnotation da = (DocumentAnnotation) jCas.getDocumentAnnotationFs(); da.setSourceUri("test.txt"); jCas.setDocumentText("Example"); final Document d = new Document(jCas); d.setBegin(0); d.setEnd("Example".length()); d.addToIndexes(); consumer.process(jCas); final File f = new File(outputFolder, "test.txt.html"); assertTrue(f.exists()); assertEquals( Jsoup.parse(f, "UTF-8").html().replaceAll("\\s*", ""), EXPECTED_DATA.replaceAll("\\s*", "")); }
@Test public void testStructures() throws UIMAException { jCas.setDocumentText("A sample document"); final Document s = new Document(jCas); s.setBegin(0); s.setEnd(10); s.addToIndexes(); SimplePipeline.runPipeline(jCas, AnalysisEngineFactory.createEngine(Structures.class)); }
@Test public void testSelectors() throws UIMAException { jCas.setDocumentText("A sample document"); final Document s = new Document(jCas); s.setBegin(0); s.setEnd(10); s.addToIndexes(); SimplePipeline.runPipeline(jCas, AnalysisEngineFactory.createEngine(Selectors.class)); } }
doc.setBegin(0); doc.setEnd(text.length()); doc.addToIndexes();
protected void addAnnotations(JCas jCas) { document = new Document(jCas); document.setDepth(1); document.setBegin(0); document.setEnd(TEXT.length()); document.addToIndexes();
document.setBegin(cursor); document.setDepth(depth);
int depth = 0; Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length());
int depth = 0; Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length());
int depth = 0; Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length());
int depth = 0; Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length());
int depth = 0; Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length());
int depth = 0; Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length());
int depth = 0; Document document = new Document(jCas); document.setBegin(cursor); document.setDepth(depth); document.setEnd(TEXT.length());