korpling / ANNIS

ANNIS is an open source, versatile web browser-based search and visualization architecture for complex multilevel linguistic corpora with diverse types of annotation.
http://corpus-tools.org/annis/
Apache License 2.0
68 stars 25 forks source link

CSV export fails for corpora with same metakey as a document #628

Open amir-zeldes opened 4 years ago

amir-zeldes commented 4 years ago

When asking for metakeys in CSV export, the exporter crashes if a document has the same metadata key as the corpus. To reproduce, use any Scriptorium corpus - there is a metadatum 'annotation' at both the corpus and document level (often with different values). The exporter throws this error:

image

amir-zeldes commented 4 years ago

@thomaskrause this happens if any metakeys are specified, even if the duplicate key is not requested. Assuming this is now because corpus meta is supported in export, I would be happy with using document metadata by default whenever there is a conflict, or adding syntax to specify which level is meant (a quick fix would be preferred by our users, who don't really need corpus metadata export as much as document level).