I'm relatively new at this. Trying to get Stanford Segmenter to play well with nltk and keep running into this error I havent been able to resovle.
This is the error:
CRFClassifier invoked on Tue Jan 19 17:39:25 CET 2016 with arguments:
-sighanCorporaDict C:/Users/Documents/DaimText/stanford-segmenter-2015-12-09/data -textFile C:\Users\NGBENE\AppData\Local\Temp\tmpmti8l2nb -sighanPostProcessing true -keepAllWhitespaces false -loadClassifier C:/Users/Documents/DaimText/stanford-segmenter-2015-12-09/data/pku.gz -serDictionary C:/Users/Documents/DaimText/stanford-segmenter-2015-12-09/data/dict-chris6.ser.gz -inputEncoding UTF-8
serDictionary=C:/Users/Documents/DaimText/stanford-segmenter-2015-12-09/data/dict-chris6.ser.gz
loadClassifier=C:/Users/Documents/DaimText/stanford-segmenter-2015-12-09/data/pku.gz
sighanCorporaDict=C:/Users/Documents/DaimText/stanford-segmenter-2015-12-09/data
inputEncoding=UTF-8
textFile=C:\Users\AppData\Local\Temp\tmpmti8l2nb
sighanPostProcessing=true
keepAllWhitespaces=false
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
I have python3.4
I've reinstalled the nltk (current version 3.1)
I've added the classpath of the slf4j-api.jar (any other .jar i need to add?)
import os
javapath = "C:/Users/Documents/DaimText/stanford-segmenter-2015-12-09/slf4j-api.jar"
os.environ['CLASSPATH'] = javapath
Still doesn't work. Any ideas?
Thanks alot!
UPDATE:
Uninstalled: stanford-segmenter-2015-12-09
Installed: stanford-segmenter-2014-08-27
Followed the test code from here:
Works!
Seems like it might be a problem with the new version.