> For the complete documentation index, see [llms.txt](https://infinitode-docs.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitode-docs.gitbook.io/documentation/package-documentation/duplipy-package-documentation/duplipy-reference/text-analysis-functions.md).

# Text Analysis Functions

Available functions:

* [`analyze_sentiment`](#analyze-sentiment)`(text)`: Analyze the sentiment of the input text using NLTK's SentimentIntensityAnalyzer.
* [`named_entity_recognition`](#named-entity-recognition)`(text)`: Perform named entity recognition (NER) on the input text.

***

### Analyze sentiment

Analyze the sentiment of the input text using NLTK's SentimentIntensityAnalyzer.

```
Parameters:
- `text` (str): The input text to be analyzed.

Returns:
- `float`: The sentiment score ranging from -1 (negative) to 1 (positive).
```

### Named Entity Recognition

NER is the task of identifying and categorizing key information (entities) in text.

```
Parameters:
- `text` (str): The input text to be analyzed.

Returns:
- `list`: A list of named entities found in the text.
```
