freme-project / freme-ner

Apache License 2.0
6 stars 1 forks source link

FREME NER produces nif:isString twice #161

Open jnehring opened 7 years ago

jnehring commented 7 years ago

curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: 6da7f638-ac30-79e5-d80f-e78d44c530f5" -d 'Welcome to Europe!' "http://api-dev.freme-project.eu/current/e-entity/freme-ner/documents?language=en&dataset=dbpedia&informat=text"

produces

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

<http://freme-project.eu/#char=11,17>
        a                     nif:RFC5147String , nif:Phrase , nif:Word , nif:String ;
        nif:anchorOf          "Europe"^^xsd:string ;
        nif:beginIndex        "11"^^xsd:nonNegativeInteger ;
        nif:endIndex          "17"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,18> ;
        itsrdf:taClassRef     <http://dbpedia.org/ontology/Location> , <http://dbpedia.org/ontology/PopulatedPlace> , <http://dbpedia.org/ontology/Place> , <http://www.w3.org/2002/07/owl#Thing> , <http://dbpedia.org/ontology/Continent> ;
        itsrdf:taConfidence   "0.5313763171783054"^^xsd:double ;
        itsrdf:taIdentRef     <http://dbpedia.org/resource/Europe> .

<http://freme-project.eu/#char=0,18>
        a               nif:String , nif:Context , nif:RFC5147String ;
        nif:beginIndex  "0"^^xsd:nonNegativeInteger ;
        nif:endIndex    "18"^^xsd:nonNegativeInteger ;
        nif:isString    "Welcome to Europe!" , "Welcome to Europe!"^^xsd:string .

<http://freme-project.eu/#char=0,7>
        a                     nif:Phrase , nif:Word , nif:String , nif:RFC5147String ;
        nif:anchorOf          "Welcome"^^xsd:string ;
        nif:beginIndex        "0"^^xsd:nonNegativeInteger ;
        nif:endIndex          "7"^^xsd:nonNegativeInteger ;
        nif:referenceContext  <http://freme-project.eu/#char=0,18> ;
        itsrdf:taClassRef     <http://dbpedia.org/ontology/Film> , <http://dbpedia.org/ontology/Work> , <http://dbpedia.org/ontology/Wikidata:Q11424> , <http://www.w3.org/2002/07/owl#Thing> ;
        itsrdf:taConfidence   "0.49767660362327676"^^xsd:double ;
        itsrdf:taIdentRef     <http://dbpedia.org/resource/Welcome_(2007_film)> .

It does not happen when I specify nif-version=2.1

sandroacoelho commented 7 years ago

Hi @jnehring,

I have fixed it in our NIF library.

We need to deploy it to test, but our Jenkins task to it is disabled.

Best,

m1ci commented 7 years ago

@sandroacoelho should be enabled now, please try to re-build freme ner and check if this is fixed. At the moment it is not fixed, see

https://api-dev.freme-project.eu/current/e-entity/freme-ner/documents?language=en&dataset=dbpedia&mode=all&outformat=turtle&informat=text&input=Diego%20Maradona%20is%20from%20Argentina.&nif-version=2.0

fsasaki commented 7 years ago

Any news on this? Just trying to work with FREME-NER and still get the repetition.

2016-11-16 11:33 GMT+01:00 Milan Dojčinovski notifications@github.com:

should be enabled now, please try to re-build freme ner and check if this is fixed. At the moment it is not fixed, see

https://api-dev.freme-project.eu/current/e-entity/freme-ner/ documents?language=en&dataset=dbpedia&mode=all&outformat= turtle&informat=text&input=Diego%20Maradona%20is%20from% 20Argentina.&nif-version=2.0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/freme-project/freme-ner/issues/161#issuecomment-260911333, or mute the thread https://github.com/notifications/unsubscribe-auth/ABH5AtZwekq0UO784CwR7mCB2VGbjYmVks5q-tvrgaJpZM4Kuyxu .

m1ci commented 7 years ago

@sandroacoelho have fixed it but I dont see the fix in the API dev. @sandroacoelho ?

