First I am very much thankful to you for posting the step by step process to classify the Japan Sentiments.
I tried to replicate the same as you have done.
I used below code of yours
from jNlp.jSentiments import *
jp_wn = '../../../../data/wnjpn-all.tab'
en_swn = '../../../../data/SentiWordNet_3.0.0_20100908.txt'
classifier = Sentiment()
classifier.train(en_swn, jp_wn)
text = u'監督、俳優、ストーリー、演出、全部最高!'
Until above statement everything worked fine. But when I tried to use below statement
print classifier.baseline(text)
I got below error
Traceback (most recent call last):
File "", line 1, in
File "build/bdist.linux-i686/egg/jNlp/jSentiments.py", line 55, in baseline
File "build/bdist.linux-i686/egg/jNlp/jSentiments.py", line 48, in polarScores_text
File "build/bdist.linux-i686/egg/jNlp/jTokenize.py", line 30, in jTokenize
File "", line 124, in XML
cElementTree.ParseError: not well-formed (invalid token): line 1, column 9
Please help me in clearing the issue. Please tell what am I doing wrong.
But when I classify the word sentiments I am able to do it properly.
Dear Kevincobain,
First I am very much thankful to you for posting the step by step process to classify the Japan Sentiments. I tried to replicate the same as you have done.
I used below code of yours
Until above statement everything worked fine. But when I tried to use below statement
I got below error Traceback (most recent call last): File "", line 1, in
File "build/bdist.linux-i686/egg/jNlp/jSentiments.py", line 55, in baseline
File "build/bdist.linux-i686/egg/jNlp/jSentiments.py", line 48, in polarScores_text
File "build/bdist.linux-i686/egg/jNlp/jTokenize.py", line 30, in jTokenize
File "", line 124, in XML
cElementTree.ParseError: not well-formed (invalid token): line 1, column 9
Please help me in clearing the issue. Please tell what am I doing wrong.
But when I classify the word sentiments I am able to do it properly.
Please help me in clearing this issue