https://github.com/mihaitodor/benthos-vader
Benthos with sentiment analysis support
https://github.com/mihaitodor/benthos-vader
benthos sentiment-analysis vader
Last synced: 4 months ago
JSON representation
Benthos with sentiment analysis support
- Host: GitHub
- URL: https://github.com/mihaitodor/benthos-vader
- Owner: mihaitodor
- License: mit
- Created: 2022-05-10T02:11:07.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-27T22:56:27.000Z (about 4 years ago)
- Last Synced: 2025-04-18T16:28:28.790Z (about 1 year ago)
- Topics: benthos, sentiment-analysis, vader
- Language: Go
- Homepage:
- Size: 59.6 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Benthos Vader
[Benthos](https://benthos.dev) with sentiment analysis support based on VADER
(Valence Aware Dictionary and sEntiment Reasoner).
This project adds a `sentiment()`
[bloblang method](https://www.benthos.dev/docs/guides/bloblang/methods) to
Benthos which can be called on any string field within a bloblang mapping.
Wraps the [github.com/jonreiter/govader](https://github.com/jonreiter/govader)
package. See its [docs](https://pkg.go.dev/github.com/jonreiter/govader) for
more information.
## Build instructions
```shell
> docker build -t mihaitodor/benthos-vader:latest .
```
## Run instructions
Create a file called `config.yaml` with the following contents:
```yaml
input:
stdin: {}
pipeline:
processors:
- bloblang: root = content().sentiment()
output:
stdout: {}
```
Run the `mihaitodor/benthos-vader` Docker container using this config:
```shell
> docker run --rm -it -v $(pwd)/config.yaml:/etc/benthos/config.yaml mihaitodor/benthos-vader:latest -c /etc/benthos/config.yaml
```
Type any sentence and hit enter.