Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.03 KB

README.md

File metadata and controls

42 lines (29 loc) · 1.03 KB

Benthos Vader

Benthos with sentiment analysis support based on VADER (Valence Aware Dictionary and sEntiment Reasoner).

This project adds a sentiment() bloblang method to Benthos which can be called on any string field within a bloblang mapping.

Wraps the github.com/jonreiter/govader package. See its docs for more information.

Build instructions

> docker build -t mihaitodor/benthos-vader:latest .

Run instructions

Create a file called config.yaml with the following contents:

input:
  stdin: {}

pipeline:
  processors:
    - bloblang: root = content().sentiment()

output:
  stdout: {}

Run the mihaitodor/benthos-vader Docker container using this config:

> 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.