You will find here explanations about the DAnIEL API
Ask DAnIEL by POST method using this url (https://daniel.greyc.fr/public/api_daniel.php). Store the text you want DAnIEL to process in the POST request with the 'content' key.
How to make a POST request in PHP :
<?php
$test = "<p>Some content in a paragraph</p><p>Another paragraph with other content</p>";
$data = array("content"=>$test);
$postdata = http_build_query($data);
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
$url = "https://daniel.greyc.fr/public/api_daniel.php ";
$result = file_get_contents($url, false, $context);
echo $result;
?>
Here is an example of output generated by DAnIEL from the text above :
{
" POST request ": {
"domain": "general",
"score": 0.78,
"reference": "N/A",
"offsets": [[201, 214], [263, 276]]
},
" DAnIEL ": {
"domain": "general",
"score": 1.0,
"reference": "N/A",
"offsets": [[43, 50], [66, 73], [176, 183]]
}
}
11111111111111