Ejemplo n.º 1
0
 def test_first_person_output(self):
     comment = 'I/PRP I/PRP$'
     result = np.zeros(173)
     result[0] = 2.0
     result[14] = 2.0
     result[15] = 5.5
     self.assertIsInstance(extract1(comment),np.ndarray)
     self.assertEqual(extract1(comment).all(), result.all())
Ejemplo n.º 2
0
 def test_second_person_output(self):
     comment = 'you/PRP us/PRP'
     result = np.zeros(173)
     result[1] = 2.0
     result[14] = 2.0
     result[15] = len(comment)/2
     self.assertIsInstance(extract1(comment),np.ndarray)
     self.assertEqual(extract1(comment).all(),result.all())
Ejemplo n.º 3
0
 def test_co_con(self):
     comment = 'sds/CC dsds/CC'
     result = np.zeros(173)
     result[3] = 2.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[3], result[3])
Ejemplo n.º 4
0
 def test_third_person_output(self):
     comment = 'he/PRP him/PRP'
     result = np.zeros(173)
     result[2] = 2.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[2], result[2])
Ejemplo n.º 5
0
 def test_avg_sen_len(self):
     comment = 'dsd/WDT dsdsd/WP hhjh/WP Dsss/wwww ./. dsjdk/WP$ dsd/WRB ./.'
     result = np.zeros(173)
     result[14] = 4.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[14], result[14])
Ejemplo n.º 6
0
 def test_wh_words(self):
     comment = 'dsd/WDT dsdsd/WP dsjdk/WP$ dsd/WRB'
     result = np.zeros(173)
     result[11] = 4.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[11], result[11])
Ejemplo n.º 7
0
 def test_common_nouns(self):
     comment = 'dsd/NN dsdsd/NNS'
     result = np.zeros(173)
     result[8] = 2.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[8], result[8])
Ejemplo n.º 8
0
 def test_commas(self):
     comment = ',/, ,/,'
     result = np.zeros(173)
     result[6] = 2.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[6], result[6])
Ejemplo n.º 9
0
 def test_std_fam(self):
     comment = 'abbey abide'
     result = np.zeros(173)
     result[22] = 16.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[22], result[22])
Ejemplo n.º 10
0
 def test_std_img(self):
     comment = 'abbey abide'
     result = np.zeros(173)
     result[21] = 207.5
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[21], result[21])
Ejemplo n.º 11
0
 def test_avg_fam(self):
     comment = 'abbey abide'
     result = np.zeros(173)
     result[19] = 413.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[19], result[19])
Ejemplo n.º 12
0
 def test_avg_img(self):
     comment = 'abbey abide'
     result = np.zeros(173)
     result[18] = 367.5
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[18], result[18])
Ejemplo n.º 13
0
 def test_avg_aoa(self):
     comment = 'abbey abide'
     result = np.zeros(173)
     result[17] = 506.5
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[17], result[17])
Ejemplo n.º 14
0
 def test_no_of_sentence(self):
     comment = 'dsd/WDT dsdsdsd/WP ./. dsjdks/WP$ dsd/WRB ./.'
     result = np.zeros(173)
     result[16] = 2.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[16], result[16])
Ejemplo n.º 15
0
 def test_avg_tk_len(self):
     comment = 'dsd/WDT dsdsdsd/WP ./. dsjdks/WP$ dsd/WRB ./.'
     result = np.zeros(173)
     result[15] = 4.75
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[15], result[15])
Ejemplo n.º 16
0
 def test_past_tense(self):
     comment = 'sds/VBD dsd/VBD'
     result = np.zeros(173)
     result[4] = 2.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[4], result[4])
Ejemplo n.º 17
0
 def test_future_tense(self):
     comment = 'sds/VBG dsd/VBG'
     result = np.zeros(173)
     result[5] = 2.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[5], result[5])
Ejemplo n.º 18
0
 def test_avg_vmean(self):
     comment = 'abbey abide'
     result = np.zeros(173)
     result[23] = 5.6849999999999996
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[23], result[23])
Ejemplo n.º 19
0
 def test_multi_punctua(self):
     comment = ',!/! %%/%'
     result = np.zeros(173)
     result[7] = 2.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[7], result[7])
Ejemplo n.º 20
0
 def test_avg_dmean(self):
     comment = 'abbey abide'
     result = np.zeros(173)
     result[25] = 5.165
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[25], result[25])
Ejemplo n.º 21
0
 def test_proper_nouns(self):
     comment = 'dsd/NNP dsdsd/NNPS'
     result = np.zeros(173)
     result[9] = 2.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[9], result[9])
Ejemplo n.º 22
0
 def test_std_amean(self):
     comment = 'abbey abide'
     result = np.zeros(173)
     result[27] = 0.5299999999999998
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[27], result[27])
Ejemplo n.º 23
0
 def test_advs(self):
     comment = 'dsd/RB dsdsd/RBR sdjs/RBS'
     result = np.zeros(173)
     result[10] = 3.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[10], result[10])
Ejemplo n.º 24
0
 def test_std_dmean(self):
     comment = 'abbey abide'
     result = np.zeros(173)
     result[28] = 0.16500000000000004
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[28], result[28])
Ejemplo n.º 25
0
 def test_slang(self):
     comment = 'smh fwb lmfao pp lmao lms tbh rofl wtf bff bff lol'
     result = np.zeros(173)
     result[12] = 11.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[12], result[12])
Ejemplo n.º 26
0
 def test_upper(self):
     comment = 'SDSD DDSDS DSDSD DSDSW WDW tbh rofl wtf bff b bff'
     result = np.zeros(173)
     result[13] = 5.0
     self.assertIsInstance(extract1(comment), np.ndarray)
     self.assertEqual(extract1(comment)[13], result[13])