ljvmiranda921 / calamanCy

NLP pipelines for Tagalog using spaCy
MIT License
44 stars 3 forks source link

Add lightweight inference module #26

Closed ljvmiranda921 closed 1 year ago

ljvmiranda921 commented 1 year ago

This PR adds a small inference module for users who are not familiar with spaCy primitives. Ideally, it's better to just work on the spaCy Doc object, but it might be confusing for those who don't use spaCy often. This inference module simply queries from the outputs of the trained NLP pipeline.

from calamancy import EntityRecognizer
ner = EntityRecognizer("tl_calamancy_md-0.1.0")
entities = ner.predict("Ako si Juan de la Cruz")