sentiment.PositiveClamp

Lowers from_score to to_score when a short user message lacks positive lexicon.

Usage

Source

sentiment.PositiveClamp(
    from_score=5,
    to_score=3,
    max_words=SHORT_MESSAGE_MAX_WORDS,
    positive_floor=3
)

Parameter Attributes

from_score: int = 5
to_score: int = 3
max_words: int = SHORT_MESSAGE_MAX_WORDS
positive_floor: int = 3