Developer Guide › Extract Method
The 'extract' method is a convenience method that allows entity extraction without storage of the results to the muddy platform.
Methods
Extract entities
The extract entities is used to extract entities from a page or some text. The API can only be called in a synchronous fashion.
To analyse some content, a post should be submitted to the URL below.
http://muddy.it/extract
An xml or json document should be submitted, with an appropriate 'Content-Type' header.
The available response formats are xml and json. To set the response format, the request 'Accept' header needs to be set to application/xml or application/json.
The HTTP request must contain a document that defines the URL or text to be analysed and may also contain configuration options for the request. The document may be submitted as an XML or JSON response. The document contains two sections, the 'page' section that contains attributes to be set for the page and an 'options' section which customises the behaviour of the categorisation process.
The available request options are as per the page create API (ignoring any options related to result storage).
Sample Request
View page.xsd
<?xml version="1.0" encoding="UTF-8"?>
<page>
<uri>http://news.bbc.co.uk/1/hi/entertainment/8219362.stm</uri>
<options>
<realtime>true</realtime>
</options>
</page>
Sample Response
A successful response is shown below.
<response status="OK">
<created-at>2009-04-01T22:56:30Z</created-at>
<entities>
<entity>
<uri>http://dbpedia.org/resource/United_Auto_Workers</uri>
<confidence>0.625</confidence>
<classification>http://muddy.it/ontology/Organisation</classification>
<position>345</position>
</entity>
<entity>
<uri>http://dbpedia.org/resource/United_Auto_Workers</uri>
<confidence>0.625</confidence>
<classification>http://muddy.it/ontology/Organisation</classification>
<position>445</position>
</entity>
<entity>
<uri>http://dbpedia.org/resource/Detroit</uri>
<confidence>0.252605482752542</confidence>
<classification>http://muddy.it/ontology/Place</classification>
<position>545</position>
</entity>
</entities>
<title>1 Auto story</title>
<identifier>65c02056-e561-455c-ac6f-239415160711</identifier>
</response>