src.dackar.pipelines.UnitEntity¶
Attributes¶
Classes¶
How to use it: |
Functions¶
|
Module Contents¶
- class src.dackar.pipelines.UnitEntity.UnitEntity(nlp, label='unit', asSpan=True, callback=None)[source]¶
Bases:
object
How to use it:
from UnitEntity import UnitEntity nlp = spacy.load("en_core_web_sm") unit = UnitEntity(nlp, 'ssc') 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 = unit(doc)
or:
nlp.add_pipe('unit_entity', config={"label": "ssc", "asSpan":True}) newDoc = nlp(doc.text)