File size: 1,560 Bytes
02445dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
license: mit
library_name: transformers
pipeline_tag: text-classification
---

# Sentiment Analysis Models

This repository contains multiple trained sentiment analysis models for binary sentiment classification (Positive / Negative).

## Repository Structure

```
Sentiment/
β”‚
β”œβ”€β”€ BERT/
β”œβ”€β”€ Bi_LSTM/
β”œβ”€β”€ Linear_Svm/
β”œβ”€β”€ Logistic_Regression/
β”œβ”€β”€ Lstm/
β”œβ”€β”€ Naive Bayes/
β”œβ”€β”€ XGBoost/
└── Notebooks/
```

---

# Available Models

- BERT
- LSTM
- Bi-LSTM
- Logistic Regression
- Linear SVM
- Naive Bayes
- XGBoost

---

# Using the BERT Model

```python
from transformers import pipeline

classifier = pipeline(
    "text-classification",
    model="Sudheer17/Sentiment/BERT"
)

result = classifier("I love this movie!")

print(result)
```

Example Output

```python
[{'label': 'Positive', 'score': 0.9848}]
```

---

# Example Inputs

```text
I love this movie!
```

```text
This is the worst experience ever.
```

```text
The service was average.
```

---

# Notes

- The BERT model can be loaded directly using the Hugging Face Transformers library.
- Classical Machine Learning and Deep Learning models are stored in their respective folders.
- Use the appropriate tokenizer and preprocessing pipeline when working with non-BERT models.

---

# Requirements

```
transformers
torch
tensorflow
scikit-learn
joblib
numpy
pandas
```

Install them using:

```bash
pip install transformers torch tensorflow scikit-learn joblib numpy pandas
```

---

# License

This repository is released under the MIT License.