src.dackar.pipelines.EmergentActivityEntity

Attributes

logger

Classes

EmergentActivity

Emergent Activity Entity Recognition class

Functions

create_emergent_activity(nlp, name)

Module Contents

src.dackar.pipelines.EmergentActivityEntity.logger[source]
src.dackar.pipelines.EmergentActivityEntity.create_emergent_activity(nlp, name)[source]
class src.dackar.pipelines.EmergentActivityEntity.EmergentActivity(nlp)[source]

Bases: object

Emergent Activity Entity Recognition class

How to use it:

from EmergentActivity import EmergentActivity
nlp = spacy.load("en_core_web_sm")
pmatcher = EmergentActivity(nlp)
doc = nlp("The shaft deflection is causing the safety cage to rattle. Pumps not experiencing enough flow for the pumps to keep the check valves open during test. Pump not experiencing enough flow during test. Shaft made noise. Vibration seems like it is coming from the shaft.")
updatedDoc = pmatcher(doc)

or:

nlp.add_pipe('EmergentActivity')
newDoc = nlp(doc.text)
name = 'EmergentActivity'[source]
matcher[source]
asSpan = True[source]
__call__(doc)[source]
Parameters:

doc – spacy.tokens.doc.Doc, the processed document using nlp pipelines