@Override public List<String> createOutcomes( JCas jCas, List<SUB_CHUNK_TYPE> subChunks, List<CHUNK_TYPE> chunks) throws AnalysisEngineProcessException { // get the mapping from sub-chunks to their outcomes Map<SUB_CHUNK_TYPE, String> subChunkToOutcome; subChunkToOutcome = this.getSubChunkToOutcomeMap(jCas, subChunks, chunks); // create one outcome for each sub-chunk by combining the prefix and feature value List<String> outcomes = new ArrayList<String>(); for (SUB_CHUNK_TYPE subChunk : subChunks) { String outcome = subChunkToOutcome.get(subChunk); if (outcome == null) { outcome = "O"; } outcomes.add(outcome); } return outcomes; }
ChunkOutcome curr = chunkOutcomes.get(end); ChunkOutcome next = chunkOutcomes.get(end + 1); if (this.isEndOfChunk(curr.prefix, curr.label, next.prefix, next.label)) { break;