Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Adds custom named entities using spaCy's EntityRuler.
import spacy
from spacy.pipeline import EntityRuler
nlp = spacy.load('en_core_web_sm')
ruler = EntityRuler(nlp)
ruler.add_patterns([{'label':'ORG','pattern':'OpenAI'}])
nlp.add_pipe(ruler, before='ner')
doc = nlp('OpenAI develops AI models.')
for ent in doc.ents:
print(ent.text, ent.label_)spaCy is an open-source Python library for advanced natural language processing (NLP). It provides efficient tools for text parsing, tokenization, named entity recognition, part-of-speech tagging, and integration with machine learning workflows.
Origin & Creator
spaCy was created by Matthew Honnibal and Ines Montani in 2015, aiming to provide industrial-strength NLP in Python with speed and accuracy.
Industrial Note
spaCy is widely used in chatbots, text analytics, sentiment analysis, information extraction, recommendation systems, and any application that requires structured NLP pipelines.