I am creating a custom post tagger model for Italian language.
I get an error running the command to train the model:
damiano@damiano:~/stanford-postagger$ java -classpath stanford-postagger.jar edu.stanford.nlp.tagger.maxent.MaxentTagger -prop /home/damiano/modelli/italian.tagger.props -model italian.tagger -trainFile italian.tagger.train
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at edu.stanford.nlp.io.IOUtils.<clinit>(IOUtils.java:41)
at edu.stanford.nlp.util.StringUtils.argsToProperties(StringUtils.java:938)
at edu.stanford.nlp.util.StringUtils.argsToProperties(StringUtils.java:891)
at edu.stanford.nlp.tagger.maxent.TaggerConfig.<init>(TaggerConfig.java:128)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.main(MaxentTagger.java:1836)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 5 more
I found this command inside the README.txt
I also tried with -classpath stanford-postagger-3.6.0.jar but I had the same problem.
This is the folder content:
damiano@damiano:~/stanford-postagger$ dir
build.xml LICENSE.txt sample-input.txt stanford-postagger-3.6.0-javadoc.jar stanford-postagger-gui.bat stanford-postagger.sh
data models sample-output.txt stanford-postagger-3.6.0-sources.jar stanford-postagger-gui.sh TaggerDemo2.java
lib README.txt stanford-postagger-3.6.0.jar stanford-postagger.bat stanford-postagger.jar TaggerDemo.java
What can I do?
EDIT
This is my prop file:
model = /home/damiano/modelli/italian.tagger
arch = generic,suffix(4),prefix(4),unicodeshapes(-1,1),unicodeshapeconjunction(-1,1),words(-2,-2),words(2,2)
trainFile = /home/damiano/modelli/italian.tagger.train
tagSeparator = _
encoding = utf-8
iterations = 100
openClassTags = B BN CC CS DD DE DI DQ DR E EA FB FC FF FS I N PC PD PE PI PP PQ PR RD RI T SA SP XH XM XE XX Ss Sp Sn As Ap An APs APp APn NOs NOp NOn SWs SWp SWn Vip Vip3 Vii Vii3 Vis Vis3 Vif Vif3 Vcp Vcp3 Vci Vci3 Vdp Vdp3 Vg Vp Vf Vm VAip VAip3 VAii VAii3 VAis Vis3 VAif VAif3 VAcp VAcp3 VAci VAci3 VAdp VAdp3 VAg VAp VAf VAm VMip VMip3 VMii VMii3 VMis VMis3 VMif VMif3 VMcp VMcp3 VMci VMci3 VMdp VMdp3 VMg VMp VMf VMm
tokenize = false