freme-project / e-services

Apache License 2.0
1 stars 1 forks source link

[e-Terminology] does not work with e-internalisation formats #17

Closed ArneBinder closed 8 years ago

ArneBinder commented 8 years ago

It just finds terms in plaintext and nif. Sending this:

<!DOCTYPE html>
<html>
<head></head>
<body>
<p>Cheddar is the most popular type of cheese in the United Kingdom, accounting for 51% of the country's £1.9 billion annual cheese market. It is also the second most popular cheese in the US (behind mozzarella), with an average annual consumption of 10 lb (4.5 kg) per capita. The United States produced approximately 3,000,000,000 lb (1,300,000 long tons; 1,400,000 tonnes) in 2014,[4] and theUnited Kingdom 258,000 long tons (262,000 tonnes) in 2008. </p>
<p>The term "Cheddar cheese" is widely used, but has no Protected Designation of Origin within the European Union, although only Cheddar produced from local milk within four counties of south west England may use the name "West Country Farmhouse Cheddar".</p>
</body>
</html>

to http://api-dev.freme-project.eu/current/e-terminology/tilde?informat=text/html&source-lang=en&target-lang=en 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 rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@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,453>
        a                     nif:String , nif:RFC5147String , nif:Phrase ;
        nif:anchorOf          "\nCheddar is the most popular type of cheese in the United Kingdom, accounting for 51% of the country's £1.9 billion annual cheese market. It is also the second most popular cheese in the US (behind mozzarella), with an average annual consumption of 10 lb (4.5 kg) per capita. The United States produced approximately 3,000,000,000 lb (1,300,000 long tons; 1,400,000 tonnes) in 2014,[4] and theUnited Kingdom 258,000 long tons (262,000 tonnes) in 2008. \n"@en ;
        nif:beginIndex        "0"^^xsd:nonNegativeInteger ;
        nif:endIndex          "453"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,704> ;
        dc:identifier         "1" .

<http://freme-project.eu/#char=0,704>
        a               nif:String , nif:RFC5147String , nif:Context ;
        nif:beginIndex  "0"^^xsd:nonNegativeInteger ;
        nif:endIndex    "704"^^xsd:nonNegativeInteger ;
        nif:isString    "\nCheddar is the most popular type of cheese in the United Kingdom, accounting for 51% of the country's £1.9 billion annual cheese market. It is also the second most popular cheese in the US (behind mozzarella), with an average annual consumption of 10 lb (4.5 kg) per capita. The United States produced approximately 3,000,000,000 lb (1,300,000 long tons; 1,400,000 tonnes) in 2014,[4] and theUnited Kingdom 258,000 long tons (262,000 tonnes) in 2008. \n \nThe term Cheddar cheese is widely used, but has no Protected Designation of Origin within the European Union, although only Cheddar produced from local milk within four counties of south west England may use the name West Country Farmhouse Cheddar.\n"@en .

<http://freme-project.eu/#char=454,704>
        a                     nif:String , nif:RFC5147String , nif:Phrase ;
        nif:anchorOf          "\nThe term Cheddar cheese is widely used, but has no Protected Designation of Origin within the European Union, although only Cheddar produced from local milk within four counties of south west England may use the name West Country Farmhouse Cheddar.\n"@en ;
        nif:beginIndex        "454"^^xsd:nonNegativeInteger ;
        nif:endIndex          "704"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,704> ;
        dc:identifier         "2" .

Sending just the contained plaintext produces this:

@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix its:   <http://www.w3.org/2005/11/its> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix nif:   <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .

<http://freme-project.eu/#char=20,27>
        a                     nif:RFC5147String ;
        nif:anchorOf          "popular"@en ;
        nif:annotationUnit    [ rdfs:label           "popular"@en ;
                                itsrdf:taConfidence  0.1288
                              ] ;
        nif:beginIndex        "20"^^xsd:nonNegativeInteger ;
        nif:endIndex          "27"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/1507670> , <https://term.tilde.com/terms/2843523> , <https://term.tilde.com/terms/757476> , <https://term.tilde.com/terms/1507668> , <https://term.tilde.com/terms/1548610> , <https://term.tilde.com/terms/1507669> .

