mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-10-03 12:00:44 +08:00
Fixed up sentiment api and updated docs
This commit is contained in:
1 parent
8d34b05d9b
commit
b5ece3d51b
6 files changed
+19
-11
No files matched your search
+3
-3
@@ -2,7 +2,7 @@ import unittest
|
||||
|
||||
import numpy as np
|
||||
|
||||
from IndicoIo import political, spam, posneg, fer, facial_features
|
||||
from IndicoIo import political, spam, sentiment, fer, facial_features
|
||||
|
||||
|
||||
class FullAPIRun(unittest.TestCase):
|
||||
@@ -24,9 +24,9 @@ class FullAPIRun(unittest.TestCase):
|
||||
self.assertEqual(spam_set, set(response.keys()))
|
||||
|
||||
def test_posneg(self):
|
||||
posneg_set = set(['Positive', 'Negative'])
|
||||
posneg_set = set(['Sentiment'])
|
||||
test_string = "Worst song ever."
|
||||
response = posneg(test_string)
|
||||
response = sentiment(test_string)
|
||||
|
||||
self.assertTrue(isinstance(response, dict))
|
||||
self.assertEqual(posneg_set, set(response.keys()))
|
||||
|
||||
Reference in new issue
Block a user