def copyAnnotation(self, token, name): """ copy an annotation with a given name from a given token """ if token.hasAnnotation(name) == True and self.hasAnnotation(name) == False: annotation = token.annotations.get(name) newAnnotation = Annotation(name) newAnnotation.copy(annotation) self.annotations.add(newAnnotation)