API NER with url

27 views
Skip to first unread message

Thomas Pfuhl

unread,
May 15, 2020, 5:11:27 AM5/15/20
to Dandelion Support Forum
Hello,
when onvoking the API with a URL which points to a plain text file, I get an empty output. The API key is valid, though.
Using the text parameter instead of the url parameter, I get an output.
What's wrong? Thanks for hints!
th

Giacomo Berardi

unread,
May 18, 2020, 6:51:36 AM5/18/20
to Dandelion Support Forum
Hi Thomas,
can you please show us an example of API call you are making?

Giacomo Berardi 
Dandelion team

Thomas Pfuhl

unread,
May 19, 2020, 12:27:01 PM5/19/20
to Dandelion Support Forum
Buon giorno Giacomo,

buon giorno Giacomo,
molto grazie per la sua aiuta !

I presume you do not need my API key (token).

gives a jason with empty results.
Even shorter text (one sentence) submitted by this URL gives the same empty result.
what's wrong?

greetings fom Berlin,
Thomas

Giacomo Berardi

unread,
May 20, 2020, 6:00:25 AM5/20/20
to Dandelion Support Forum
Hi Thomas,
the problem is about the `url` parameter, which has a specific use for web pages, in fact, from the documentation:
use "url" when you have an URL and you want the Entity Extraction API to work on its main content; it will fetch the URL for you, and use an AI algorithm to extract the relevant part of the document to work on; in this case, the main content will also be returned by the API to allow you to properly use the annotation offsets;
The content extraction algorithm in this case does not find the html, so it immediately drops the text file content

I strongly suggest you to retrieve the text content first, and then use the `text` parameter of the Dandelion API

Cheers

Giacomo Berardi
Dandelion team

Thomas Pfuhl

unread,
May 22, 2020, 5:21:59 AM5/22/20
to Dandelion Support Forum
Buon giorno Giuacomo,
as you outlined, the NER works fine when embedding the text in a html file and involing that Url.
Thank you for your precious hint! Thomas
Reply all
Reply to author
Forward
0 new messages