Closed jnehring closed 8 years ago
I wanted to implement the conversion of plaintext to NIF into FREME NER. I already implemented the API parameter: https://github.com/freme-project/freme-ner/blob/master/src/main/java/org/elinker/core/rest/FremeNerEnrichment.java#L101
Then I found out, that the NIF is generated inside of the Scala code. So I think you need to pass the NIFVersion parameter from the Rest API to the Scala code,.
here is NIF output that will be produced by FREME NER after it implements NIF 2.1
Hi @m1ci , @jnehring ,
FREME NER is ready for NIF 2.1. Thanks both for the support. Concerning to this item, I have two pending tasks that I intend to close today
This API request fails with Internal Server Exception, message in the logs:
ERROR 2016-08-31 10:28:41,543 [http-nio-7001-exec-4] eu.freme.common.exception .ExceptionHandlerService - Request: http://rv2622.1blu.de:7001/e-entity/freme-ner/documents raised
java.lang.NullPointerException
at org.elinker.core.rest.FremeNerEnrichment.execute(FremeNerEnrichment.java:105)
This line fails:
nifVersion = nifVersion == null && nifVersion.isEmpty() ? RDFConstants.nifVersion2_0 : nifVersion;
nifVersion==null && nifVersion.isEmpty() must fail when nifVersion is null.
nif-version should be an optional parameter with default value of 2.0? right @jnehring? or default value is 2.1? I think at the moment nif-version is not an optional parameter BTW, here you can check the NIF 2.1 output for FREME NER.
NullPointerException fixed.
TODOs::
nif-version should be an optional parameter with default value of 2.0? right @jnehring?
right
the task is finished, @jnehring please check and close
i tested it and it looks good. this task is finished
Please implement changes to implement NIF 2.1 annotations. The use of annotation units should be switched on / off using a parameter "nif-version=2.0" or "nif-version=2.1" with the default value being "2.0"