I'm working with Watson NLU (with a custom model) and my problem is that when I ask for the entities sentiment (as explained in the documentation) the POST doesn't return it, just the entity type. I pass this features:
"features": {
"sentiment": {},
"relations":{
"model":"XXXXXXXXXXXXXXXXX"
},
"entities":{
"model":"XXXXXXXXXXXXXXXXX",
"sentiment":"1" ----I've tried with "true" too---
}
}
¿Am I doing anything wrong? Thanks!
In order to enable targeted sentiment for entities, you need to set
"sentiment": true
. Note that you don't need quotes around true, it is a boolean value not a string. See below"features": { "sentiment": {}, "relations":{ "model":"XXXXXXXXXXXXXXXXX" }, "entities":{ "model":"XXXXXXXXXXXXXXXXX", "sentiment": true } }