2

I found the info about running RegexNER from http://nlp.stanford.edu/software/regexner.html

Also I worked through the sample and following cmd worked fine for me.

java -mx1g -cp '*' edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators 'tokenize,ssplit,pos,lemma,ner,regexner' -file JuliaGillard.txt -regexner.mapping jg-regexner.txt

I looked at setting up Stanford NLP server from http://stanfordnlp.github.io/CoreNLP/corenlp-server.html.

and following cmd

java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer

could start a nlp server at 9000 port.

But when I tried to run the server with -regexner.mapping jg-regexner.txt it dosnt work. Can someone help me with this.

  • Please check this. It looks like similar question http://stackoverflow.com/questions/40441963/how-to-use-a-custom-tokensregex-rules-annotator-with-stanford-corenlp-server – Om Prakash Apr 20 '17 at 07:45

1 Answers1

0

To get the Regex NERSalong with stanford NERS, create the regex ner file eg. regexner.txt and put the file in the same directory and the stanford jars. Then when you make a call to the server, add these arguments to the request url.

properties={"annotators": "tokenize,ssplit,ner,regexner","outputFormat": "json","enforceRequirements":"false", "regexner.mapping":"regexner.txt"}

Sorry for the late post. Hope it helps others.

Werner Henze
  • 16,404
  • 12
  • 44
  • 69