Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

taranis-sentiment-analysis

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

taranis-sentiment-analysis

Sentiment analysis Bot for Taranis AI

  • 1.2.0
  • PyPI
  • Socket score

Maintainers
1

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. The API intelligently chooses the appropriate model based on the text length, utilizing XLM-RoBERTa for shorter texts and Longformer for longer texts.

Features

  • Multi-language Support with XLM-RoBERTa and Longformer.
  • 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.api_multimodel

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_sentiment \
  -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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc