segram.abc module
- class segram.abc.SegramABC[source]
Bases:
ABCAbstract base class for specialized
segramclasses.- property hashdata: tuple[Any, ...]
Tuple with hashable objects used for calculating instance hash.
- property data: dict[str, Any]
Dictionary mapping names and values for main slots.
- classmethod init_class_attrs(attrs: dict[str, str], **kwds: Any) None[source]
Initialize special class attributes if they are not already defined and set final values.
See
init_class_attrs()for details.
- static are_equal(obj: Any, other: Any, *, strict: bool = True) bool[source]
Are
objandotherequal.- Parameters:
strict – Should exact match on class be required. It also means that NLP tokens can be equal only when they live in the same document.
- classmethod stringify(obj: Any, **kwds: Any) str[source]
Convert
objto string.If
objexposesto_str()then it is used with keyword arguments passed in**kwds. Otherwise the plain__repr__()is used.
- equal(other: Any, *, strict: bool = True) bool[source]
Are
selfandotherequal.See
iter_diffs()for details.