gensim logo

gensim
gensim tagline

Get Expert Help From The Gensim Authors

Consulting in Machine Learning & NLP

Corporate trainings in Data Science, NLP and Deep Learning

summarization.syntactic_unit – Syntactic Unit class

summarization.syntactic_unit – Syntactic Unit class

This module contains implementation of SyntacticUnit class. It generally used while text cleaning. SyntacticUnit represents printable version of provided text.

class gensim.summarization.syntactic_unit.SyntacticUnit(text, token=None, tag=None, index=-1)

Bases: object

SyntacticUnit class.

text

Input text.

Type

str

token

Tokenized text.

Type

str

tag

Tag of unit, optional.

Type

str

index

Index of sytactic unit in corpus, optional.

Type

int

score

Score of synctatic unit, optional.

Type

float

Parameters
  • text (str) – Input text.

  • token (str) – Tokenized text, optional.

  • tag (str) – Tag of unit, optional.