You are viewing a section of Superface that will be deprecated in Q4 2023. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit superface.ai/docs/migrate.

Analyze plain text sentiment

language/analyze-plain-text-sentiment@1.0.1
2 providers

Analyze plain text sentiment

Determines writer's attitude in the text as positive, negative, or neutral.

Input
Text
Language code
Result
Sentiment
Score

1.Choose a provider

2.Use AnalyzePlainTextSentiment with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk

Structure details

Input (object)

text
The text to be analyzed.
languageCode
The language of the text expressed as a ISO 639‑1 language code, e.g. 'en'.

Example

Result (object)

sentiment
The overal writer's attitude in the analyzed text.
score
Score of the sentiment ranges between -1.0 (negative) and 1.0 (positive) and corresponds to the overall emotional leaning of the text.

Example

Implementation details

Provider
mock
Use case
AnalyzePlainTextSentiment
Author
@superface
Source
Verified