<http://freme-project.eu/#char=226,244>
        a                     nif:RFC5147String ;
        nif:anchorOf          "annual consumption"@en ;
        nif:annotationUnit    [ rdfs:label           "annual consumption"@en ;
                                itsrdf:taConfidence  0.2566
                              ] ;
        nif:beginIndex        "226"^^xsd:nonNegativeInteger ;
        nif:endIndex          "244"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/469856> .

<http://freme-project.eu/#char=164,171>
        a                     nif:RFC5147String ;
        nif:anchorOf          "popular"@en ;
        nif:annotationUnit    [ rdfs:label           "popular"@en ;
                                itsrdf:taConfidence  0.1288
                              ] ;
        nif:beginIndex        "164"^^xsd:nonNegativeInteger ;
        nif:endIndex          "171"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/2843523> , <https://term.tilde.com/terms/757476> , <https://term.tilde.com/terms/1507669> , <https://term.tilde.com/terms/1507668> , <https://term.tilde.com/terms/1507670> , <https://term.tilde.com/terms/1548610> .

<http://freme-project.eu/#char=344,353>
        a                     nif:RFC5147String ;
        nif:anchorOf          "long tons"@en ;
        nif:annotationUnit    [ rdfs:label           "long ton"@en ;
                                itsrdf:taConfidence  0.4445
                              ] ;
        nif:beginIndex        "344"^^xsd:nonNegativeInteger ;
        nif:endIndex          "353"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/2984864> .

<http://freme-project.eu/#char=28,42>
        a                     nif:RFC5147String ;
        nif:anchorOf          "type of cheese"@en ;
        nif:annotationUnit    [ rdfs:label           "type of cheese"@en ;
                                itsrdf:taConfidence  0.2649
                              ] ;
        nif:beginIndex        "28"^^xsd:nonNegativeInteger ;
        nif:endIndex          "42"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/686884> .

<http://freme-project.eu/#char=115,121>
        a                     nif:RFC5147String ;
        nif:anchorOf          "annual"@en ;
        nif:annotationUnit    [ rdfs:label           "annuals"@en , "annual"@en ;
                                itsrdf:taConfidence  0.078
                              ] ;
        nif:beginIndex        "115"^^xsd:nonNegativeInteger ;
        nif:endIndex          "121"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/967136> , <https://term.tilde.com/terms/295391> , <https://term.tilde.com/terms/1632185> , <https://term.tilde.com/terms/556785> , <https://term.tilde.com/terms/280964> , <https://term.tilde.com/terms/705761> , <https://term.tilde.com/terms/551751> , <https://term.tilde.com/terms/474531> , <https://term.tilde.com/terms/1585764> , <https://term.tilde.com/terms/786598> , <https://term.tilde.com/terms/699363> , <https://term.tilde.com/terms/1620019> , <https://term.tilde.com/terms/543528> , <https://term.tilde.com/terms/1615630> , <https://term.tilde.com/terms/551469> , <http://aims.fao.org/aos/agrovoc/c_28997> , <https://term.tilde.com/terms/567390> , <https://term.tilde.com/terms/697907> .

<http://freme-project.eu/#char=399,406>
        a                     nif:RFC5147String ;
        nif:anchorOf          "Kingdom"@en ;
        nif:annotationUnit    [ rdfs:label           "kingdom"@en ;
                                itsrdf:taConfidence  0.0552
                              ] ;
        nif:beginIndex        "399"^^xsd:nonNegativeInteger ;
        nif:endIndex          "406"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/1583951> , <https://term.tilde.com/terms/1532586> , <https://term.tilde.com/terms/4226189> , <https://term.tilde.com/terms/4226190> , <https://term.tilde.com/terms/845928> .

