Closed jnehring closed 7 years ago
I don't think that each e-service should add such general info.
Context collection (nif:ContextCollection) should be created by client submitting the NIF or by FREME server while converting from any format to NIF.
Of course, the FREME server can normalize/tune up/refine the NIF ducument, but this should be done in one place not in each e-service.
I see your point. @m1ci what do you think?
since FREME acts as broker, this info can be also added by FREME.
whats the status of this issue? @andish @jnehring
We did not work on this issue. I will ask @bgrusdt to implement it in the broker.
@bgrusdt please implement this feature in FREMECommon
I have implemented it in this commit. I have not yet included called the new method in e-translation and e-terminology.
This is now included for e-translation and e-terminology.
Thank you! One more thing:
When the prefix parameter is set, then please change the collection also:
Example:
curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: ab7dc708-5b2e-80ca-f2ca-57fd96901c0b" -d 'Show me the source of knowledge' "http://api-dev.freme-project.eu/current/e-translation/tilde?input=Hello%2C%20world!&informat=text&outformat=turtle&source-lang=en&target-lang=de&nif-version=2.1&prefix=http%3A%2F%2Ftest.de"
produces
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix its: <http://www.w3.org/2005/11/its> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .
<http://test.de/#offset_0_5>
a nif:Phrase , nif:OffsetBasedString ;
nif:anchorOf "Hello"^^xsd:string ;
nif:annotationUnit [ itsrdf:taAnnotatorsRef <https://services.tilde.com/systems/translation/smt-c71f6f22-5e2a-4682-a4cc-2d97d38fac5e> ;
itsrdf:target "Guten Tag"@de
] ;
nif:beginIndex "0"^^xsd:nonNegativeInteger ;
nif:endIndex "5"^^xsd:nonNegativeInteger ;
nif:referenceContext <http://test.de/#offset_0_13> .
<http://freme-project.eu/#collection>
a nif:ContextCollection ;
nif:hasContext <http://test.de/#offset_0_13> ;
<http://purl.org/dc/terms/conformsTo>
"http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core/2.1" .
The line <http://freme-project.eu/#collection>
should use the prefix parameter also.
@jnehring I have changed this with this commit. I've also updated the calls to this method in e-translation and e-terminology.
ok great thanks
When nif-version=2.1 is set then e-Services should add rdf data to annotate the nif version. This is already implemented in freme ner (example). The added RDF is:
This will prevent problems like #113