skillner.core.Sentence#

class skillner.core.Sentence[source]#

Sentence class with sequence-like behavior.

A sentence is a list of words with additional metadata stored throughout the enrichment.

Examples

>>> from skillner.core import Sentence, Word
>>> s = Sentence()
>>> s.li_words = [Word(w) for w in "Hello and welcome to skillner".split()]
>>> len(s)
5
>>> s[2]
'welcome'
Attributes:
li_spans: List[Span]

List that stores all spans.

__init__() None[source]#

Methods