btw, @fsasaki the issue only occurs in NIF 2.0. If you use NIF 2.1 there is no such issue. See https://api.freme-project.eu/current/e-entity/freme-ner/documents?language=en&dataset=dbpedia&mode=all&outformat=turtle&informat=text&input=Diego%20Maradona%20is%20from%20Argentina.&nif-version=2.1

Note the nif-version=2.1 parameter.

sandroacoelho commented 7 years ago

Hi @m1ci , @fsasaki

Problem solved: https://api-dev.freme-project.eu/current/e-entity/freme-ner/documents?language=en&dataset=dbpedia&mode=all&outformat=turtle&informat=text&input=Diego%20Maradona%20is%20from%20Argentina.&nif-version=2.0

Best,

fsasaki commented 7 years ago

Thanks! What needs to happen to have this in the live version?

2016-11-21 3:11 GMT+01:00 Sandro notifications@github.com:

Hi @m1ci https://github.com/m1ci , @fsasaki https://github.com/fsasaki

Problem solved: https://api-dev.freme-project. eu/current/e-entity/freme-ner/documents?language=en&dataset= dbpedia&mode=all&outformat=turtle&informat=text&input= Diego%20Maradona%20is%20from%20Argentina.&nif-version=2.0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/freme-project/freme-ner/issues/161#issuecomment-261826340, or mute the thread https://github.com/notifications/unsubscribe-auth/ABH5ArZ6mUc1ucEyKwTWsyDTcuAmaJWdks5rAP3bgaJpZM4Kuyxu .

m1ci commented 7 years ago

@sandroacoelho you have missed to add the datatype for isString. Its xsd:string - see https://github.com/NLP2RDF/ontologies/blob/master/nif-core/nif-core.ttl#L154 Please fix this. Thanks!

jnehring commented 7 years ago

Thanks! What needs to happen to have this in the live version?

This requires a release of FREME NER. We will do a release later this week to fix this bug for the SWIB presentation.

m1ci commented 7 years ago

it seems the issue with datatype is fixed. @sandroacoelho please confirm?

jnehring commented 7 years ago

This API call uses nif-version=2.0 and does not produce a datatype for nif:isString. When I set nif-version=2.1 then it produces the datatype.

@m1ci Is this behaviour correct? I think it should produce the datatype also for nif-version 2.0

m1ci commented 7 years ago

you are right, there is no datatype for nif:isString. Sorry. I was specifying wrong nif version.

jnehring commented 7 years ago

@sandroacoelho can you fix this until tomorrow? It would be nice to have the bug fixed before the release.

sandroacoelho commented 7 years ago

Sure. I will do it.

sandroacoelho commented 7 years ago

Hi @m1ci , @jnehring

Issue fixed. The problem was at FREMECommon.

Best,

m1ci commented 7 years ago

thanks @sandroacoelho

jnehring commented 7 years ago

fixed on live through the release

jnehring commented 7 years ago

The bug happens also when the prefix parameter is specified:

curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: 6da7f638-ac30-79e5-d80f-e7d44c530f5" -d 'Welcome to Europe!' "http://rv1443.1blu.de/current/e-entity/freme-ner/documents?language=en&dataset=dbpedia&informat=text&prefix=http://hello.de"

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

<http://hello.de/#char=0,70>
        a               nif:String , nif:Context , nif:RFC5147String ;
        nif:beginIndex  "0"^^xsd:nonNegativeInteger ;
        nif:endIndex    "70"^^xsd:nonNegativeInteger ;
        nif:isString    "language=en&dataset=dbpedia&informat=text&prefix=http%3A%2F%2Fhello.de"^^xsd:string .

<http://hello.de#char=0,70>
        a               nif:String , nif:Context , nif:RFC5147String ;
        nif:beginIndex  "0"^^xsd:nonNegativeInteger ;
        nif:endIndex    "70"^^xsd:nonNegativeInteger ;
        nif:isString    "language=en&dataset=dbpedia&informat=text&prefix=http%3A%2F%2Fhello.de"^^xsd:string .