Search code examples
stanford-nlp

Stanford NLP - NER & Models


I was looking at the online demo: http://nlp.stanford.edu:8080/ner/process Try a simple testcase like: John Chambers studied in London (UK) and Mumbai (India). The 3-class Classifier identifies the Person, the 7-class Classifier does not identify the Person. Seems like I need to run the parser on both the Models: once to identify Person, Location & Organization. And once just for Currency?


Solution

  • When I run this command it finds all of the appropriate entities on your example:

    java -Xmx8g edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner -file sample-sentence.txt -outputFormat text
    

    When you run the NERCombinerAnnotator which corresponds to the annotator ner it will run a combination of several models automatically for you.