Skip to main content

Sentiment Analysis Tool

Project description

Swarmauri Logo

PyPI - Downloads PyPI - Python Version PyPI - License PyPI - Version


Sentiment Analysis Tool

A tool for analyzing the sentiment of text using Hugging Face's transformers library. This tool provides simple sentiment analysis capabilities, classifying text as POSITIVE, NEGATIVE, or NEUTRAL.

Installation

pip install swarmauri_tool_sentimentanalysis

Usage

Here's a basic example of how to use the Sentiment Analysis Tool:

from swarmauri.tools.SentimentAnalysisTool import SentimentAnalysisTool

# Initialize the tool
tool = SentimentAnalysisTool()

# Analyze sentiment
result = tool("I love this product!")
print(result)  # {'sentiment': 'POSITIVE'}

# Another example
result = tool("This product is okay.")
print(result)  # {'sentiment': 'NEUTRAL'}

Want to help?

If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.

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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file swarmauri_tool_sentimentanalysis-0.7.0.dev4.tar.gz.

File metadata

File hashes

Hashes for swarmauri_tool_sentimentanalysis-0.7.0.dev4.tar.gz
Algorithm Hash digest
SHA256 3f23d0874ad57008708718b2c8c5c0774e3a81e3cfb7117f9b100f44d736d19f
MD5 697273e44057eb99cbf48f266ffd1e5b
BLAKE2b-256 cc194557ad2734d174c40597173d44d09447540a7cded7ed364f88d396565ff5

See more details on using hashes here.

File details

Details for the file swarmauri_tool_sentimentanalysis-0.7.0.dev4-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_tool_sentimentanalysis-0.7.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 113fbca015ba160956ec7a3efdb9b6c8d9d8db3059fe4a774553c76f699bedb5
MD5 e8f26658e73239d2094d0f9078464303
BLAKE2b-256 28a96373c4e2ab9910e33354f45327913a077d17923892377b0f4496f3ff2c07

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page