Linking of a single entity
Closed this issue · 10 comments
Some users might want to perform linking of a single entity. The client provides surface form, e.g. "Diego Maradona", the FREME NER links the entity and returns the results in NIF.
done. To link single entity you need to send the name of the entity (surface form) as body of the request or as value of the input
parameter. Next, you need to specify the informat
parameter to text
and the mode
should be link
.
Here is an example:
http://api-dev.freme-project.eu/current/e-entity/freme-ner/documents/?informat=text&input=FC%20Inter%20Milan&outformat=turtle&language=en&dataset=dbpedia&mode=link
The entity "FC Inter Milan" is sent as text and linked to a DBpedia resource.
@ArneBinder can you please update the documentation accordingly?
@m1ci When I do the following curl
command I get an ExternalServiceFailedException.
curl -X POST 'http://api-dev.freme-project.eu/current/e-entity/freme-ner/documents/?informat=text&input=FC%20Inter%20Milan&outformat=turtle&language=en&dataset=dbpedia&mode=link'
The exception is
{
"exception": "eu.freme.broker.exception.ExternalServiceFailedException",
"path": "/e-entity/freme-ner/documents/",
"error": "Bad Gateway",
"status": 502,
"timestamp": 1453711336487
}
EDIT: Never mind, I have to do a get.
@ArneBinder Could you ping me when the documentation is updated?
Sorry, this completely slipped my mind. In general, @josauder restructured a lot of the documentation page, he is much more into it. I will forward this to him, it should be fixed tomorrow.
Sorry but could you please quickly elaborate on what exactly is different about linking a single entity with the curl you provided as opposed to just normally calling e-entity service with the mode
parameter set to link
?
The mode
parameter has already been Documented as mentioned in another issue.
well, not mode=link has following logic:
- mode=link and input is a text - the input text will be considered as a single entity, and it will be linked to an entity in the specified dataset
- mode=link and input is RDF/NIF - all entities in the input NIF, will be linked to database instances
Does this answer your question?
I documented this in the api-doc unter e-entity/freme-ner/documents
under mode
parameter. If you agree with the way it is Documented, go ahead and close this issue.
The mode
parameter Documentation is now rather lengthy - I am open for different suggestions.
Based on my tests, the API behaves as the documentation states.
according to Pieter we can close the issue.