Search code examples
stanford-nlpsentiment-analysistraining-datascoring

Training model ignored by stanford CoreNLP


I've made a small, sample training model to use when performing sentiment analysis with coreNLP. In order to get coreNLP to use this model, I've written the following lines of code:

props = new Properties(); 
props.put("sample_model-0023-100.00.ser.gz", "/home/usr/Documents/coreNLP/");
props.put("annotators", "tokenize, ssplit, parse, lemma, sentiment"); 
pipeline = new StanfordCoreNLP(props);

However, it doesn't look like the code is using the model I'm pointing to. I know this because I passed a couple of sentences to it that should get certain scores if the code were to use this model, but I'm getting different scores. Am I missing something in my lines of code that's preventing coreNLP from using the model I've created?


Solution

  • You want this:

    props.put("sentiment.model", "/path/to/sample_model-0023-100.00.ser.gz");