Closed jnehring closed 7 years ago
The turtle causes problems because of the wrong nif prefix (...nif-core/2.0#>
). Try this body content, it works fine:
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
<http://freme-project.eu/#char=0,20>
a nif:String , nif:RFC5147String , nif:Context ;
nif:beginIndex "0"^^xsd:nonNegativeInteger ;
nif:endIndex "20"^^xsd:nonNegativeInteger ;
nif:isString "\nWelcome to Berlin!\n"@en ;
dc:identifier "1" .
Still does not work with the turtle you provided.
@jnehring did you use curl? In this case, you have to set a content-type header. Otherwise curl defaults to application/x-www-form-urlencoded
. This causes that the freme-ner controller receives the following body content (instead of the submitted turtle):
language=de&dataset=dbpedia&informat=turtle&%40prefix+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E+.%0D%0A%40prefix+itsrdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2005%2F11%2Fits%2Frdf%23%3E+.%0D%0A%40prefix+nif%3A+%3Chttp%3A%2F%2Fpersistence.uni-leipzig.org%2Fnlp2rdf%2Fontologies%2Fnif-core%23%3E+.%0D%0A%40prefix+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E+.%0D%0A%3Chttp%3A%2F%2Ffreme-project.eu%2F%23char=0%2C20%3E%0D%0A++++++++a+++++++++++++++nif%3AString+%2C+nif%3ARFC5147String+%2C+nif%3AContext+%3B%0D%0A++++++++nif%3AbeginIndex++%220%22%5E%5Exsd%3AnonNegativeInteger+%3B%0D%0A++++++++nif%3AendIndex++++%2220%22%5E%5Exsd%3AnonNegativeInteger+%3B%0D%0A++++++++nif%3AisString++++%22%5CnWelcome+to+Berlin%21%5Cn%22%40en+%3B%0D%0A++++++++dc%3Aidentifier+++%221%22+.
I hope this helps.
Thank you @ArneBinder . I did not specify the content-type header. Using this CURL it works:
curl -X POST --header "Content-Type: text/turtle" -d "@test.ttl" "http://api-dev.freme-project.eu/current/e-entity/freme-ner/documents?language=de&dataset=dbpedia&informat=turtle"
So this issue is solved
produces a bad request without further error message. The log file says
This causes a problem with e-Internationalization.