SHARE
TWEET

Untitled

a guest Feb 20th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import nltk
  2.  
  3. from nltk.tag.stanford import StanfordNERTagger  
  4.  
  5. yourText = this_is_your_text
  6.  
  7. words = nltk.word_tokenize(yourText)
  8. jar = './stanford-ner.jar'
  9. model = './ner-model-english.ser.gz'
  10.  
  11. tagger = StanfordNERTagger(model, jar, encoding='utf8')
  12.  
  13. print(ner_tagger.tag(words))
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