A modified version of the Project PyNER
I changed the project name for that the lib can't be used with the same name and version of the former one. Or you will meet this issue:
-------------------------------------------------------------------
ZipImportError Traceback (most recent call last)
~/work/soupus_papers/code/test_ner.py in
----> 1 import ner
ZipImportError: bad local file header: '/Users/channel/anaconda3/lib/python3.6/site-packages/ner-0.1-py3.6.egg'
This project PyNER is the Python interface to the Stanford Named Entity Recognizer.
$ python setup.py install
You can record the packages you have installed by adding these paraneters
$ python setup.py install --record install.txt
>>> import nerer
>>> tagger = nerer.HttpNER(host='localhost', port=8080)
>>> tagger.get_entities("University of California is located in California, United States")
{'LOCATION': ['California', 'United States'],
'ORGANIZATION': ['University of California']}
>>> tagger.json_entities("Alice went to the Museum of Natural History.")
'{"ORGANIZATION": ["Museum of Natural History"], "PERSON": ["Alice"]}'
Remember that, if you are running the local server deployed on localhost, the default url of the page is http://localhost:8080/. then you have to add another parameter location='/ner' in the function HttpNER()
>>> tagger = nerer.HttpNER(host='localhost', port=8080, location='/ner')
BSD License
PyNER is developed by maintained by Dat Hoang. It can be found here: http://github.com/dat/pyner
PyNERER is updated from PyNER by Casper Chan in order to solve some issues. It can be found here: https://github.com/channel960608/pynerer