public void process(JCas aJCas) {
    // get annotation indexes
    String st = aJCas.getDocumentText();
    
    
    PosTagNamedEntityRecognizer ner;
    try {
      ner = new PosTagNamedEntityRecognizer();
      Map<Integer, Integer> tokens = ner.getGeneSpans(st.substring(15, st.length()));
      //Iterator<Entry<Integer, Integer>> it = tokens.entrySet().iterator();
      
      for (Map.Entry<Integer, Integer> pairs:tokens.entrySet() ) { //For every annotation we get in GeneAnnotater
        //Map.Entry pairs = (Map.Entry)it.next();
        
        geneTag a = new geneTag(aJCas);
        int k = (int) pairs.getKey();
        int v = (int) pairs.getValue();
        System.out.println(k);
        a.setBegin(k);
        a.setEnd(v);
        
        a.setID(st.substring(0, 14));
        a.setText(st.substring(k+15, v+15));
        
        
        a.addToIndexes();
      }
      
      
    } catch (ResourceInitializationException e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    };
}