# Klasyfikacja tekstu i analiza sentymentu

EN: **Text classification and sentiment analysis** · id `textclassification` · aliases: text classification, sentiment analysis, opinion mining, zero-shot classification, intent detection, klasyfikacja tekstu, analiza sentymentu, analiza wydźwięku

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Język, obraz, audio](https://aiatlasgraph.com/t/modalities.md) › [Język naturalny](https://aiatlasgraph.com/t/nlp.md) › Klasyfikacja tekstu i analiza sentymentu

## Description

- PL: Przypisywanie tekstowi jednej lub kilku etykiet: sentyment, temat, spam, intencja. Dziś dostrojonym enkoderem albo bez treningu — klasyfikacją zero-shot (przez wnioskowanie językowe, NLI) lub promptem do LLM.
- EN: Assigning one or more labels to a text: sentiment, topic, spam, intent. Done today with a fine-tuned encoder or without task training — NLI-based zero-shot classification or prompting an LLM.

## In one sentence

- PL: To automatyczne przypisywanie tekstom etykiet, na przykład czy opinia jest pozytywna, a wiadomość to spam.
- EN: This automatically labels texts, for example whether a review is positive or a message is spam.

## Problem it solves

- PL: Codziennie spływają setki opinii, zgłoszeń i maili, a ręczne sortowanie ich zajmuje godziny i bywa niekonsekwentne.
- EN: Hundreds of reviews, tickets and emails arrive every day, and sorting them by hand takes hours and is inconsistent.

## What it does

- PL: Działa jak sortownia na poczcie: patrzy na słowa i ich układ, po czym wrzuca tekst do właściwej przegródki.
- EN: It works like a post-office sorting room: it looks at the words and how they are arranged, then drops the text into the right slot.

## Everyday example

- PL: Sklep internetowy sam oznacza recenzje jako zadowolone lub rozczarowane i pokazuje obsłudze najpierw te najbardziej krytyczne.
- EN: An online shop tags reviews as happy or disappointed and shows the most critical ones to staff first.

## This concerns you if you…

- PL: dostajesz dużo wiadomości, które trzeba rozdzielić
- PL: chcesz wiedzieć, co ludzie myślą o twoim produkcie
- PL: kierujesz zgłoszenia do właściwych osób
- EN: receive many messages that need sorting
- EN: want to know what people think of your product
- EN: route requests to the right people

## Keywords

BERT · natural language inference · zero-shot classification · multi-label classification · sentiment polarity · intent classification

## How it works

- PL: Reprezentacja tekstu zasila głowicę przewidującą kategorie lub wiele niezależnych etykiet. Wariant bez dostrajania porównuje tekst z opisami kategorii albo poleca modelowi wygenerować ocenę według promptu.
- EN: Text representations feed a head predicting categories or multiple independent labels. Without fine-tuning, methods compare text against category descriptions or prompt a model to generate an assessment.

## Limits

- PL: Ironia, zmiana domeny i niejednoznaczne etykiety pogarszają wyniki. Klasyfikacja zero-shot zależy od opisów kategorii; pewność modelu wymaga osobnej kalibracji.
- EN: Irony, domain shifts and ambiguous labels harm results. Zero-shot classification depends on category descriptions; confidence requires separate calibration.

## Key terms

- PL: **multi-label**: Przypisywanie wielu etykiet, które mogą być prawdziwe jednocześnie.
- PL: **NLI**: Ocena, czy tekst wspiera, przeczy lub nie rozstrzyga innego twierdzenia.
- EN: **multi-label**: Assigning multiple labels that may be true simultaneously.
- EN: **NLI**: Assessing whether text supports, contradicts or leaves another statement unresolved.

## Know first

- [Uczenie nadzorowane (Supervised learning)](https://aiatlasgraph.com/t/supervised.md)
- [Transformery i attention (Transformers and attention)](https://aiatlasgraph.com/t/transformers.md)

## Examples

- PL: analiza sentymentu · wykrywanie spamu · rozpoznawanie intencji · NLI · klasyfikacja zero-shot · dostrojony enkoder (BERT)
- EN: sentiment analysis · spam detection · intent detection · NLI · zero-shot classification · fine-tuned encoder (BERT)

## Subtopics (3 direct, 3 in total)

- [Klasyfikacja tekstu bez przykładów (zero-shot) (Zero-shot text classification)](https://aiatlasgraph.com/t/zeroshotclassification.md): Assigning texts labels unseen in training, usually by recasting classes as NLI hypotheses or as an LLM prompt.
- [Opinie o konkretnych cechach (sentyment aspektowy) (Aspect-based sentiment analysis)](https://aiatlasgraph.com/t/aspectsentiment.md): Extracting aspect-level opinions from text: aspect term, aspect category, opinion term and polarity.
- [Wnioskowanie z tekstu: czy zdanie wynika z innego (NLI) (Natural language inference (textual entailment))](https://aiatlasgraph.com/t/nli.md): Classifying a premise–hypothesis pair as entailment, contradiction or neutral.

## Related topics

Untyped, symmetric "see also" links.

- [Analiza sentymentu wiadomości finansowych (Financial news sentiment analysis)](https://aiatlasgraph.com/t/finsentiment.md)
- [Enkoder, dekoder i enkoder–dekoder (BERT, GPT, T5) (Encoder-only, decoder-only and encoder–decoder models)](https://aiatlasgraph.com/t/transformerfamilies.md)

## Sources

- [Hugging Face Tasks — natural language processing](<https://huggingface.co/tasks>) `hf-tasks-nlp` · by Hugging Face
- [Text Classification (Hugging Face Tasks)](<https://huggingface.co/tasks/text-classification>) `hf-task-text-classification` · by Hugging Face
- [Zero-Shot Classification (Hugging Face Tasks)](<https://huggingface.co/tasks/zero-shot-classification>) `hf-task-zero-shot-classification` · by Hugging Face
- [Speech and Language Processing (3rd ed. draft) — table of contents](<https://web.stanford.edu/~jurafsky/slp3/>) `jurafsky-martin-slp3` · by Daniel Jurafsky, James H. Martin

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/textclassification · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
