How to get entities and relation
How to get entities and relation
Posted on: Thu, 08/04/2011 - 09:00
I am using Calais Web-Service for extraction from plain text. I need to extract entities and Relations from the text. But I am only getting Social Tags in the output. When I put the same text in online CalaisViewer I see much richer extraction.
I have done the following two settings, but I still do not get the entities and relations.
Please help.
"Accept", "xml/rdf");
"enableMetadataType", "GenericRelations,SocialTags");
method.setRequestHeader(
method.setRequestHeader(
Trackback URL for this post:
http://www.opencalais.com/trackback/110333

hi Shelly,
you can do the following,
change the content-type to text/raw
or stay with text/xml... but wrap your text with xml style.
it should be
......
the tags name must by Document and Body
Headers of the request: -
PostMethod method = new PostMethod(CALAIS_URL);
method.setRequestHeader("x-calais-licenseID", "xxx");
method.setRequestHeader("Content-Type", "text/xml; charset=UTF-8");
method.setRequestHeader("Accept", "xml/rdf");
method.setRequestHeader("enableMetadataType", "GenericRelations,SocialTags");
Message. My message is plain text and its really a meaningless. But here it is.:-
And now about places. Bangalore, India is one way of saying Bangalore and Bengaluru is another. I am going to Mumbai and he to Bombay.
India is part of Asia. Poland is a nice place with lots of apples and Apple.
Barack Obama met with Sonia Gandhi.
Using the Calais web-service, I do get the SocialTags, but I do not get entities and relations. I tried the same text on CalaisViewer and it showed be entities and relations along with Social Tags.
Headers of the request: -
PostMethod method = new PostMethod(CALAIS_URL);
method.setRequestHeader("x-calais-licenseID", "xxx");
method.setRequestHeader("Content-Type", "text/xml; charset=UTF-8");
method.setRequestHeader("Accept", "xml/rdf");
method.setRequestHeader("enableMetadataType", "GenericRelations,SocialTags");
Message. My message is plain text and its really a meaningless. But here it is.:-
And now about places. Bangalore, India is one way of saying Bangalore and Bengaluru is another. I am going to Mumbai and he to Bombay.
India is part of Asia. Poland is a nice place with lots of apples and Apple.
Barack Obama met with Sonia Gandhi.
Using the Calais web-service, I do get the SocialTags, but I do not get entities and relations. I tried the same text on CalaisViewer and it showed be entities and relations along with Social Tags.
can you please send me the request headers which you send and also the exact content of the body?
you can send it to itay.granik@thomsonreuters.com