@Override
  public void processCas(CAS aCAS) throws ResourceProcessException {
    // TODO Auto-generated method stub
    JCas jcas;
    try {
      jcas = aCAS.getJCas();
    } catch (CASException e) {
      throw new ResourceProcessException(e);
    }
    // HashMap<String, Integer> hash = new HashMap<String, Integer>();
    FSIterator<Annotation> it = jcas.getAnnotationIndex(Gene.type).iterator();
    while (it.hasNext()) {
      Gene res = (Gene) it.next();
      try {
        String ans = res.getID() + "|" + (res.getBegin() - res.getOutershift()) + " "
                + (res.getEnd() - res.getOutershift() - res.getInnershift() - 1) + "|"
                + res.getWords();
        writer.write(ans + "\n");
        Match(ans);
        // }
      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
    try {
      writer.close();
      System.out.println("Success");
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    double P = hit * 1.0 / (hit + miss);
    double R = hit * 1.0 / words;
    System.out.println("Precision: " + P + " " + "Recall: " + R + "\n" + "F1-Meause: " + 2 * P * R
            / (P + R));
  }