Manuel Fiorelli wrote:
Hello,
I am developing an interactive annotator, which should produce a corpus of
annotated documents for AE training. Since a human annotator can decide to
remove an annotation, I would like to know if there were an API for remove a
feature structure from the CAS after it was created.
Manuel Fiorelli
Sort of. You can remove the annotation from the index. The
annotation will continue to exist for the lifetime of the
CAS, but it will no longer be accessible. If you then save
the CAS to disk, the deleted annotation will not be saved.
If you use the JCas, you can do removeFromIndexes() on the
annotation itself. If using the base CAS, you need to use
cas.removeFsFromIndexes(annotation) -- of course this will
work with the JCas as well.
--Thilo