https://github.com/dozyio/msg-api
Sentiment Analysis with Laravel & AWS Comprehend
https://github.com/dozyio/msg-api
aws comprehend laravel php sentiment-analysis
Last synced: 6 months ago
JSON representation
Sentiment Analysis with Laravel & AWS Comprehend
- Host: GitHub
- URL: https://github.com/dozyio/msg-api
- Owner: dozyio
- Created: 2021-11-22T17:16:41.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-23T01:26:27.000Z (almost 4 years ago)
- Last Synced: 2025-02-16T03:32:56.077Z (8 months ago)
- Topics: aws, comprehend, laravel, php, sentiment-analysis
- Language: PHP
- Homepage: https://github.com/dozyio/msg-api
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Msg-api - Sentiment analysis with Laravel and AWS Comprehend
A Laravel example project demoing sentiment analysis using AWS comprehend via Larvel API.
A lovely text emoji is returned showing the sentiment of the input text.# Usage
Configure your .env file, ensure to set a database and AWS credentials.
## Running the server
```
php artisan migrate:fresh && php artisan serve
```## API
### Perform analysis
```
curl -i -H "Accept: application/json" -H "Content-Type: application/json" --request POST --data '{"name":"test", "message":"Do you like our owl?"}' http://127.0.0.1:8000/api/messages
```### View all messages
```
curl -i -H "Accept: application/json" http://127.0.0.1:8000/api/messages
```### View a specific message
```
curl -i -H "Accept: application/json" http://127.0.0.1:8000/api/messages/1
```