freme-project / e-Entity

Apache License 2.0
1 stars 1 forks source link

Linking of a single entity #67

Closed m1ci closed 8 years ago

m1ci commented 8 years ago

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.

m1ci commented 8 years ago

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.

m1ci commented 8 years ago

@ArneBinder can you please update the documentation accordingly?

pheyvaer commented 8 years ago

@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.

pheyvaer commented 8 years ago

@ArneBinder Could you ping me when the documentation is updated?

ArneBinder commented 8 years ago

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.

josauder commented 8 years ago

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.

m1ci commented 8 years ago

well, not mode=link has following logic:

Does this answer your question?

josauder commented 8 years ago

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.

pheyvaer commented 8 years ago

Based on my tests, the API behaves as the documentation states.

m1ci commented 8 years ago

according to Pieter we can close the issue.