<http://freme-project.eu/#char=263,273>
        a                     nif:RFC5147String ;
        nif:anchorOf          "per capita"@en ;
        nif:annotationUnit    [ rdfs:label           "per capita"@en ;
                                itsrdf:taConfidence  0.2234
                              ] ;
        nif:beginIndex        "263"^^xsd:nonNegativeInteger ;
        nif:endIndex          "273"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/709012> , <https://term.tilde.com/terms/782694> , <https://term.tilde.com/terms/4227923> , <https://term.tilde.com/terms/4199560> , <https://term.tilde.com/terms/2941195> , <https://term.tilde.com/terms/303050> , <https://term.tilde.com/terms/4227925> , <https://term.tilde.com/terms/463066> , <https://term.tilde.com/terms/4227924> , <https://term.tilde.com/terms/4224347> , <https://term.tilde.com/terms/1519199> , <https://term.tilde.com/terms/2766201> .

<http://freme-project.eu/#char=302,315>
        a                     nif:RFC5147String ;
        nif:anchorOf          "approximately"@en ;
        nif:annotationUnit    [ rdfs:label           "approximately"@en ;
                                itsrdf:taConfidence  0.0642
                              ] ;
        nif:beginIndex        "302"^^xsd:nonNegativeInteger ;
        nif:endIndex          "315"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/2753737> , <https://term.tilde.com/terms/673044> , <https://term.tilde.com/terms/1583069> .

<http://freme-project.eu/#char=92,99>
        a                     nif:RFC5147String ;
        nif:anchorOf          "country"@en ;
        nif:annotationUnit    [ rdfs:label           "Country"@en , "country"@en ;
                                itsrdf:taConfidence  0.1299
                              ] ;
        nif:beginIndex        "92"^^xsd:nonNegativeInteger ;
        nif:endIndex          "99"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/1603410> , <https://term.tilde.com/terms/2745780> , <https://term.tilde.com/terms/526741> , <https://term.tilde.com/terms/1633343> , <https://term.tilde.com/terms/544773> , <https://term.tilde.com/terms/542372> , <https://term.tilde.com/terms/1555841> , <https://term.tilde.com/terms/4230649> , <https://term.tilde.com/terms/1218971> , <https://term.tilde.com/terms/1633341> , <https://term.tilde.com/terms/600714> , <https://term.tilde.com/terms/4378783> , <https://term.tilde.com/terms/590474> , <https://term.tilde.com/terms/526373> , <https://term.tilde.com/terms/4230650> , <https://term.tilde.com/terms/622376> , <https://term.tilde.com/terms/553532> , <https://term.tilde.com/terms/712560> , <https://term.tilde.com/terms/1633342> .

<http://freme-project.eu/#char=279,292>
        a                     nif:RFC5147String ;
        nif:anchorOf          "United States"@en ;
        nif:annotationUnit    [ rdfs:label           "United States"@en ;
                                itsrdf:taConfidence  0.0628
                              ] ;
        nif:beginIndex        "279"^^xsd:nonNegativeInteger ;
        nif:endIndex          "292"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/3892823> , <https://term.tilde.com/terms/856495> , <https://term.tilde.com/terms/1639338> , <https://term.tilde.com/terms/2344295> .

<http://freme-project.eu/#char=434,440>
        a                     nif:RFC5147String ;
        nif:anchorOf          "tonnes"@en ;
        nif:annotationUnit    [ rdfs:label           "Tonne"@en , "tonne"@en ;
                                itsrdf:taConfidence  0.3818
                              ] ;
        nif:beginIndex        "434"^^xsd:nonNegativeInteger ;
        nif:endIndex          "440"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/977495> , <https://term.tilde.com/terms/1615492> , <https://term.tilde.com/terms/3063954> , <https://term.tilde.com/terms/593060> , <https://term.tilde.com/terms/823893> , <https://term.tilde.com/terms/820472> , <https://term.tilde.com/terms/510686> , <https://term.tilde.com/terms/280484> , <https://term.tilde.com/terms/2880342> .

<http://freme-project.eu/#char=197,207>
        a                     nif:RFC5147String ;
        nif:anchorOf          "mozzarella"@en ;
        nif:annotationUnit    [ rdfs:label           "Mozzarella"@en ;
                                itsrdf:taConfidence  0.3254
                              ] ;
        nif:beginIndex        "197"^^xsd:nonNegativeInteger ;
        nif:endIndex          "207"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/1155777> .

