How to Train NER with Custom training data using spaCy.

Step:1

Step:2

python convert_spacy_train_data.py

Step:3

$ python train.py
Statring iteration 0
{'ner': 45.187162002439436}
Statring iteration 1
{'ner': 3.332452492465983}
Statring iteration 2
{'ner': 2.0020173944797612}
Statring iteration 3
{'ner': 1.506792157187176}
Statring iteration 4
{'ner': 1.435887415739853}
Statring iteration 5
{'ner': 2.6435020729886842}
Statring iteration 6
{'ner': 6.12104525022155}
Statring iteration 7
{'ner': 2.473104735366477}
Statring iteration 8
{'ner': 1.735813616271975}
Statring iteration 9
{'ner': 0.5837462286798504}
Statring iteration 10
{'ner': 0.48013027154284454}
Statring iteration 11
{'ner': 0.010529610710777635}
Statring iteration 12
{'ner': 0.0003886471581916718}
Statring iteration 13
{'ner': 4.343940463793621e-05}
Statring iteration 14
{'ner': 0.0004672196252375103}
Statring iteration 15
{'ner': 8.930835107521379e-05}
Statring iteration 16
{'ner': 1.272837546950617e-06}
Statring iteration 17
{'ner': 0.0003499371851350634}
Statring iteration 18
{'ner': 5.754545232317604e-07}
Statring iteration 19
{'ner': 1.3910001552992408e-07}
Enter your Model Name: myMdl
Enter your testing text: what is the price of pen?
pen 21 24 PrdName
>>> import spacy
>>> nlp = spacy.load('model name')

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Manivannan Murugavel

Manivannan Murugavel

Artificial Intelligence and Data Science