Watson NLU 情绪不一致
我有 2 个非常简单的句子,它们从 IBM Watson NLU 引擎产生非常不同的情感值。所以我不知道如何配置 API 来一致地处理每个句子。
"text": "WidgetX has been recently created. It is terrible.",
"features": {
"sentiment": {},
"entities": {
"sentiment": true
},
"keywords": {
"sentiment": true
}
}
产生中立的情绪:
"keywords": [
{
"text": "WidgetX",
"sentiment": {
"score": 0,
"label": "neutral"
},
"relevance": 0.5,
"count": 1
}
],
"entities": [
{
"type": "Organization",
"text": "WidgetX",
"sentiment": {
"score": 0,
"label": "neutral"
},
"relevance": 0.978348,
"count": 1,
"confidence": 0.562355
}
]
而将文本更改为以下会产生正确的非常负面的情绪:
"text": "WidgetX has been recently created, and it is terrible.",
"keywords": [
{
"text": "WidgetX",
"sentiment": {
"score": -0.964476,
"label": "negative"
},
"relevance": 0.5,
"count": 1
}
],
"entities": [
{
"type": "Organization",
"text": "WidgetX",
"sentiment": {
"score": -0.964476,
"label": "negative"
},
"relevance": 0.978348,
"count": 1,
"confidence": 0.319847
}
]
I have 2 very simple sentences which produce very different sentiment values from the IBM Watson NLU engine. So I am at a loss how to configure the APIs to handle each sentence consistently.
"text": "WidgetX has been recently created. It is terrible.",
"features": {
"sentiment": {},
"entities": {
"sentiment": true
},
"keywords": {
"sentiment": true
}
}
Produces a neutral sentiment:
"keywords": [
{
"text": "WidgetX",
"sentiment": {
"score": 0,
"label": "neutral"
},
"relevance": 0.5,
"count": 1
}
],
"entities": [
{
"type": "Organization",
"text": "WidgetX",
"sentiment": {
"score": 0,
"label": "neutral"
},
"relevance": 0.978348,
"count": 1,
"confidence": 0.562355
}
]
Whereas changing the text to below produces the correct very negative sentiment:
"text": "WidgetX has been recently created, and it is terrible.",
"keywords": [
{
"text": "WidgetX",
"sentiment": {
"score": -0.964476,
"label": "negative"
},
"relevance": 0.5,
"count": 1
}
],
"entities": [
{
"type": "Organization",
"text": "WidgetX",
"sentiment": {
"score": -0.964476,
"label": "negative"
},
"relevance": 0.978348,
"count": 1,
"confidence": 0.319847
}
]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很有趣。这句话
是一个句子。根据上下文,
it
可以指代许多事物,例如主格名词WidgetX
或副词recently
或动词created
。因此,陈述了以下一项或多项。在所有情况下,它都是一个否定的陈述。
这句话
由两个句子组成。第一句只是说明 WidgetX 已被创建,没有任何情感。第二个语句中没有上下文,只有代词
it
,其中It
可能与第一个句子相关,也可能没有。This is interesting. The phrase
is a single sentence. By context
it
can refer to a number of things the nominative nounWidgetX
or the adverbrecently
or the verbcreated
. So that one or more of the following is being stated.In all cases its a negative statement.
The phrase
comprises of two sentences. The first sentence just states that WidgetX has been created, there is no emotion. There is no context in the second statement, just the pronoun
it
, whereIt
might be related to the first sentence or it might not.