segram.nlp.tokens.token module
- class segram.nlp.tokens.token.Token(tok: Doc | Span | Token)[source]
Bases:
NLPToken wrapper class.
- property coref: Self
Return main coreferred token or self.
- to_str(*, color: bool = False, **kwds: Any) str[source]
Represent as a string.
- Parameters:
color – Use colors.
**kwds – Passed to
color_role(). They can be used to override the fixed token role with contextual roles usingrolekeyword argument.