Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 14

Named entity recognition

Anjali vishwakarma
Introduction
Named Entity means
anything that is a real-world
object such as a person, a
place, any organization, any
product which has a name. In
Machine Learning Named
Entity Recognition (NER) is a
task of Natural Language
Processing to identify the
named entities in a certain
piece of text
Why and where we use?
• Use of Named Entity Recognition is we extracting
the main entities from a text helps us to sort the
unstructured data and detect the important
information, which is crucial if you have to deal
with large datasets.

• We use in a wide variety of application domains. For


instance: Biomedical data and in biomedical data for gene
identification, DNA identification, and also the identification
of drug names and disease names. These experiments use
CRFs with features engineered for their domain data.
What I did?
• Load the data
• Data preparation for neural
network
• Training neural network for
NER
• Testing the NER model
• example
Load the data
We have Ner data set

In the data, we can see that the words are


broken into columns which will represent
our feature X, and the Tag column in the
right will represent our label Y
Data preparation for neural network
• I will train a Neural Network for the task of Named Entity Recognition. So we need to
do some modifications in the data to prepare it in such a manner so that it can easily fit
into a neutral network. I will start this step by extracting the mappings that are
required to train the neural network
• Now I will transform the columns in the data to
extract the sequential data for our neural network
• Now I will split the data into training and test sets and create a function for
splitting the data because the LSTM layers accept sequences of the same length
only. So every sentence that appears as integer in the data must be padded with
the same length
So here we have output:

• This output is represent the train


token length and tag which is
32372

• And the test token length and


tag is 4796

• Validity of token and tag is


10791
Training neural network for NER
• Now, I will proceed with training the neural network architecture of our
model

• The layer below will take the dimensions from the LSTM layer and will give the maximum
length and maximum tags as an output
• Here, I will create a helper function which will help us in giving the summary of
every layer of the neural network model for Named Entity Recognition
• Using BILSTM model we have this output which represent the sequential model

• We have four layers ,output, parameters, and model


Testing the NER model
• Now it’s time to test our model ..

• Using spacy library

• We have output where Anjali as a


person which is highlighted with
colour and SBS is organization.

You might also like