Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teddyoweh/sentiment-analysis-api
The Sentiment Analysis Api was created using python flask module,it allows users to parse a text or sentence throught the (?text) arguement, then view the sentiment analysis of that sentence. It can be implementable into a web application.
https://github.com/teddyoweh/sentiment-analysis-api
api data-science flask machine-learning nlp-machine-learning php python sentiment-analysis
Last synced: about 1 month ago
JSON representation
The Sentiment Analysis Api was created using python flask module,it allows users to parse a text or sentence throught the (?text) arguement, then view the sentiment analysis of that sentence. It can be implementable into a web application.
- Host: GitHub
- URL: https://github.com/teddyoweh/sentiment-analysis-api
- Owner: teddyoweh
- License: gpl-3.0
- Created: 2022-04-02T05:33:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-22T03:26:28.000Z (over 2 years ago)
- Last Synced: 2023-03-04T00:49:54.325Z (almost 2 years ago)
- Topics: api, data-science, flask, machine-learning, nlp-machine-learning, php, python, sentiment-analysis
- Language: Python
- Homepage: https://sentiment-analytics-api.herokuapp.com/?text=Im%20a%20developer
- Size: 268 KB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.MD
Awesome Lists containing this project
README
# Sentiment Analysis Api
**A Flask Sentiment Analysis API, with visual implementation**
The Sentiment Analysis Api was created using python flask module,it allows users to parse a text or sentence throught the (?text) arguement, then view the sentiment analysis of that sentence. It can be implementable into a web application.
* **Text** -The sentence to be analyzed.
* **Sentiment** -Possible outputs include,[ Positive, Neutral or Negative]
* **Sentiment Level** -Possible outputs include,[ P, P+, P++, NEU, N, N+, N++]
* **Polarity** -Range [-1,1]
* **Subjectivity** -Range [-1,1]Sample Output-{"Polarity":0.5,"Sentiment":"Positive","Sentiment Level":"P+","Subjectivity":0.6,"Text":"I love to code"}
## RequirementsPython 3.8.5+, pipenv, Textblook, PHP
## Installation
First, clone this repository.
$ git clone https://github.com/teddyoweh/Sentiment-Analysis-API
$ cd Sentiment-Analysis-APIAfter, install all necessary to run:
$ sudo apt install php
$ pipenv install## Implementation
Run the application:$ pipenv run python run.py
To the api output, access this url in your browser:
http://localhost:5000
To see your see implemenation of the Sentiment Analysis API:$ php -S localhost:8000
Then access this url in your browser:
http://localhost:8000
## API Output
![P++](images/api.png)## API Implementation
### Postive Sentiment
![P++](images/p++.png)### Neurtal Sentiment
![P++](images/neu.png)### Negative Sentiment
![P++](images/n++.png)