> For the complete documentation index, see [llms.txt](https://blog.sunilgudivada.dev/notebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.sunilgudivada.dev/notebook/transformers-and-llms/nlp-tasks.md).

# NLP Tasks

NLP -> Natural language Processing&#x20;

* Classification
* Multi Classification
* Generation

### **Classification**&#x20;

Input will be simple text, and output would be predict something

**Sentiment Extraction**

**Ex:** This teddy bear is so cute

Datasets : amazon, IMDB, Twitter

**Evaluation Metrics**:&#x20;

Accuracy -> % of observation that were correctly predicted

Precision -> % of predicted positive that were correct

Recall -> % of actually positive that were correct

F1 Score -> Score that is a function of precision and recall - harmonic mean

&#x20;

why do we need metrics -> to analyze the different datasets.&#x20;

Intent detection

Language detection

Topic Modelling&#x20;

## Multi Classification

&#x20;Output would be multiple predictions

Ex: Part of speech tagging&#x20;

**Named entity recognitio**n:

Identify the different named entities from the input text&#x20;

Ex: A cute teddy bear is reading&#x20;

Teddy Bear -> entity

**Datasets**: Annotated reuters news paper (CoNLL - 2003, CoNLL++)

Dependency parsing&#x20;

Constituency parsing

**Generation**&#x20;

Input as text and output also as text and dont know what is the length of the output

Machine translation

**Datasets** : WMT'14 English French, WMT'14 English German

**Evaluation Metrics**:&#x20;

BLEU -> Bi lingual evaluation under study -> quality of text translated&#x20;

ROGUE -> Quality of text generated&#x20;

Perflexity -> Quantifies how 'surprised' the model is to see some words together

Question Answering

Summarization

Text generation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.sunilgudivada.dev/notebook/transformers-and-llms/nlp-tasks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
