Skip to content

prevent using of "short" annotation ID and release MMIF 2.0  #228

@keighrim

Description

@keighrim

Because

The generosity of allowing short form for annotation id values provides almost no benefit (besides saving some bytes) while adding lots of technical debt and bugs. For example, we have this code in visualizer

https://github.com/clamsproject/mmif-visualizer/blob/9019c154fccde11a605b77d412ddaca3e7be566c/ocr.py#L65-L68

but source and target values in Alignment annotations almost always use the "long" form (prefixed with view ID) of the annotation ID since lots of alignments are done across views, and hence these checks are destined to fail and introduce silent errors.

I suggest we allow only using long form of the ID in everywhere in MMIF, so that ann.id and ann.long_id always return the same value. This is major change in MMIF spec, hence leads to MMIF 2.0.

Done when

Either

  1. we update all existing code that uses == checks with ann.id value to a fixed standard and educate all existing and future developers to use the same implementation,
  2. we simply disallow "short" form of annotation ID in MMIF world and change ann.id to return ann.long_id.

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions