【问题标题】:Apache Stanbol sentiment analysis and sentence detection not workingApache Stanbol 情绪分析和句子检测不起作用
【发布时间】:2013-02-19 15:49:59
【问题描述】:

我正在使用 Apache Stanbol。它适用于增强文本,但是当我尝试情感分析和句子检测时,它不起作用。

我试过这段代码

curl -v -X POST -H "Accept: text/plain" -H "Content-type: text/plain; \
charset=UTF-8" --data "Some text for analysis" \
"http://localhost:8081/enhancer/engine/sentiment-wordclassifier"

但它给出了空白的{ } 输出,我尝试更改标题属性但没有运气。

我错过了什么吗?我需要先做一些配置吗?

我什至尝试在增强器链中添加分析器但相同的空白输出,还尝试了opennlp-sentence 的 REST API,但没有成功。

【问题讨论】:

  • 您解决了这个问题吗?我也想运行它但没有结果。你能告诉如何正确调用引擎吗? @Салман

标签: nlp sentiment-analysis opennlp apache-stanbol


【解决方案1】:

我猜你将数据发送到错误的端点...通常需要对所有链执行对增强器的调用:

http://host/stanbol/enhancer

或具体链:

http://host/stanbol/enhancer/chain/<name>

增强器结果不能被序列化为纯文本,但可以在 Stanbol 支持的任何 RDF 序列化中。因此,Accept 标头需要是其中的任何一个,例如 text/turtle。

文档中的更多详细信息:http://stanbol.apache.org/docs/trunk/components/enhancer/#RESTful_API

【讨论】:

  • 情感分析的具体是什么?我找到了关于它的小教程。谢谢!
猜你喜欢
  • 2014-08-02
  • 1970-01-01
  • 1970-01-01
  • 2013-02-07
  • 2019-05-06
  • 2013-02-02
  • 2015-03-15
  • 2016-09-12
  • 2014-12-11
相关资源
最近更新 更多