Named Entity Recognition

Finally, there’s named entity recognition. Named Entities are the proper nouns of sentences. Computers have gotten pretty good at figuring out if they’re in a sentence and also classifying what type of entity they are. spaCy handles Named Entity Recognition at the document level, since the name of an entity can span several tokens:

doc = nlp(u"My name is Jack and I live in India.")
entity_types = ((ent.text, ent.label_) for ent in doc.ents)
print(tabulate(entity_types, headers=['Entity', 'Entity Type']))


Output:
Entity Entity Type
-------- -------------
Jack PERSON
India GPE

So we just saw some of the basic building blocks of NLP pipeline. These pipelines are consistently used in various NLP projects be it in machine learning or in the deep learning space. 

Something Look Familiar?

 We used few of these NLP pipeline building blocks in the previous chapter to build our word2vec models.  This more in-depth explanation of the building blocks of the NLP pipeline helps us take the next step in our projects as we look to deploy more and more complex models!

As with everything in this deep learning projects in Python book, we encourage you to also try your own combinations of the above processes for the use cases you work on in your data science career. Now let's implement a chatbot using these pipelines!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.197.213