@Override
  public void process(JCas aJCas) throws AnalysisEngineProcessException {
    // TODO Auto-generated method stub
    JCas jcas = aJCas;
    try {
      chunker = (ConfidenceChunker) AbstractExternalizable.readObject(modelFile);
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (IOException e) {
      e.printStackTrace();
    }
    FSIterator<org.apache.uima.jcas.tcas.Annotation> it = jcas.getAnnotationIndex(sentenceTag.type)
            .iterator();
    while (it.hasNext()) {
      sentenceTag sentenceAnnotator = (sentenceTag) it.next();
      String content = sentenceAnnotator.getContent();
      char[] temp = content.toCharArray();
      Iterator<Chunk> gene_iterator = chunker.nBestChunks(temp, 0, temp.length, MAX);
      while (gene_iterator.hasNext()) {
        Chunk chunk = gene_iterator.next();
        double conf = Math.pow(2.0, chunk.score()); // Probability of the detected gene.
        if (conf < 0.66) { // At this time, the number of genes approximates to the number in
                           // sample.out.
          break;
        }
        int begin = chunk.start();
        int end = chunk.end();
        String gene = content.substring(begin, end);
        begin = begin - countWhiteSpaces(content.substring(0, begin));
        end = begin + gene.length() - countWhiteSpaces(gene) - 1;

        geneTag annotate_g = new geneTag(jcas);
        annotate_g.setBegin(begin);
        annotate_g.setEnd(end);
        annotate_g.setId(sentenceAnnotator.getId());
        annotate_g.setContent(gene);
        annotate_g.addToIndexes(jcas);
      }
    }
  }