VinMir commited on
Commit
4b8b55b
·
verified ·
1 Parent(s): 22dff92

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -78
README.md CHANGED
@@ -1,78 +1,37 @@
1
- # GordonAI
2
-
3
- GordonAI is an AI package designed for sentiment analysis, emotion detection, and fact-checking classification. The models are pre-trained on three languages: **Italian**, **English**, and **Spanish**.
4
-
5
- ## Features
6
-
7
- - **Sentiment Analysis**: Classifies text into three categories: **positive**, **negative**, and **neutral**.
8
- - **Emotion Detection**: Identifies the six basic emotions defined by Paul Ekman (1992): **joy**, **sadness**, **fear**, **anger**, **surprise**, **disgust** (plus **neutral**).
9
- - **Fact-Checking Classification**: Classifies text into **disinformation**, **hoax**, **fake news**, or **true news**.
10
-
11
- ## Installation
12
-
13
- You can install the package using `pip`. Simply run the following command:
14
-
15
- ```bash
16
- pip install GordonAI
17
- ```
18
-
19
- ## Usage
20
-
21
- ### Sentiment Analysis
22
-
23
- You can use the `SentimentAnalyzer` to predict the sentiment of a text. The analyzer classifies texts as positive, negative, or neutral.
24
-
25
- ```python
26
- from GordonAI.models import SentimentAnalyzer
27
- # Initialize the sentiment analyzer
28
- analyzer = SentimentAnalyzer()
29
- # Predict sentiment of a list of texts
30
- result = analyzer.predict(["This is a great product!", "This is a terrible mistake."])
31
- # Output the predictions
32
- print(result)
33
- ```
34
-
35
- ### Emotion Detection
36
-
37
- You can use the `EmotionAnalyzer` to predict the emotion of a text. The analyzer classifies texts as joy, sadness, fear, anger, surprise, disgust or neutral.
38
-
39
- ```python
40
- from GordonAI.models import EmotionAnalyzer
41
- # Initialize the emotion analyzer
42
- emotion_analyzer = EmotionAnalyzer()
43
- # Predict emotions of a list of texts
44
- result = emotion_analyzer.predict(["I'm so happy today!", "I'm feeling really sad."])
45
- # Output the predictions
46
- print(result)
47
- ```
48
-
49
- ### Fact-Checking Classification
50
- You can use the `FactAnalyzer` to predict whether a texts or a claim falls into categories like disinformation, fake news, hoax, or true news.
51
-
52
- ```python
53
- from GordonAI.models import FactAnalyzer
54
- # Initialize the emotion analyzer
55
- fact_analyzer = FactAnalyzer()
56
- # Predict emotions of a list of texts
57
- result = fact_analyzer.predict(["This news story is about a real event.", "This news article is based on fake information."])
58
- # Output the predictions
59
- print(result)
60
- ```
61
-
62
- ## Requirements
63
- Python >= 3.9
64
- transformers
65
- torch
66
-
67
- You can install the dependencies using:
68
- ```bash
69
- pip install transformers torch
70
- ```
71
-
72
- ## Acknowledgments
73
-
74
- This package is part of the work for my doctoral thesis. I would like to thank **NeoData** and **Università di Catania** for their valuable contributions to the development of this project.
75
-
76
-
77
-
78
-
 
1
+ # GordonAI
2
+
3
+ GordonAI is an AI package designed for sentiment analysis, emotion detection, and fact-checking classification. The models are pre-trained on three languages: **Italian**, **English**, and **Spanish**.
4
+
5
+ ## Features
6
+ This model has been trained for text sentiment classification. It is capable of distinguishing into three categories: **positive**, **negative**, and **neutral**
7
+
8
+ The model is based on the pre-trained version of DeBERTa-v3-large from Microsoft and has been fine-tuned on a sentiment analysis dataset to adapt to recognizing emotions in text.
9
+
10
+ ## Usage
11
+
12
+ You can use the `GordonAI` to predict the sentiment of a text. The analyzer classifies texts as positive, negative, or neutral.
13
+
14
+ ```python
15
+ from transformers import pipeline
16
+
17
+ # Load the pipeline for text classification
18
+ classifier = pipeline("text-classification", model="VinMir/GordonAI-sentiment_analysis")
19
+
20
+ # Use the model to classify the sentiment of a text
21
+ result = classifier("I love this!")
22
+ print(result)
23
+ ```
24
+
25
+ ## Requirements
26
+ Python >= 3.9
27
+ transformers
28
+ torch
29
+
30
+ You can install the dependencies using:
31
+ ```bash
32
+ pip install transformers torch
33
+ ```
34
+
35
+ ## Acknowledgments
36
+
37
+ This package is part of the work for my doctoral thesis. I would like to thank **NeoData** and **Università di Catania** for their valuable contributions to the development of this project.