Sentiment analysis Bot for Taranis AI
Project description
Taranis AI Sentiment Analysis
This project integrates sentiment analysis into Taranis AI, allowing for the classification of news items as positive, negative, or neutral using transformer models.
Features
- Multi-language Support with XLM-RoBERTa.
- Pre-trained Models for high-accuracy sentiment classification.
- Flask API for external calls to the sentiment analysis.
Setup
Prerequisites
- Python 3.8+
Installation
To install dependencies:
pip install -r requirements.txt
Running the API
To start the Flask API:
python -m sentiment_analysis.api_xlmrobertabase
By default, the API runs at http://127.0.0.1:5003/.
Example API Call
To test the API with a POST request, use curl:
curl -X POST http://127.0.0.1:5003/analyze_xlmrobertabase \
-H "Content-Type: application/json" \
-d '{"text": "This is an example sentence to analyze sentiment."}'
Example Response
{
"sentiment": {
"label": "POSITIVE",
"score": 0.94
}
}
License
EUROPEAN UNION PUBLIC LICENCE v. 1.2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for taranis_sentiment_analysis-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2064494e7abff078e3b5f78f82b22f44336787bf09b84d1c623a16bb8d79507d |
|
MD5 | 3d921659324a88f0d05e281c8977e4d8 |
|
BLAKE2b-256 | 7a2f889f3f7f4e5a0e898cf9d9e33cd0295b6c80656a1fde1c746d77a407d935 |
Close
Hashes for taranis_sentiment_analysis-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03817f0061a8e502fe1b5628a6b8143b85cfe89715c399e988fe4be2f5ef69d7 |
|
MD5 | ef2e6b5e986230be5512b30d9043dfa1 |
|
BLAKE2b-256 | c094a94a36c43bbfac5c4d7d06c6efd8c39b945205cf1c42f5be90a22e19dea5 |