public static void main(String[] args) throws ResourceInitializationException{
    PosTagNamedEntityRecognizer test = new PosTagNamedEntityRecognizer();
    String t = "Comparison with alkaline phosphatases and 5-nucleotidase";
    Map<Integer, Integer> r = test.getGeneSpans(t);
    Iterator<Entry<Integer, Integer>> iter = r.entrySet().iterator();
    while(iter.hasNext()){
      Entry<Integer, Integer> entry = iter.next();
      int st = entry.getKey();
      int en = entry.getValue();
      int space = test.getSpaceNum(st);
      int spaceInside = 0;
      for(int i = st; i < en; i++){
        if(t.charAt(i)==' ')
          spaceInside++;
      }
      System.out.println((st-space)+" "+(en-space-spaceInside-1)+":"+t.substring(st, en));
    } 
  }