inception-project / inception

INCEpTION provides a semantic annotation platform offering intelligent annotation assistance and knowledge management.
https://inception-project.github.io
Apache License 2.0
593 stars 151 forks source link

Document Metadata icon shows up, but with no content #3653

Closed jfiala closed 1 year ago

jfiala commented 1 year ago

Describe the bug I enabled document metadata and imported a document of type Apache CAS XMI (XML 1.1). The document metadata icon shows up, but it doesn't show any content:

grafik

This is the metadata contained in the document file:

    <type3:DocumentMetaData xmi:id="8" sofa="1" begin="0" end="3495" language="x-unspecified" documentTitle="Fachexpertin/Fachexperte Personal Präsidialbüro" documentId="tp_export.json_300_9364702_FachexpertinFachexperte Personal Präsidialbüro.xmi" documentUri="file:/C:/my_annotations/tp_export.json_300_9364702_FachexpertinFachexperte Personal Präsidialbüro.xmi" collectionId="file:/C:/my_annotations/" documentBaseUri="file:/C:/my_annotations/" isLastSegment="false"/>

I would expect at least the documentTitle to show up?

To Reproduce Enable document metadata in settings.properties (documentmetadata.enabled=true) Enable meta layer by creating meta / Document metadata Import XMI document (Apache CAS XMI (XML 1.1)) Open annotation editor and open metadata layer

Expected behavior I would expect at least the documentTitle to show up?

Screenshots see above.

Please complete the following information:

reckart commented 1 year ago

The DKPro DocumentMetaData has nothing to do with the Document Metadata feature flag in INCEpTION.

Enabling the feature flag allows you to create document-level layers in the project settings. You can then create such a layer with the fields that are interesting to you and fill them in through XMI files that you generate externally.

Any of the layers you create in INCEpTION will be in a different namespace than then DKPro Core DocumentMetaData type.

jfiala commented 1 year ago

Thank you for clearing that up!

The fields annotated in the document metadata layer are exported as follows: (here the field testnotes has been added)

<custom:Meta xmi:id="6086" sofa="1" testnotes="test"/>

So this is as you said completely different from the DocumentMetaData xml tag.

Is there any chance to see the content of the DocumentMetadata in the annotation editor (documentTitle would be nice)? Or do you recommend simply using a new documentTitle field in the new Meta section instead?

reckart commented 1 year ago

There is currently no way to see the DocumentMetadata in the annotation editor. In theory, you could hack a layer configuration externally for that layer and them import it as a JSON layer configuration - but I would not recommend it because there is a risk that you might accidentally delete this annotation and it could have very bad side-effects.

Right now, I would recommend moving your documentTitle field to your Meta type. Also if you want only a single "Meta" annotation per document, enable the "singleton" behavior on the layer.

jfiala commented 1 year ago

Perfect, thank you! The new Meta-extension is very nice for us as we have other properties we like to add...!

This issue can be closed IMHO. Maybe it would be nice to add the difference between the DocumentMetadata and the Meta-feature to the docs...