How to use the gatenlp.spacy.apply_nlp function in gatenlp

To help you get started, we’ve selected a few gatenlp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GateNLP / gateplugin-python / src / main / resources / resources / pipelines / python-spacy.py View on Github external
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

gatenlp

GATE NLP implementation in Python.

Apache-2.0
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis

Similar packages