cyhex/smm — Issue #4: Polarity it is not working 
Author: lestatega
Created: 2011-10-19 21:03:20+00:00
State: open

Hi I have build successfully everything i have been able to create the databases with the following commands
To Build Training Dataset

python collector/trainer/twitterCollector.py
python collector/trainer/tweetClassifier.py

I have already created this files in /data dir

-rw-r--r-- 1 root root 293204 Oct 11 20:53 mood_traing_150k_1k_0.6.dat
-rw-r--r-- 1 root root 6104719 Oct 11 20:52 tweets_negative_raw.dat
-rw-r--r-- 1 root root 6581580 Oct 11 20:47 tweets_positive_raw.dat

My service it is OK

domU-12-31-39-06-8E-37 tracker # ./moodClassifierd.py start
starting...
OK

tests # more moodClientServerTest.py
# -*- coding: utf-8 -*-
import sys
sys.path.append('../../')
from tracker.lib.moodClassifierClient import MoodClassifierTCPClient

MCC = MoodClassifierTCPClient('127.0.0.1',6666)

test_data = {'text':'I am sad because i have a bad iphone So the 4S is announced yet preorder is sold out? alright then'}

print MCC.classify(test_data, 'search')

OUTPUT it is
_________________________________________________________________________________________________

[{'text': u'I am sad because i have a bad iphone So the 4S is announced yet preorder is sold out? alright then', 'x_mood': 0.0, 'x_lang': 'en'}]

I'm not able to identify if the polarity it is "POSITIVE or NEGATIVE" What im doing wrong because it look neutral, I am assuming that i will have to get -.xxx for negative and close to 1 for positive ?