The Stanford Named Entity Recognizer

The Named Entity Recognizer is a task that classifies the elements of a sentence into categories, such as person, organization, location, and so on. Stanford Named Entity Recognizer is one of the most popular out there and can be found at http://nlp.stanford.edu/.

The Stanford Named Entity Recognizer can be downloaded at http://nlp.stanford.edu/software/stanford-ner-2014-06-16.zip.

The following code shows the Stanford Named Entity Recognizer in action:

>>> from nltk.tag.stanford import NERTagger.

>>> st = NERTagger('./lib/stanford-ner/classifiers/english.all.3class.distsim.crf.ser.gz', './lib/stanford-ner/stanford-ner.jar')

>>> st.tag('''Barrack Obama is the president of the United States of America . His father ...

Get Mastering Python for Data Science now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.