@Override
  public void process(JCas aJCas) throws AnalysisEngineProcessException {
    NERLingpipe recognizer = null;
    recognizer = NERLingpipe.getInstance();
    Iterator sIter = aJCas.getAnnotationIndex(sentence.type).iterator();// Need to specify the annotation type you want to use
    while (sIter.hasNext()) {
      sentence s = (sentence) sIter.next();    
      Map<Integer, Integer> ret = null;
      try {
        ret = recognizer.getGeneSpans(s.getText());
      } catch (ClassNotFoundException e) {
        e.printStackTrace();
      } catch (IOException e) {
        e.printStackTrace();
      }
      Iterator<Map.Entry<Integer,Integer>>iter = ret.entrySet().iterator();
      while(iter.hasNext()){
        Map.Entry<Integer, Integer> entry = iter.next();   
        int st = entry.getKey();
        int end = entry.getValue();
        gene g = new gene(aJCas);        
        g.setBegin(st-recognizer.getSpaceNum(st));
        //g.setBegin(st);
        g.setGeneName(s.getText().substring(st, end));
        g.setEnd(end-1-recognizer.getSpaceNum(st)-checkSpace(s.getText().substring(st, end)));
        //g.setEnd(end);
        g.setId(s.getId());
        g.addToIndexes();  
      }  
    }        
  }