view.metadata.contains
have items (at_types) that are not actually in annotations
list
#205
Milestone
view.metadata.contains
have items (at_types) that are not actually in annotations
list
#205
Because
Currently,
mmif-python
SDK does some magic to make sure the information in thecontains
metadata is true.Namely, when a develop adds a new
annotation
object usingview.add_annotation()
method, it automatically adds the@type
of the annotation to thecontains
dict.mmif-python/mmif/serialize/view.py
Lines 99 to 117 in 7880bb4
However, it does not provide anything for the opposite direction. Namely,
contains
dict (this usually happens when there's some additional information accompanies as a value map the at_type key),And I don't think that's an ideal behavior. But adding automatic removal of not-used at_types from
contains
dict seems to too much magic-y (but again, we're already doing some magic. why not do more?)Done when
We discuss whether the current way is a desired way of doing the business. If not, add an automatic "filtering" in the serialization code. Or we can provide a method to invoke the filtering manually only on demand.
Additional context
Just to be clear, I don't think having a false information should make the MMIF invalid, and thus the output MMIF from the above example still should be a valid MMIF.
The text was updated successfully, but these errors were encountered: