1

I am using Apache Stanbol. It works for enhancing the text, however when I tried sentiment analysis and sentence detection, it doesn't work.

I tried this code

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"

But it gives blank { } output, I tried changing the header attributes but no luck.

am I missing something? Do I need to do some configuration first?

I even tried adding analyzer in the enhancer chain but the same blank output, also tried REST API for opennlp-sentence, but it didn't work.

Salman
  • 9,299
  • 6
  • 40
  • 73
  • Have you resolved the problem. I also want to run it but got no result. Could you tell how to correctly call the engine? @Салман – C. Wang Feb 22 '16 at 09:54

1 Answers1

1

I guess you are sending data to the wrong endpoint... usually calls to the enhancer need to be done to all chains:

http://host/stanbol/enhancer

or to a concrete chain:

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

The enhancer results couldn't be serialized as plain text, but in any of the RDF serialization supported by Stanbol. So the Accept header would need to be any of those, text/turtle for instance.

Further details at the documentation: http://stanbol.apache.org/docs/trunk/components/enhancer/#RESTful_API

wikier
  • 2,517
  • 2
  • 26
  • 39