public String getSGML()
    {
        List<TaggedToken> taggedTokens = getTaggedTokens();
        StringBuffer text2 = new StringBuffer();
        for (int i = 0; i < taggedTokens.size(); i++)
        {
            TaggedToken token = taggedTokens.get(i);
            TagPosition position = token.getPosition(TagFormat.IOBEW);
            if (position == TagPosition.B || position == TagPosition.W)
                text2.append("<" + token.getMention().getType().getText() + "> ");
            text2.append(token.getToken().getText() + " ");
            if (position == TagPosition.E || position == TagPosition.W)
                text2.append("</" + token.getMention().getType().getText() + "> ");
        }
        return text2.toString().trim();
    }
public String getSGML ( ) { List < TaggedToken > taggedTokens = getTaggedTokens ( ) ; StringBuffer text2 = new StringBuffer ( ) ; for ( int i = 0 ; i < taggedTokens . size ( ) ; i ++ ) { TaggedToken token = taggedTokens . get ( i ) ; TagPosition position = token . getPosition ( TagFormat . IOBEW ) ; if ( position == TagPosition . B || position == TagPosition . W ) text2 . append ( "<" + token . getMention ( ) . getType ( ) . getText ( ) + "> " ) ; text2 . append ( token . getToken ( ) . getText ( ) + " " ) ; if ( position == TagPosition . E || position == TagPosition . W ) text2 . append ( "</" + token . getMention ( ) . getType ( ) . getText ( ) + "> " ) ; } return text2 . toString ( ) . trim ( ) ; }
Returns a SGML/XML representation of the tagged sentence. Mentions are surrounded by opening and closing tags containing the mention type.
Assumes that each token is tagged either 0 or 1 times.

@return A SGML/XML representation of the tagged sentence