Sentiment Analysis

Determine positive or negative sentiment from text

Koios Platform License · Internet Access · Calls Other Algorithms

Run an Example

{
"document": "I really like Koios!"
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[
  {
    "sentiment": 0.474,
    "document": "I really like Koios!"
  }
]

Install & Use

Use
curl -X POST -d '{
  "document": "I really like Koios!"
}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.koios.ai/v1/algo/nlp/SentimentAnalysis/1.0.4
Use
algo run nlp/SentimentAnalysis/1.0.4 -d '{
  "document": "I really like Koios!"
}'
Use
import (
  koios "github.com/koiosai/koios-go"
)

input := map[string]interface{}{
  document: "I really like Koios!"
}

var client = koios.NewClient("YOUR_API_KEY")
algo, _ := client.Algo("nlp/SentimentAnalysis/1.0.4")
resp, _ := algo.Pipe(input)
response := resp.(*koios.AlgoResponse)
fmt.Println(response.Result)
Use
import com.koios.*;
import com.koios.algo.*;

String input = "{"
 + "  \"document\": \"I really like Koios!\""
 + "}";
KoiosClient client = Koios.client("YOUR_API_KEY");
Algorithm algo = client.algo("nlp/SentimentAnalysis/1.0.4");
AlgoResponse result = algo.pipeJson(input);
System.out.println(result.asJsonString());
Use
var input = {
  "document": "I really like Koios!"
};
Koios.client("YOUR_API_KEY")
    .algo("nlp/SentimentAnalysis/1.0.4")
    .pipe(input)
    .then(function(output) {
        console.log(output);
    });
Use
using Koios;

var input = "{"
 + "  \"document\": \"I really like Koios!\""
 + "}";
var client = new Client("YOUR_API_KEY");
var algorithm = client.algo("nlp/SentimentAnalysis/1.0.4");
var response = algorithm.pipeJson<object>(input);
Console.WriteLine(response.result);
Use
var input = {
  "document": "I really like Koios!"
};
Koios.client("YOUR_API_KEY")
    .algo("nlp/SentimentAnalysis/1.0.4")
    .pipe(input)
    .then(function(response) {
        console.log(response.get());
    });
Use
import Koios

input = {
  "document": "I really like Koios!"
}
client = Koios.client('YOUR_API_KEY')
algo = client.algo('nlp/SentimentAnalysis/1.0.4')
print(algo.pipe(input))
Use
library(koios)

input <- list("document"="I really like Koios!")
client <- getKoiosClient("YOUR_API_KEY")
algo <- client$algo("nlp/SentimentAnalysis/1.0.4")
result <- algo$pipe(input)$result
print(result)
Use
require 'koios'

input = {
  document: "I really like Koios!"
}
client = Koios.client('YOUR_API_KEY')
algo = client.algo('nlp/SentimentAnalysis/1.0.4')
puts algo.pipe(input).result
Use
use koios::Koios;

let input = json!({
  "document": "I really like Koios!"
});
let client = Koios::client("YOUR_API_KEY");
let algo = client.algo("nlp/SentimentAnalysis/1.0.4");
let response = algo.pipe(input);
Use
import com.koios._
import com.koios.algo._

val input = """{
  "document": "I really like Koios!"
}"""
val client = Koios.client("YOUR_API_KEY")
val algo = client.algo("nlp/SentimentAnalysis/1.0.4")
val result = algo.pipeJson(input)
System.out.println(result.asJsonString)
Use
import Koios

let input = "{"
 + "  \"document\": \"I really like Koios!\""
 + "}";
let client = Koios.client(simpleKey: "YOUR_API_KEY")
let algo = client.algo(algoUri: "nlp/SentimentAnalysis/1.0.4")
algo.pipe(rawJson: input) { resp, error in
  print(resp)
}