Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nlp = spacy.load('en_core_web_sm')
- doc = nlp(u'in the pre-primary education')
- for token in doc:
- print(token.text, token.lemma_, token.pos_, token.tag_, token.dep_,
- token.shape_, token.is_alpha, token.is_stop, token.i, token.head.i,
- token.ent_type_ if token.ent_type_ else "-", token.ent_iob_)
- in in ADP IN ROOT xx True True 0 0 - O
- the the DET DT det xxx True True 1 5 - O
- (!) pre pre ADJ AFX amod xxx True False 2 4 - O
- (!) - - PUNCT HYPH punct - False False 3 4 - O
- (!) primary primary ADJ JJ amod xxxx True False 4 5 - O
- education education NOUN NN pobj xxxx True False 5 0 - O
Add Comment
Please, Sign In to add comment