daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. nlp = spacy.load('en_core_web_sm')
  2. doc = nlp(u'in the pre-primary education')
  3.  
  4. for token in doc:
  5.     print(token.text, token.lemma_, token.pos_, token.tag_, token.dep_,
  6.           token.shape_, token.is_alpha, token.is_stop, token.i, token.head.i,
  7.           token.ent_type_ if token.ent_type_ else "-", token.ent_iob_)
  8.  
  9. in in ADP IN ROOT xx True True 0 0 - O
  10. the the DET DT det xxx True True 1 5 - O
  11. (!) pre pre ADJ AFX amod xxx True False 2 4 - O
  12. (!) - - PUNCT HYPH punct - False False 3 4 - O
  13. (!) primary primary ADJ JJ amod xxxx True False 4 5 - O
  14. education education NOUN NN pobj xxxx True False 5 0 - O
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top