src.dackar.pipelines.ConjectureEntity¶
Attributes¶
Classes¶
How to use it: |
Functions¶
|
Module Contents¶
- class src.dackar.pipelines.ConjectureEntity.ConjectureEntity(nlp, patterns=None, callback=None)[source]¶
Bases:
object
How to use it:
from ConjectureEntity import ConjectureEntity nlp = spacy.load("en_core_web_sm") patterns = {'label': 'conjecture', 'pattern': [{'LOWER': 'possible'}], 'id': 'conjecture'} cmatcher = ConjectureEntity(nlp, patterns) doc = nlp("Vibration seems like it is coming from the shaft.") updatedDoc = cmatcher(doc)
or:
nlp.add_pipe('conjecture_entity', config={"patterns": {'label': 'conjecture', 'pattern': [{'LOWER': 'possible'}], 'id': 'conjecture'}}) newDoc = nlp(doc.text)