Zubnet AIAprenderWiki › Sentiment Analysis
Using AI

Sentiment Analysis

Opinion Mining
Determinar automaticamente o tom emocional de um texto — positivo, negativo ou neutro. “Este produto é incrível!” é positivo. “Atendimento ao cliente terrível” é negativo. Além da simples polaridade, análise de sentimento avançada detecta emoções específicas (raiva, alegria, frustração), sentimento em nível de aspecto (“a comida estava ótima mas o atendimento era lento”) e sarcasmo.

Por que importa

Análise de sentimento é uma das aplicações NLP mais deployadas comercialmente. Empresas usam para monitorar percepção de marca em redes sociais, analisar avaliações de clientes em escala, medir satisfação de funcionários em pesquisas, e detectar crises de PR emergentes. Também é um ponto de entrada comum para aprender NLP — uma tarefa de classificação simples e intuitiva com abundantes dados de treinamento.

Deep Dive

Traditional sentiment analysis used feature-engineered classifiers (bag-of-words + logistic regression, lexicon-based approaches). These worked for simple cases but failed on sarcasm ("Oh great, another delay"), implicit sentiment ("The battery lasted two hours"), and domain-specific language. Modern approaches use fine-tuned BERT or LLM-based classification, which handle these nuances much better by understanding context.

Aspect-Based Sentiment

Real reviews often contain mixed sentiment: "The camera is excellent but the battery is disappointing." Aspect-based sentiment analysis identifies the aspects (camera, battery) and assigns sentiment to each independently. This is more useful for product teams than overall sentiment because it pinpoints what specifically needs improvement. Modern LLMs handle this naturally through structured output — "extract aspects and their sentiments from this review."

LLMs vs. Dedicated Models

For sentiment analysis, you have three options: (1) a fine-tuned small model (fast, cheap, good for high-volume), (2) a zero-shot LLM prompt (flexible, handles edge cases, more expensive), or (3) an API service (Google NLP, AWS Comprehend). For most new projects, starting with an LLM prompt and switching to a fine-tuned model when volume justifies it is the practical approach.

Conceitos relacionados

← Todos os termos
ESC