kindred.Token

class kindred.Token(word, lemma, partofspeech, startPos, endPos)[source]

Individual word with lemma, part-of-speech and location in text.

Variables:
  • word – Unprocessed word
  • lemma – Lemmatized word
  • partofspeech – Part-of-speech of word
  • startPos – Start position of token in document text (note: not the sentence text)
  • endPos – End position of token in document text (note: not the sentence text)

Methods

__init__(word, lemma, partofspeech, startPos, endPos)[source]

Constructor for Token class

Parameters:
  • word (str) – Unprocessed word
  • lemma (str) – Lemmatized word
  • partofspeech (str) – Part-of-speech of word
  • startPos (int) – Start position of token in document text (note: not the sentence text)
  • endPos (int) – End position of token in document text (note: not the sentence text)