Sentiment analysis (SageMaker model)

This sentiment analysis uses the latest deep learning technologies to analyze a sentence or paragraph and classify the text as "positive" or "negative".

Once provisioned, you can query the model as a REST api:

 

Example query:

Note that your endpoint name might differ from this example.

aws sagemaker-runtime invoke-endpoint --endpoint-name sigmodata-sentiment --body '{ "input": ["I feel pretty bad about this right now"] }' --content-type "application/json" out.txt

 

This will save the results to out.txt. The results will look like this

{
  "results": [
    {
      "confidence": 0.9277947396039963,
      "input": "I feel pretty bad about this right now",
      "sentiment": "negative"
    }
  ]
}