Hi All,

I'm trying to train  name finder models for Arabic language using the
OntoNote 4.0, as pointed out in the following tutorial
https://opennlp.apache.org/documentation/1.6.0/manual/opennlp.html#tools.corpora.ontonotes.namefinder

I was able to create the name finder model for person using the following
command without any problem.
opennlp TokenNameFinderTrainer.ontonotes -lang ar -model ar-ontonotes.bin
-nameTypes person -ontoNotesDir
ontonotes-release-4.0/data/data/files/data/arabic/

However I got the following error while trying to create models for
organizations and locations

Exception in thread "main" java.lang.IllegalArgumentException: Model not
compatible with name finder!
        at
opennlp.tools.namefind.TokenNameFinderModel.<init>(TokenNameFinderModel.java:103)
        at opennlp.tools.namefind.NameFinderME.train(NameFinderME.java:360)
        at
opennlp.tools.cmdline.namefind.TokenNameFinderTrainerTool.run(TokenNameFinderTrainerTool.java:229)
        at opennlp.tools.cmdline.CLI.main(CLI.java:224)


Following are the commands which I executed
opennlp TokenNameFinderTrainer.ontonotes -lang ar -model ar-ontonotes.bin
-nameTypes location -ontoNotesDir
ontonotes-release-4.0/data/data/files/data/arabic/

opennlp TokenNameFinderTrainer.ontonotes -lang ar -model ar-ontonotes.bin
-nameTypes organization -ontoNotesDir
ontonotes-release-4.0/data/data/files/data/arabic/

opennlp TokenNameFinderTrainer.ontonotes -lang en -model en-ontonotes.bin
-nameTypes organization -ontoNotesDir
ontonotes-release-4.0/data/data/files/data/english/

I would much appreciate if someone can point me out the reason for this
error.

Thanks in advance

Best Regards
Amindri

Reply via email to