code: public static String getSpannedText(SToken tok)
    {
      SGraph graph = tok.getGraph();
  
      List<SRelation<SNode,SNode>> edges = graph.getOutRelations(tok.getId());
      for (SRelation<? extends SNode,? extends SNode> e : edges)
      {
        if (e instanceof STextualRelation)
        {
          STextualRelation textRel = (STextualRelation) e;
          return textRel.getTarget().getText().substring(textRel.getStart(),
            textRel.getEnd());
        }
      }
      return "";
    }
docs: Gets the spannend/covered text for a token. This will get all
  {@link STextualRelation} edges for a {@link SToken} from the
  {@link SDocumentGraph} and calculates the appropiate substring from the
  {@link STextualDS}.
  
  @param tok The {@link SToken} which is overlapping the text sequence.
  @return An empty {@link String} object, if there is no
  {@link STextualRelation}