Created
October 6, 2016 13:41
-
-
Save manashmandal/810db10809cbc1209b34c7d25efe95d5 to your computer and use it in GitHub Desktop.
StanfordNERTagger for linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nltk | |
print nltk.__version__ | |
from nltk.tag import StanfordNERTagger | |
import os | |
st = StanfordNERTagger(os.environ.get('STANFORD_MODELS')) | |
print st._stanford_jar | |
stanford_dir = st._stanford_jar[0].rpartition('/')[0] | |
from nltk.internals import find_jars_within_path | |
stanford_jars = find_jars_within_path(stanford_dir) | |
print ":".join(stanford_jars) | |
print st._stanford_jar | |
print st.tag('Manash is awesome'.split()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment