0

I'm having trouble setting the SUTime in the spanish version that comes with in the stanford-spanish-corenlp-2018-10-05-models.jar

In Stanford documents it says that the options ner.applyNumericClassifiers = true and ner.useSUTime = true is only valid for the English version, but the spanish jar comes with a spanish.sutime.txt included and I would like for it to work.

I tried with this code:

Properties props = new Properties();
props.put("annotators", "tokenize, ssplit, pos, lemma, ner");

props.setProperty("tokenize.language", "es");
...         
...
props.setProperties("sutime.rules", "edu/stanford/nlp/models/sutime/spanish.sutime.txt");

I don't really know how to move on and I haven't seen this issue in any other question, maybe someone can help me.

1 Answers1

0

Spanish will run SUTime by defaulting 3.9.2. You can just use these properties:

ner.model = edu/stanford/nlp/models/ner/spanish.ancora.distsim.s512.crf.ser.gz
ner.applyNumericClassifiers = true
ner.useSUTime = true
ner.language = es

You can get the default Spanish properties with:

Properties props = LanguageInfo.getLanguageProperties("spanish");
StanfordNLPHelp
  • 8,699
  • 1
  • 11
  • 9
  • For this sentence: "El verano pasado, se reunieron todos los martes por la tarde, de 1:00 p.m. a 3:00 p.m.", it yields, only one: "[41, 47]: martes --> 2020-06-02-WXX-2". Why are other expressions not identified? – dangiankit Jun 04 '20 at 01:13