GateNLP/python-gatenlp

Create class hierarchy for AnnotationSet

Opened this issue · 0 comments

Consider:

  • AnnotationSet is an abstract base class
  • DetachedAnnotationSet is the class used for detached sets
  • AttachedAnnotationSet is the class used for in-document sets

We could just use the API we have now for AnnotationSet for both, but ideally refactor:

  • anything related to logging is only in AttachedSet
  • constructor only possible for DetachedSet

Advantages:

  • easier to see with print etc. what set we are dealing with
  • clearer what each type of set can do
  • can be used with type hinting to document which methods return which sets