<http://freme-project.eu/#char=0,7>
        a                     nif:RFC5147String ;
        nif:anchorOf          "Cheddar"@en ;
        nif:annotationUnit    [ rdfs:label           "cheddaring"@en , "Cheddar"@en , "cheddar"@en ;
                                itsrdf:taConfidence  1
                              ] ;
        nif:beginIndex        "0"^^xsd:nonNegativeInteger ;
        nif:endIndex          "7"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/1155763> , <https://term.tilde.com/terms/4202613> , <https://term.tilde.com/terms/727810> , <https://term.tilde.com/terms/1640089> , <https://term.tilde.com/terms/3115773> .

<http://freme-project.eu/#char=0,703>
        a               nif:String , nif:RFC5147String , nif:Context ;
        nif:beginIndex  "0"^^xsd:nonNegativeInteger ;
        nif:endIndex    "703"^^xsd:nonNegativeInteger ;
        nif:isString    "Cheddar is the most popular type of cheese in the United Kingdom, accounting for 51% of the country's £1.9 billion annual cheese market. It is also the second most popular cheese in the US (behind mozzarella), with an average annual consumption of 10 lb (4.5 kg) per capita. The United States produced approximately 3,000,000,000 lb (1,300,000 long tons; 1,400,000 tonnes) in 2014,[4] and theUnited Kingdom 258,000 long tons (262,000 tonnes) in 2008.\nThe term \"Cheddar cheese\" is widely used, but has no Protected Designation of Origin within the European Union, although only Cheddar produced from local milk within four counties of south west England may use the name \"West Country Farmhouse Cheddar\"."@en .

<http://freme-project.eu/#char=415,424>
        a                     nif:RFC5147String ;
        nif:anchorOf          "long tons"@en ;
        nif:annotationUnit    [ rdfs:label           "long ton"@en ;
                                itsrdf:taConfidence  0.4445
                              ] ;
        nif:beginIndex        "415"^^xsd:nonNegativeInteger ;
        nif:endIndex          "424"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/2984864> .

<http://freme-project.eu/#char=190,196>
        a                     nif:RFC5147String ;
        nif:anchorOf          "behind"@en ;
        nif:annotationUnit    [ rdfs:label           "behind"@en ;
                                itsrdf:taConfidence  0.061
                              ] ;
        nif:beginIndex        "190"^^xsd:nonNegativeInteger ;
        nif:endIndex          "196"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/2747989> .

<http://freme-project.eu/#char=152,158>
        a                     nif:RFC5147String ;
        nif:anchorOf          "second"@en ;
        nif:annotationUnit    [ rdfs:label           "seconds"@en , "seconded"@en , "Second"@en , "second"@en ;
                                itsrdf:taConfidence  0.0109
                              ] ;
        nif:beginIndex        "152"^^xsd:nonNegativeInteger ;
        nif:endIndex          "158"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/549761> , <https://term.tilde.com/terms/1536648> , <https://term.tilde.com/terms/1536646> , <https://term.tilde.com/terms/675103> , <https://term.tilde.com/terms/403802> , <https://term.tilde.com/terms/3074377> , <https://term.tilde.com/terms/821136> , <https://term.tilde.com/terms/1600590> , <https://term.tilde.com/terms/675621> , <https://term.tilde.com/terms/623594> , <https://term.tilde.com/terms/1500222> , <https://term.tilde.com/terms/1530995> , <https://term.tilde.com/terms/471296> , <https://term.tilde.com/terms/1571157> , <https://term.tilde.com/terms/758549> , <https://term.tilde.com/terms/823516> , <https://term.tilde.com/terms/779539> , <https://term.tilde.com/terms/2880534> , <https://term.tilde.com/terms/1500221> , <https://term.tilde.com/terms/588948> , <https://term.tilde.com/terms/497205> , <https://term.tilde.com/terms/1571134> , <https://term.tilde.com/terms/1536647> , <https://term.tilde.com/terms/820394> , <https://term.tilde.com/terms/651653> , <https://term.tilde.com/terms/2628265> , <https://term.tilde.com/terms/716524> , <https://term.tilde.com/terms/986643> , <https://term.tilde.com/terms/1527257> , <https://term.tilde.com/terms/563938> .

