dkpro / dkpro-core

Collection of software components for natural language processing (NLP) based on the Apache UIMA framework.
https://dkpro.github.io/dkpro-core
Other
196 stars 67 forks source link

NifWriter does not write out NE identifier #1362

Closed jcklie closed 5 years ago

jcklie commented 5 years ago

When reading a nif file that contains named entities that are linked to a knowledge base, e.g. https://github.com/munnellg/1641DepositionsCorpus , and writing it out with the NifWriter, it looses these identifiers. Looking into DKPro2Nif,

String neIdentifier = uimaNamedEntity.getValue();

maybe should be

String neIdentifier = uimaNamedEntity.getidentifier();

and

if (neIdentifierIsUri) {
    nifNamedEntity.addProperty(pTaClassRef, m.createResource(neIdentifier));
}

maybe should be

if (neIdentifierIsUri) {
    nifNamedEntity.addProperty(pTaIdentRef, m.createResource(neIdentifier));
}