πŸ“„ Extract SentimentΒΆ

templates.targeted_sentiment_extraction.extract_sentiment

SpanLabelingTemplate(
    input_format="From the following {text_type}, extract the objects for which the sentiment expressed is positive, and the objects for which the expressed sentiment is negative, and the objects for which the expressed sentiment is neutral.
{text_type}: {text}
",
    postprocessors=[
        "processors.to_span_label_pairs",
    ],
)
[source]

References: processors.to_span_label_pairs

Read more about catalog usage here.