/** @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 Token(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
private void createToken(final JCas jcas, final int begin, final int end) { final Token annotation = new Token(jcas); annotation.setBegin(begin); annotation.setEnd(end); annotation.setId("" + tokenNumber); annotation.setComponentId(COMPONENT_ID); annotation.addToIndexes(); LOGGER.debug("createToken() - created token: " + jcas.getDocumentText().substring(begin, end) + " " + begin + " - " + end); tokenNumber++; }