stanford ner model colab python

Solutions on MaxInterview for stanford ner model colab python by the best coders in the world

showing results for - "stanford ner model colab python"
Loann
18 Oct 2016
1from nltk.tag import StanfordNERTagger
2from nltk.tokenize import word_tokenize
3
4
5
6st = StanfordNERTagger('/content/english.muc.7class.distsim.crf.ser.gz',
7                   '/content/stanford-ner.jar',
8                   encoding='utf-8')
9
10text = 'While in France, Christine Lagarde discussed short-term stimulus efforts in a recent interview with the Wall Street Journal.'
11
12tokenized_text = word_tokenize(text)
13classified_text = st.tag(tokenized_text)
14
15print(classified_text)