课程: Hands-On Natural Language Processing

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Custom model training with spaCy

Custom model training with spaCy

- [Instructor] Now, let's learn how to train a custom Named Entity Recognition model, NER, with spaCy. To successfully walk along, some configuration files are provided in the exercise folder. This section shows how to annotate data for NER. First, we install the spaCy library using pip. Then we go ahead to input the necessary modules like spaCy, and pandas. And we verify the version of spaCy is 3.2.3. Then we load the data set into a variable called df. And we use the head() command to see the data and get the available columns. Then we apply ast.literal_eval to the annotations column to change the data from string to tuple. We then use the info() command to see the data frame as 15 rows. In practice, it is advisable to have at least 15 instances of an entity in the training data. 15 rows of annotation will not provide that. So for the purpose of this exercise, we increase our data instances by…

内容