Components#
Asent contains a bunch of components to get a full list you can always run:
import asent
for c in asent.components.get_all():
print(c)
asent_da_v1
asent_en_v1
asent_no_v1
asent_sv_v1
asent.component#
Calculation of various readability metrics.
- class asent.component.Asent(nlp: Language, lexicon: dict[str, float], name: str = 'asent', intensifiers: dict[str, float] = {}, negations: Iterable[str] = {}, contrastive_conjugations: Iterable[str] = {}, lowercase: bool = True, lemmatize: bool = False, force: bool = False)[source]#
Bases:
object
SpaCy v.3.0 component for adding an asent sentiment models to Doc objects.
Ading the Token extentions ‘valence’, ‘intensifier’, ‘is_negation’, ‘is_negated’, ‘is_contrastive_conj’ and ‘polarity’ as well as the Span and Doc extension ‘polarity’.