<http://freme-project.eu/#char=186,188>
        a                     nif:RFC5147String ;
        nif:anchorOf          "US"@en ;
        nif:annotationUnit    [ rdfs:label           "US"@en ;
                                itsrdf:taConfidence  0
                              ] ;
        nif:beginIndex        "186"^^xsd:nonNegativeInteger ;
        nif:endIndex          "188"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/1602022> , <https://term.tilde.com/terms/669004> , <https://term.tilde.com/terms/497159> , <https://term.tilde.com/terms/651814> , <https://term.tilde.com/terms/856520> , <https://term.tilde.com/terms/3701015> , <https://term.tilde.com/terms/856495> , <https://term.tilde.com/terms/1154291> .

<http://freme-project.eu/#char=50,64>
        a                     nif:RFC5147String ;
        nif:anchorOf          "United Kingdom"@en ;
        nif:annotationUnit    [ rdfs:label           "United Kingdom"@en ;
                                itsrdf:taConfidence  0.112
                              ] ;
        nif:beginIndex        "50"^^xsd:nonNegativeInteger ;
        nif:endIndex          "64"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <http://aims.fao.org/aos/agrovoc/c_8068> , <https://term.tilde.com/terms/4226191> , <https://term.tilde.com/terms/2344144> , <https://term.tilde.com/terms/1559802> , <https://term.tilde.com/terms/617708> , <https://term.tilde.com/terms/856494> , <https://term.tilde.com/terms/3182382> , <https://term.tilde.com/terms/976379> , <https://term.tilde.com/terms/370652> .

<http://freme-project.eu/#char=218,225>
        a                     nif:RFC5147String ;
        nif:anchorOf          "average"@en ;
        nif:annotationUnit    [ rdfs:label           "average"@en ;
                                itsrdf:taConfidence  0.0665
                              ] ;
        nif:beginIndex        "218"^^xsd:nonNegativeInteger ;
        nif:endIndex          "225"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/820618> , <https://term.tilde.com/terms/1546923> , <https://term.tilde.com/terms/384362> , <https://term.tilde.com/terms/2918235> , <https://term.tilde.com/terms/2724534> , <https://term.tilde.com/terms/672065> , <https://term.tilde.com/terms/2730171> , <https://term.tilde.com/terms/408025> , <https://term.tilde.com/terms/587478> , <https://term.tilde.com/terms/295681> , <https://term.tilde.com/terms/1551148> , <https://term.tilde.com/terms/711346> , <https://term.tilde.com/terms/1521940> , <https://term.tilde.com/terms/1140221> , <https://term.tilde.com/terms/705909> , <https://term.tilde.com/terms/2918269> , <https://term.tilde.com/terms/556242> , <https://term.tilde.com/terms/1521939> , <https://term.tilde.com/terms/2803394> , <https://term.tilde.com/terms/4198217> , <https://term.tilde.com/terms/2918236> , <https://term.tilde.com/terms/526575> , <https://term.tilde.com/terms/557739> , <https://term.tilde.com/terms/526580> , <https://term.tilde.com/terms/705910> , <https://term.tilde.com/terms/1146028> , <https://term.tilde.com/terms/384358> , <https://term.tilde.com/terms/295683> , <https://term.tilde.com/terms/295686> , <https://term.tilde.com/terms/543776> , <https://term.tilde.com/terms/2772646> , <https://term.tilde.com/terms/1602682> , <https://term.tilde.com/terms/463063> , <https://term.tilde.com/terms/593894> , <https://term.tilde.com/terms/1521938> , <https://term.tilde.com/terms/384351> , <https://term.tilde.com/terms/4223964> , <https://term.tilde.com/terms/506198> , <https://term.tilde.com/terms/1568110> , <https://term.tilde.com/terms/2918237> , <https://term.tilde.com/terms/1552020> .

