@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } } }
String line = lineIterator.next(); if (line.startsWith("#T_")) { setLayerAndFeature(aJCas, line); continue; text = unEscapeSpecial(text); createSentence(aJCas, sentLineSb.toString(), sentBegin, sentEnd, prevSentEnd); prevSentEnd = sentEnd; sentBegin = -1;// reset for next sentence begin AnnotationUnit unit = createTokens(aJCas, lines, begin, end); setAnnosPerTypePerUnit(lines, unit, ind); createSentence(aJCas, lastSent, sentBegin, sentEnd, prevSentEnd); setAnnosPerUnit(aJCas, annosPerTypePerUnit); addAnnotations(aJCas, annosPerTypePerUnit); addChainAnnotations(aJCas);
ref = addAnnotationWithNoFeature(aJCas, type, unit, annos, multiTokUnits, end, ref); continue; .getFeatureByBaseName(CAS.FEATURE_BASE_NAME_END); prevAnnoFs.setIntValue(endF, end); mAnno = getEscapeChars(mAnno); prevAnnoFs.setFeatureValueFromString(feat, mAnno); if (feat.getShortName().equals(REF_LINK)) { setAnnoRefPerUnit(unit, type, ref, prevAnnoFs); mAnno = getEscapeChars(mAnno); addSlotAnnotations(linkFSesPerSlotAnno, linkeF); targetAdd = true; slot++; refRel = getEscapeChars(refRel); if (refRel.equals("*")) { refRel = null; mAnno = getEscapeChars(mAnno); mAnno = getEscapeChars(mAnno); multiTokUnits.putIfAbsent(unit, new HashMap<>()); multiTokUnits.get(unit).put(ref, annos.get(i)); annos.get(i).setFeatureValueFromString(feat, mAnno); aJCas.addFsToIndexes(annos.get(i));
String line = lineIterator.next(); if (line.startsWith("#T_")) { setLayerAndFeature(aJCas, line); continue; createSentence(aJCas, sentLineSb.toString(), sentBegin, sentEnd, prevSentEnd); prevSentEnd = sentEnd; sentBegin = -1;// reset for next sentence begin AnnotationUnit unit = createTokens(aJCas, lines, begin, end); setAnnosPerTypePerUnit(lines, unit, ind); createSentence(aJCas, lastSent, sentBegin, sentEnd, prevSentEnd); setAnnosPerUnit(aJCas, annosPerTypePerUnit); addAnnotations(aJCas, annosPerTypePerUnit); addChainAnnotations(aJCas);
ref = addAnnotationWithNoFeature(aJCas, type, unit, annos, multiTokUnits, end, ref); continue; .getFeatureByBaseName(CAS.FEATURE_BASE_NAME_END); prevAnnoFs.setIntValue(endF, end); mAnno = getEscapeChars(mAnno); prevAnnoFs.setFeatureValueFromString(feat, mAnno); if (feat.getShortName().equals(REF_LINK)) { setAnnoRefPerUnit(unit, type, ref, prevAnnoFs); mAnno = getEscapeChars(mAnno); addSlotAnnotations(linkFSesPerSlotAnno, linkeF); targetAdd = true; slot++; refRel = getEscapeChars(refRel); if (refRel.equals("*")) { refRel = null; mAnno = getEscapeChars(mAnno); mAnno = getEscapeChars(mAnno); multiTokUnits.putIfAbsent(unit, new HashMap<>()); multiTokUnits.get(unit).put(ref, annos.get(i)); annos.get(i).setFeatureValueFromString(feat, mAnno);
String line = lineIterator.next(); if (line.startsWith("#T_")) { setLayerAndFeature(aJCas, line); continue; text = unEscapeSpecial(text); createSentence(aJCas, sentLineSb.toString(), sentBegin, sentEnd, prevSentEnd); prevSentEnd = sentEnd; sentBegin = -1;// reset for next sentence begin AnnotationUnit unit = createTokens(aJCas, lines, begin, end); setAnnosPerTypePerUnit(lines, unit, ind); createSentence(aJCas, lastSent, sentBegin, sentEnd, prevSentEnd); setAnnosPerUnit(aJCas, annosPerTypePerUnit); addAnnotations(aJCas, annosPerTypePerUnit); addChainAnnotations(aJCas);
ref = addAnnotationWithNoFeature(aJCas, type, unit, annos, multiTokUnits, end, ref); continue; .getFeatureByBaseName(CAS.FEATURE_BASE_NAME_END); prevAnnoFs.setIntValue(endF, end); mAnno = getEscapeChars(mAnno); prevAnnoFs.setFeatureValueFromString(feat, mAnno); if (feat.getShortName().equals(REF_LINK)) { setAnnoRefPerUnit(unit, type, ref, prevAnnoFs); mAnno = getEscapeChars(mAnno); addSlotAnnotations(linkFSesPerSlotAnno, linkeF); targetAdd = true; slot++; refRel = getEscapeChars(refRel); if (refRel.equals("*")) { refRel = null; mAnno = getEscapeChars(mAnno); mAnno = getEscapeChars(mAnno); multiTokUnits.putIfAbsent(unit, new HashMap<>()); multiTokUnits.get(unit).put(ref, annos.get(i)); annos.get(i).setFeatureValueFromString(feat, mAnno);
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } } }