Edit example code

The original code forget to import the `random` module and the `EntityRecognizer` module.
This commit is contained in:
yalei 2017-03-07 18:07:40 +08:00 committed by GitHub
parent f710fc3f2d
commit 27c0e6226b
1 changed files with 2 additions and 0 deletions

View File

@ -138,7 +138,9 @@ p
+code. +code.
import spacy import spacy
import random
from spacy.gold import GoldParse from spacy.gold import GoldParse
from spacy.language import EntityRecognizer
train_data = [ train_data = [
('Who is Chaka Khan?', [(7, 17, 'PERSON')]), ('Who is Chaka Khan?', [(7, 17, 'PERSON')]),