<http://freme-project.eu/#char=107,114>
        a                     nif:RFC5147String ;
        nif:anchorOf          "billion"@en ;
        nif:annotationUnit    [ rdfs:label           "billion"@en ;
                                itsrdf:taConfidence  0.1133
                              ] ;
        nif:beginIndex        "107"^^xsd:nonNegativeInteger ;
        nif:endIndex          "114"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/1583422> , <https://term.tilde.com/terms/673449> , <https://term.tilde.com/terms/384835> , <https://term.tilde.com/terms/781673> , <https://term.tilde.com/terms/670077> , <https://term.tilde.com/terms/3053758> , <https://term.tilde.com/terms/778578> , <https://term.tilde.com/terms/793800> .

<http://freme-project.eu/#char=365,371>
        a                     nif:RFC5147String ;
        nif:anchorOf          "tonnes"@en ;
        nif:annotationUnit    [ rdfs:label           "Tonne"@en , "tonne"@en ;
                                itsrdf:taConfidence  0.3818
                              ] ;
        nif:beginIndex        "365"^^xsd:nonNegativeInteger ;
        nif:endIndex          "371"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/3063954> , <https://term.tilde.com/terms/2880342> , <https://term.tilde.com/terms/1615492> , <https://term.tilde.com/terms/510686> , <https://term.tilde.com/terms/280484> , <https://term.tilde.com/terms/823893> , <https://term.tilde.com/terms/820472> , <https://term.tilde.com/terms/593060> , <https://term.tilde.com/terms/977495> .

<http://freme-project.eu/#char=293,301>
        a                     nif:RFC5147String ;
        nif:anchorOf          "produced"@en ;
        nif:annotationUnit    [ rdfs:label           "producing"@en , "produced"@en ;
                                itsrdf:taConfidence  0.1277
                              ] ;
        nif:beginIndex        "293"^^xsd:nonNegativeInteger ;
        nif:endIndex          "301"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/520094> , <https://term.tilde.com/terms/1589094> , <https://term.tilde.com/terms/638989> , <https://term.tilde.com/terms/1589093> .

<http://freme-project.eu/#char=122,128>
        a                     nif:RFC5147String ;
        nif:anchorOf          "cheese"@en ;
        nif:annotationUnit    [ rdfs:label           "cheese"@en ;
                                itsrdf:taConfidence  0.3839
                              ] ;
        nif:beginIndex        "122"^^xsd:nonNegativeInteger ;
        nif:endIndex          "128"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/979012> , <https://term.tilde.com/terms/686793> , <https://term.tilde.com/terms/505853> , <https://term.tilde.com/terms/1640097> , <https://term.tilde.com/terms/505854> , <https://term.tilde.com/terms/3055992> , <https://term.tilde.com/terms/615054> , <https://term.tilde.com/terms/1155756> , <http://aims.fao.org/aos/agrovoc/c_1507> , <https://term.tilde.com/terms/4202614> , <https://term.tilde.com/terms/333698> , <https://term.tilde.com/terms/363931> .

<http://freme-project.eu/#char=172,178>
        a                     nif:RFC5147String ;
        nif:anchorOf          "cheese"@en ;
        nif:annotationUnit    [ rdfs:label           "cheese"@en ;
                                itsrdf:taConfidence  0.3839
                              ] ;
        nif:beginIndex        "172"^^xsd:nonNegativeInteger ;
        nif:endIndex          "178"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/1640097> , <https://term.tilde.com/terms/979012> , <https://term.tilde.com/terms/1155756> , <https://term.tilde.com/terms/615054> , <https://term.tilde.com/terms/333698> , <https://term.tilde.com/terms/505853> , <https://term.tilde.com/terms/4202614> , <https://term.tilde.com/terms/363931> , <https://term.tilde.com/terms/686793> , <https://term.tilde.com/terms/505854> , <http://aims.fao.org/aos/agrovoc/c_1507> , <https://term.tilde.com/terms/3055992> .

<http://freme-project.eu/#char=66,80>
        a                     nif:RFC5147String ;
        nif:anchorOf          "accounting for"@en ;
        nif:annotationUnit    [ rdfs:label           "account for"@en ;
                                itsrdf:taConfidence  0.081
                              ] ;
        nif:beginIndex        "66"^^xsd:nonNegativeInteger ;
        nif:endIndex          "80"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/973044> , <https://term.tilde.com/terms/1608515> .

