def __repr__(self): """ Return a verbose string representation. @rtype: str """ form, entry_form, id = self._content[0:3] categories = self.categories() r = ["{"] r.append(Utilities.unidecode(form) + "@" + Utilities.unidecode(entry_form) + "." + str(id)) if self.categories(): r.append(categories) r.append("}") return "".join(r)
def __repr__(self): """ Return an ASCII representation of a lemma. @return: An ASCII representation of the entry form followed by the ID. @rtype: str """ return Utilities.unidecode(self.__entry_form) + "." + str(self.__id)
def __repr__(self): """ Give a verbose representation for a word in the format <form>@<lemma><categories>, for example: [email protected]('pl',)" @rtype: str """ z = Utilities.unidecode(self.__form) + "@" + ` self.__lemma ` if len(self.categories) == 0: return z else: return z + Utilities.tuple_str(self.categories)