Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __call__(self, doc, **kwargs):
# print("PROCESSING: ",doc.get_feature("gate.plugin.python.docName"))
outset = ""
if "outputAnnotationSet" in kwargs:
outset = kwargs.get("outputAnnotationSet")
annset = doc.get_annotations(outset)
annset.clear()
apply_nlp(self.nlp, doc, setname=outset)
self.tokens_total += len(doc)
self.nr_docs += 1
return doc