<http://freme-project.eu/#char=129,135>
        a                     nif:RFC5147String ;
        nif:anchorOf          "market"@en ;
        nif:annotationUnit    [ rdfs:label           "markets"@en , "marketing"@en , "market"@en ;
                                itsrdf:taConfidence  0.0642
                              ] ;
        nif:beginIndex        "129"^^xsd:nonNegativeInteger ;
        nif:endIndex          "135"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,703> ;
        itsrdf:term           "yes" ;
        itsrdf:termInfoRef    <https://term.tilde.com/terms/1224954> , <https://term.tilde.com/terms/1635813> , <https://term.tilde.com/terms/1608173> , <https://term.tilde.com/terms/1155596> , <https://term.tilde.com/terms/956743> , <https://term.tilde.com/terms/595957> , <https://term.tilde.com/terms/2741550> , <https://term.tilde.com/terms/708497> , <https://term.tilde.com/terms/708496> , <https://term.tilde.com/terms/613977> , <https://term.tilde.com/terms/2741557> , <https://term.tilde.com/terms/3071195> , <https://term.tilde.com/terms/2917865> , <https://term.tilde.com/terms/2917863> , <https://term.tilde.com/terms/1159554> , <https://term.tilde.com/terms/1626001> , <https://term.tilde.com/terms/363177> , <https://term.tilde.com/terms/781355> , <https://term.tilde.com/terms/639782> , <https://term.tilde.com/terms/333144> , <https://term.tilde.com/terms/1145114> , <https://term.tilde.com/terms/847144> , <https://term.tilde.com/terms/1604598> , <https://term.tilde.com/terms/526038> , <https://term.tilde.com/terms/4199328> , <https://term.tilde.com/terms/462843> , <https://term.tilde.com/terms/1168123> , <https://term.tilde.com/terms/547645> , <https://term.tilde.com/terms/736598> , <https://term.tilde.com/terms/781452> , <https://term.tilde.com/terms/685113> , <https://term.tilde.com/terms/595970> , <https://term.tilde.com/terms/2881984> , <https://term.tilde.com/terms/639812> , <https://term.tilde.com/terms/601443> , <https://term.tilde.com/terms/1604609> , <https://term.tilde.com/terms/542723> , <https://term.tilde.com/terms/2772782> , <https://term.tilde.com/terms/1170120> , <https://term.tilde.com/terms/714877> , <https://term.tilde.com/terms/781358> , <https://term.tilde.com/terms/526022> , <https://term.tilde.com/terms/2779841> , <https://term.tilde.com/terms/3118474> , <https://term.tilde.com/terms/354592> , <https://term.tilde.com/terms/2917858> , <https://term.tilde.com/terms/3102691> , <https://term.tilde.com/terms/654186> , <https://term.tilde.com/terms/654183> , <https://term.tilde.com/terms/3048577> , <http://aims.fao.org/aos/agrovoc/c_4620> , <https://term.tilde.com/terms/462505> , <https://term.tilde.com/terms/595956> , <https://term.tilde.com/terms/408339> , <https://term.tilde.com/terms/278961> , <https://term.tilde.com/terms/320644> , <https://term.tilde.com/terms/678447> , <https://term.tilde.com/terms/969032> , <https://term.tilde.com/terms/781361> , <https://term.tilde.com/terms/683800> , <http://aims.fao.org/aos/agrovoc/c_4626> , <https://term.tilde.com/terms/699215> , <https://term.tilde.com/terms/959459> , <https://term.tilde.com/terms/639821> , <https://term.tilde.com/terms/615736> , <https://term.tilde.com/terms/2918189> , <https://term.tilde.com/terms/1159179> , <https://term.tilde.com/terms/462841> , <https://term.tilde.com/terms/714873> , <https://term.tilde.com/terms/4199340> .

This could be related to this issue.

ArneBinder commented 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?

jnehring commented 8 years ago

@andish can you please comment on this bug?

andish commented 8 years ago

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.

andish commented 8 years ago

Should be resolved. Please check and close.

ArneBinder commented 8 years ago

@andish It works, thanks!