Skip to content
heart

GitHub Action

Quick Sentiment Analysis

v1.1.0 Latest version

Quick Sentiment Analysis

heart

Quick Sentiment Analysis

Analyze the sentiment of provided text

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Quick Sentiment Analysis

uses: jacobjmarks/quick-sentiment-analysis@v1.1.0

Learn more about this action in jacobjmarks/quick-sentiment-analysis

Choose a version

Quick Sentiment Analysis

Utilise the sentiment module to analyze the sentiment of provided text.

Inputs

text

Text to analyze

Outputs

result

Sentiment analysis results.

Result is formatted as JSON. Example:

{
    "score": 1,
    "comparative": 0.1111111111111111,
    "calculation": [ { "allergic": -2 }, { "love": 3 } ],
    "tokens": [
        "i",
        "love",
        "cats",
        "but",
        "i",
        "am",
        "allergic",
        "to",
        "them"
    ],
    "words": [
        "allergic",
        "love"
    ],
    "positive": [
        "love"
    ],
    "negative": [
        "allergic"
    ]
}

Example usage

- uses: jacobjmarks/quick-sentiment-analysis@v1
  id: sentiment-analysis
  with:
    text: "I love cats, but I am allergic to them."

- run: echo '${{ steps.sentiment-analysis.outputs.result }}'