# cathrinbenz/sentiment-analysis-using-nlp architecture

> Architecture diagram of the GitHub repository cathrinbenz/sentiment-analysis-using-nlp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cathrinbenz/sentiment-analysis-using-nlp
- Repository: https://github.com/cathrinbenz/sentiment-analysis-using-nlp

## Overview

This repository describes a text-sentiment classification workflow: input text is cleaned, tokenized, filtered, lemmatized, converted to TF-IDF features, and classified with Multinomial Naive Bayes; model performance is evaluated separately. The CSV is the only data file in the supplied tree. The README documents these stages, but the notebook it lists is absent, so the graph reflects documented behavior rather than inspected implementation. Workflow node paths are null because no corresponding source files appear in the tree.

Main entry points: [`emotion_dataset_3500.csv`](https://github.com/cathrinbenz/sentiment-analysis-using-nlp/blob/main/emotion_dataset_3500.csv) (Emotion Dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sentiment_workflow["Sentiment Workflow"]
  node_dataset["Emotion Dataset"]
  node_cleaning["Text Cleaning"]
  node_tokenization["Tokenization"]
  node_stopwords["Stopword Removal"]
  node_lemmatization["Lemmatization"]
  node_tfidf["TF-IDF Features"]
  node_classifier["Naive Bayes"]
  node_prediction["Predicted Sentiment"]
  node_evaluation["Model Evaluation"]
end

node_text_input(("Input Text"))

node_text_input -->|"provides text"| node_cleaning
node_dataset -->|"provides data"| node_cleaning
node_cleaning -->|"then tokenizes"| node_tokenization
node_tokenization -->|"then filters"| node_stopwords
node_stopwords -->|"then lemmatizes"| node_lemmatization
node_lemmatization -->|"extracts features"| node_tfidf
node_tfidf -->|"provides features"| node_classifier
node_classifier -->|"predicts sentiment"| node_prediction
node_classifier -->|"evaluates performance"| node_evaluation

click node_dataset "https://github.com/cathrinbenz/sentiment-analysis-using-nlp/blob/main/emotion_dataset_3500.csv"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dataset,node_cleaning,node_tokenization,node_stopwords,node_lemmatization,node_tfidf,node_classifier,node_prediction,node_evaluation toneBlue
class node_text_input toneIndigo
```

## Components

### Sentiment Workflow

- [Emotion Dataset](https://github.com/cathrinbenz/sentiment-analysis-using-nlp/blob/main/emotion_dataset_3500.csv): `emotion_dataset_3500.csv`
- **Text Cleaning**
- **Tokenization**
- **Stopword Removal**
- **Lemmatization**
- **TF-IDF Features**
- **Naive Bayes**
- **Predicted Sentiment**
- **Model Evaluation**

### Other components

- **Input Text**

## Connections

- Input Text → Text Cleaning: provides text (evidence: `README.md`)
- Emotion Dataset → Text Cleaning: provides data (evidence: `README.md`)
- Text Cleaning → Tokenization: then tokenizes (evidence: `README.md`)
- Tokenization → Stopword Removal: then filters (evidence: `README.md`)
- Stopword Removal → Lemmatization: then lemmatizes (evidence: `README.md`)
- Lemmatization → TF-IDF Features: extracts features (evidence: `README.md`)
- TF-IDF Features → Naive Bayes: provides features (evidence: `README.md`)
- Naive Bayes → Predicted Sentiment: predicts sentiment (evidence: `README.md`)
- Naive Bayes → Model Evaluation: evaluates performance (evidence: `README.md`)
