def _pretty_semtype(st):

    semkeys = st.keys()
    if len(semkeys) == 1: return "<None>"

    outstr = ""
    outstr += "semantic type ({0.ID}): {0.name}\n".format(st)
    if 'abbrev' in semkeys:
        outstr += "[abbrev] {0}\n".format(st.abbrev)
    if 'definition' in semkeys:
        outstr += "[definition]\n"
        outstr += _pretty_longstring(st.definition,'  ')
    outstr += "[rootType] {0}({1})\n".format(st.rootType.name, st.rootType.ID)
    if st.superType is None:
        outstr += "[superType] <None>\n"
    else:
        outstr += "[superType] {0}({1})\n".format(st.superType.name, st.superType.ID)
    outstr += "[subTypes] {0} subtypes\n".format(len(st.subTypes))
    outstr += "  " + ", ".join('{0}({1})'.format(x.name, x.ID) for x in st.subTypes) + '\n'*(len(st.subTypes)>0)
    return outstr
Helper function for pretty-printing a semantic type.
dataset/ETHPy150Open nltk/nltk/nltk/corpus/reader/framenet.py/_pretty_semtype