code: public String getTrainingText(TagFormat format, boolean reverse)
      {
          List<TaggedToken> taggedTokens = new ArrayList<TaggedToken>(getTaggedTokens());
          if (reverse)
              Collections.reverse(taggedTokens);
          StringBuffer trainingText = new StringBuffer();
          for (TaggedToken token : taggedTokens)
          {
              trainingText.append(token.getText(format));
              trainingText.append(" ");
          }
          return trainingText.toString().trim();
      }
docs: Returns a text representation of the tagging for this {@link Sentence}, using the specified {@link TagFormat}. In other words, each token in
  the sentence is given a tag indicating its position in a mention or that the token is not a mention. Assumes that each token is tagged either 0
  or 1 times.
  
  @param format
  The {@link TagFormat} to use
  @param reverse
  Whether to return the text in reverse order
  @return A text representation of the tagging for this {@link Sentence}, using the specified {@link TagFormat}