segram.nlp.tokens.span module

class segram.nlp.tokens.span.Span(tok: Doc | Span | Token)[source]

Bases: NLP

Span wrapper class.

property grammar: Sent

Grammar sentence object associated with the NLP sentence.

display(*args: Any, **kwds: Any) None[source]

Visualize syntactic dependency structure using spacy.displacy.serve()

render(*args: Any, **kwds: Any) str[source]

Get SVG string representing syntactic dependency structure using spacy.displacy.render().