'String representation of the lexicon. Used for debugging.'

def __str__(self):

    string = u''
    first = True
    for ident in sorted(self._entries):
        if (not first):
            string = (string + u'\n')
        string = ((string + ident) + u'    =>    ')
        first = True
        for cat in self._entries[ident]:
            if (not first):
                string = (string + u'    |    ')
            else:
                first = False
            string = (string + (u'%s' % cat))
    return string
