logitorch.utilities.sentiment_analysis

Classes

Module Contents

class logitorch.utilities.sentiment_analysis.SentimentAnalysisTextBlob[source]
sentiment(passage: str, threshold_polarity: float = 0.0) str | None[source]

Analyzes the sentiment of a given passage using TextBlob.

Args:

passage (str): The text passage to analyze. threshold_polarity (float, optional): The threshold polarity value. Defaults to 0.0.

Returns:

Optional[str]: The sentiment of the passage, either “Positive” or “Negative”, or None if an error occurs.

textblob_analyzer[source]