Search code examples
stanford-nlp

Error while trying to do POStagging: Error while loading a tagger model (probably missing model file)


I am trying to use StanfordNLP for croatian using windows command prompt. I have downloaded the specific model for this language (hr_set_models) with .pt files.

I have created the .properties file but I get the following message:

Exception in thread "main" edu.stanford.nlp.io.RuntimeIOException: Error while loading a tagger model (probably missing model file)

There is no problem for the tokenizer model and the file hr_set_tagger.pt is in the folder.

I see that in the model folder there is also a file named hr_set.pretrain.pt, I do not know if I should use it in the .properties file.

Thanks in advance!

Bellow is the .properties file I have created.

annotators = tokenize, ssplit, pos, lemma, depparse
# tokenize
tokenize.model = hr_set_models/hr_set_tokenizer.pt
# pos
pos.model = hr_set_models/hr_set_tagger.pt
# lemma
lemma.model = hr_set_models/hr_set_lemmatizer.pt
#depparse
depparse.model = hr_set_models/hr_set_parser.pt

Solution

  • You need to use the full Python system. There are no Java models for Croatian, so you shouldn't be using the Stanford CoreNLP server.

    There is more documentation here: https://stanfordnlp.github.io/stanfordnlp/pipeline.html