Skip to main content

A comprehensive tool for sentiment analysis and tone review, empowered by GPT4ALL.

Project description

GPT4ALL Tone Analyzer

gpt4all-tone is a comprehensive tool for sentiment analysis and tone review, empowered by GPT4ALL. It reads a text input and evaluates the sentiment, returning a numerical value indicating the sentiment of the text.

Installation

  1. Clone this repository to your local machine or install via pip:
pip install gpt4all-tone

or

pip3 install gpt4all-tone
  1. Ensure you have the gpt4all library installed. It will be installed automatically if you install gpt4all-tone via pip.

Usage

You can use this tool via the command line or import it into your Python project.

Command Line Usage:

gpt4all_tone --model "orca-mini-3b.ggmlv3.q4_0.bin" --char-limit 2000 "Your text here"

Parameters:

  • --model: Specifies the model name. Default is orca-mini-3b.ggmlv3.q4_0.bin.
  • --char-limit: Specifies the character limit for the prompt. Default is 2000.
  • input: Specifies the input text to analyze.

Python Usage:

from gpt4all_tone import ToneAnalyzer

analyzer = ToneAnalyzer("orca-mini-3b.ggmlv3.q4_0.bin", "Your text here")
result = analyzer.run()
print(result)

Output

The script will return a numerical value indicating the sentiment of the text based on the following scale:

  • 1: Positive tone
  • 0.75: More Positive tone
  • 0.5: Neutral tone
  • 0.25: More Negative tone
  • 0: Negative tone

In case the sentiment analysis encounters an issue or can't determine the sentiment, it will return -1.

Contributing

Feel free to fork this repository, create a feature branch, and send us a pull request.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpt4all-tone-0.22.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

gpt4all_tone-0.22-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

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