Closed ArneBinder closed 8 years ago
This is caused by tilde: services.tilde.com/Terminology
does not understand input with leading \n
.
Compare the result of this call:
curl -X POST -H "Accept: application/turtle" -H "Content-Type: application/turtle" -H "Cache-Control: no-cache" -H "Postman-Token: c355b379-765e-748a-a6f2-80310b04e4ea" -d '@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,8>
a nif:String , nif:Context , nif:RFC5147String ;
nif:beginIndex "0"^^xsd:nonNegativeInteger ;
nif:endIndex "8"^^xsd:nonNegativeInteger ;
nif:isString "\nCheddar"@en ;
dc:identifier "1" .' "https://services.tilde.com/Terminology/?sourceLang=en&targetLang=de&domain&mode=full"
which is:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@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,8> nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "8"^^xsd:nonNegativeInteger;
nif:isString """
Cheddar"""@en;
dc:identifier "1";
a nif:Context,
nif:RFC5147String,
nif:String.
with the result of this call:
curl -X POST -H "Accept: application/turtle" -H "Content-Type: application/turtle" -H "Cache-Control: no-cache" -H "Postman-Token: 73c8392e-5d27-d56c-a911-8717885dafc8" -d '@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,7>
a nif:String , nif:Context , nif:RFC5147String ;
nif:beginIndex "0"^^xsd:nonNegativeInteger ;
nif:endIndex "7"^^xsd:nonNegativeInteger ;
nif:isString "Cheddar"@en ;
dc:identifier "1" .' "https://services.tilde.com/Terminology/?sourceLang=en&targetLang=de&domain&mode=full"
which is:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@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/>.
@prefix its: <http://www.w3.org/2005/11/its>.
@prefix cc: <http://creativecommons.org/ns#>.
@prefix : <https://term.tilde.com/terms/>.
@prefix void: <http://rdfs.org/ns/void#>.
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.
@prefix tbx: <http://tbx2rdf.lider-project.eu/tbx#>.
@prefix decomp: <http://www.w3.org/ns/lemon/decomp#>.
@prefix dct: <http://purl.org/dc/terms/>.
@prefix ontolex: <http://www.w3.org/ns/lemon/ontolex#>.
@prefix ldr: <http://purl.oclc.org/NET/ldr/ns#>.
@prefix odrl: <http://www.w3.org/ns/odrl/2/>.
@prefix dcat: <http://www.w3.org/ns/dcat#>.
@prefix prov: <http://www.w3.org/ns/prov#>.
_:autos82824 rdfs:label "Cheddar"@en;
itsrdf:taConfidence 1 .
<http://freme-project.eu/#char=0,7> nif:anchorOf "Cheddar"@en;
nif:annotationUnit _:autos82824;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "7"^^xsd:nonNegativeInteger;
nif:isString "Cheddar"@en;
nif:referenceContext <http://freme-project.eu/#char=0,7>;
dc:identifier "1";
a nif:Context,
nif:RFC5147String,
nif:String;
itsrdf:term "yes";
itsrdf:termInfoRef :1155763.
<https://term.tilde.com/terms/> dc:source "";
dct:type "TBX";
tbx:encodingDesc """<p type=\"XCSURI\">http://www.ttt.org/oscarstandards/tbx/TBXXCS.xcs</p>"""^^rdf:XMLLiteral;
tbx:sourceDesc "<sourceDesc><p/></sourceDesc>"^^rdf:XMLLiteral;
a tbx:MartifHeader,
dcat:Dataset.
:1155763 tbx:definition "A hard, smooth-textured cheese, made usually from the whole milk of cows and varying in color from white to deep yellow and in flavor from mild to sharp as it ages. Also called cheddar cheese."@en,
"Fette Hartkäsesorte [nach dem engl. Ort Cheddar]"@en;
tbx:subjectField <https://term.tilde.com/domains/TaaS-1000>,
<https://term.tilde.com/domains/unknown>;
a skos:Concept;
rdfs:comment "Lebensmittel|Käse"@en,
"Lenoch code: AG"@en.
:Cheddar-de a ontolex:LexicalEntry;
ontolex:canonicalForm <https://term.tilde.com/terms/Cheddar-de#CanonicalForm>;
ontolex:language <http://www.lexvo.org/page/iso639-3/ger/deu>;
ontolex:sense <https://term.tilde.com/terms/Cheddar-de#Sense>.
<https://term.tilde.com/terms/Cheddar-de#CanonicalForm> ontolex:writtenRep "Cheddar"@de.
<https://term.tilde.com/terms/Cheddar-de#Sense> ontolex:reference :1155763.
:Cheddar-en a ontolex:LexicalEntry;
ontolex:canonicalForm <https://term.tilde.com/terms/Cheddar-en#CanonicalForm>;
ontolex:language <http://www.lexvo.org/page/iso639-3/eng>;
ontolex:sense <https://term.tilde.com/terms/Cheddar-en#Sense>.
<https://term.tilde.com/terms/Cheddar-en#CanonicalForm> ontolex:writtenRep "Cheddar"@en.
<https://term.tilde.com/terms/Cheddar-en#Sense> ontolex:reference :1155763.
:de a ontolex:Lexicon;
ontolex:entry :Cheddar-de;
ontolex:language <http://www.lexvo.org/page/iso639-3/ger/deu>.
:en a ontolex:Lexicon;
ontolex:entry :Cheddar-en;
ontolex:language <http://www.lexvo.org/page/iso639-3/eng>.
@jnehring how should this be handled?
@andish can you please comment on this bug?
E-terminology do not understand string escapes, it treats \n as two separate characters.
https://www.w3.org/TR/turtle/#string
Update: E-terminology and E-translation removes newlines while serializing from turtle to RDF graph.
Update: There is logical bug in E-terminology, if string contains '\n, not all terms are added to the RDF graph.
This is on my TODO list.
Should be resolved. Please check and close.
@andish It works, thanks!
It just finds terms in plaintext and nif. Sending this:
to
http://api-dev.freme-project.eu/current/e-terminology/tilde?informat=text/html&source-lang=en&target-lang=en
produces:Sending just the contained plaintext produces this:
This could be related to this issue.