You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am one of the developer working on adopting STAM in OpenPecha. Currently, I am trying to implement this and I am facing an issue with modifying offset of an annotation.
Most of the methods in the STAM python binding return either immutable copies or immutable references to the original data. So when you do annotation.offset() you get an offset instance that is a copy. Changing that copy by calling shift does not update the original. The same goes for most other methods that return data.
In STAM, annotations are largely considered immutable once made. Read this section for the rationale behind this. The canonical way to modify an annotation is to delete an annotation, and to create a new one. This does have repercussions for any annotations loaded in the store that depend on the removed annotation (they would automatically be removed along with it).
Now I understand that in your use case you want to have some flexibility to alter annotations and still have other annotations refer to it. You're decoupling the alignments from the annotations that refer to the text, by storing them in separate stores, so that will give you this option. Updating an annotation would then boil down to:
removing the annotation (but make sure the alignments are not loaded at the same time!)
re-adding a modified version of the annotation (with the new offset) but with the same public identifier. That way the stand-off alignments remain valid when loaded, even though the underlying annotation changed.
This will also depend on resolution of annotation/stam#29 which I'll be working on soon.
Hey, guys!
I am one of the developer working on adopting STAM in OpenPecha. Currently, I am trying to implement this and I am facing an issue with modifying offset of an annotation.
Current output:
As you can see the offset remain same even after performing shift.
Expected output:
How to achieve this in STAM?
The text was updated successfully, but these errors were encountered: