Retrieve the sentiment class with the highest score for a given piece of text.
curl --request POST \
--url http://csat.alamedaproject.eu:5050/sentiment \
--body '{"text":"I had a lovely walk in the park today."}'
fetch('http://csat.alamedaproject.eu:5050/sentiment', {
method: 'POST',
body: {
"text": "I had a lovely walk in the park today."
},
})
.then(e => e.json())
.then((data) => {
console.log('Request succeeded with JSON response', data);
})
.catch((error) => {
console.log('Request failed', error);
});
const request = require('request');
const options = {
method: 'POST',
url: 'http://csat.alamedaproject.eu:5050/sentiment',
body: {
"text": "I had a lovely walk in the park today."
},
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
url = "http://csat.alamedaproject.eu:5050/sentiment"
headers = {
}
body = {
"text": "I had a lovely walk in the park today."
}
response = requests.POST(url, headers=headers, body=body)