---
title: "Sentiment Analysis"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/lib/nlp/sentimentanalysis
markdown: https://docs.nodetool.ai/nodes/lib/nlp/sentimentanalysis.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/lib/nlp/sentimentanalysis.md
---

# Sentiment Analysis

**Type:** `lib.nlp.SentimentAnalysis`

**Namespace:** `lib.nlp`

## Description

Analyzes sentiment of text using an AFINN-based analyzer.
    sentiment, opinion, polarity, text analysis, NLP

    Use cases:
    - Determine positive or negative tone of text
    - Analyze customer feedback sentiment
    - Score product reviews
    - Monitor social media sentiment

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| text | `str` | The text to analyze for sentiment | `` |
| language | `enum` | Language of the input text | `English` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| score | `float` |  |
| comparative | `float` |  |
| positive_words | `list` |  |
| negative_words | `list` |  |

## Related Nodes

Browse other nodes in the [lib.nlp](./) namespace.
