private String extractSpan(String spans,int start,int end) throws IndexOutOfBoundsException {
  int offset=getFirstSpanOffset(spans);
  assert (start >= offset);
  assert (end >= offset);
  spans+=HTML_OPEN_SPAN;
  int substart=getSpanPos(spans,start - offset);
  int subend=getSpanPos(spans,end - offset + 1);
  return spans.substring(substart,subend);
}

private String extractSpan ( String spans , int start , int end ) throws IndexOutOfBoundsException { int offset = getFirstSpanOffset ( spans ) ; assert ( start >= offset ) ; assert ( end >= offset ) ; spans += HTML_OPEN_SPAN ; int substart = getSpanPos ( spans , start - offset ) ; int subend = getSpanPos ( spans , end - offset + 1 ) ; return spans . substring ( substart , subend ) ; }
helper function for uploadnewnertask2 : extract certain token spans from the html token spans that the crowdflower job task1 uses to display a text fragment . it is used to cut out a named entity from html token spans .
