コード例 #1
0
 def test_predict_sorry(self):
     self.assertEqual(get_good_intention(get_text_vector('me desculpa')),
                      GoodIntentions.SORRY)
     self.assertEqual(get_good_intention(get_text_vector('desculpa')),
                      GoodIntentions.SORRY)
     self.assertEqual(get_good_intention(get_text_vector('perdão')),
                      GoodIntentions.SORRY)
     self.assertEqual(get_good_intention(get_text_vector('d-desculpe')),
                      GoodIntentions.SORRY)
コード例 #2
0
 def test_predict_praise(self):
     self.assertEqual(
         get_good_intention(get_text_vector('ficou muito bom')),
         GoodIntentions.PRAISE)
     self.assertEqual(get_good_intention(get_text_vector('meus parabéns')),
                      GoodIntentions.PRAISE)
     self.assertEqual(
         get_good_intention(get_text_vector('você é inteligente')),
         GoodIntentions.PRAISE)
コード例 #3
0
 def test_predict_greeting(self):
     self.assertEqual(get_good_intention(get_text_vector('Olá')),
                      GoodIntentions.GREETING)
     self.assertEqual(get_good_intention(get_text_vector('bom dia')),
                      GoodIntentions.GREETING)
     self.assertEqual(get_good_intention(get_text_vector('boa tarde')),
                      GoodIntentions.GREETING)
     self.assertEqual(get_good_intention(get_text_vector('Oi tudo bem?')),
                      GoodIntentions.GREETING)
コード例 #4
0
 def test_predict_acknowledgement(self):
     self.assertEqual(get_good_intention(get_text_vector('Ok obrigado')),
                      GoodIntentions.ACKNOWLEDGEMENT)
     self.assertEqual(get_good_intention(get_text_vector('entende')),
                      GoodIntentions.ACKNOWLEDGEMENT)
     self.assertEqual(get_good_intention(get_text_vector('blz entendi')),
                      GoodIntentions.ACKNOWLEDGEMENT)
     self.assertEqual(
         get_good_intention(get_text_vector('espero que tenha entendido')),
         GoodIntentions.ACKNOWLEDGEMENT)
コード例 #5
0
 def test_predict_goodbye(self):
     self.assertEqual(get_good_intention(get_text_vector('até logo')),
                      GoodIntentions.GOODBYE)
     self.assertEqual(get_good_intention(get_text_vector('até breve')),
                      GoodIntentions.GOODBYE)
     self.assertEqual(get_good_intention(get_text_vector('tchau tchau')),
                      GoodIntentions.GOODBYE)
     self.assertEqual(get_good_intention(get_text_vector('ate depois')),
                      GoodIntentions.GOODBYE)
     self.assertEqual(get_good_intention(get_text_vector('flw')),
                      GoodIntentions.GOODBYE)
コード例 #6
0
 def test_predict_funny(self):
     self.assertEqual(get_good_intention(get_text_vector('kkkkkk')),
                      GoodIntentions.FUNNY)
     self.assertEqual(get_good_intention(get_text_vector('rs')),
                      GoodIntentions.FUNNY)
     self.assertEqual(get_good_intention(get_text_vector('ehuahuehuahu')),
                      GoodIntentions.FUNNY)
     self.assertEqual(get_good_intention(get_text_vector('hahahahaha')),
                      GoodIntentions.FUNNY)
     self.assertEqual(get_good_intention(get_text_vector('mds kkkk')),
                      GoodIntentions.FUNNY)
コード例 #7
0
 def test_predict_helpful(self):
     self.assertEqual(
         get_good_intention(get_text_vector('Veja no stack overflow')),
         GoodIntentions.HELPFUL)
     self.assertEqual(
         get_good_intention(
             get_text_vector('faz assim pra ver se funciona')),
         GoodIntentions.HELPFUL)
     self.assertEqual(
         get_good_intention(get_text_vector('tenta dessa forma')),
         GoodIntentions.HELPFUL)
コード例 #8
0
 def test_predict_praise(self):
     self.assertEqual(
         get_good_intention(get_text_vector('Vc gosta de maçã?')),
         GoodIntentions.PRAISE
     )
     self.assertEqual(
         get_good_intention(get_text_vector('O que vc gosta de comer?')),
         GoodIntentions.PRAISE
     )
     self.assertEqual(
         get_good_intention(get_text_vector('qual sua fruta favorita?')),
         GoodIntentions.PRAISE
     )
コード例 #9
0
 def test_predict_helpful(self):
     self.assertEqual(
         get_good_intention(get_text_vector('nossa, obrigado')),
         GoodIntentions.HELPFUL
     )
     self.assertEqual(
         get_good_intention(get_text_vector('vlw')),
         GoodIntentions.HELPFUL
     )
     self.assertEqual(
         get_good_intention(get_text_vector('muito obrigado')),
         GoodIntentions.HELPFUL
     )
コード例 #10
0
 def test_predict_acknowledgement(self):
     self.assertEqual(
         get_good_intention(get_text_vector('Você entende o que quero dizer')),
         GoodIntentions.ACKNOWLEDGEMENT
     )
     self.assertEqual(
         get_good_intention(get_text_vector('entende')),
         GoodIntentions.ACKNOWLEDGEMENT
     )
     self.assertEqual(
         get_good_intention(get_text_vector('vc compreende')),
         GoodIntentions.ACKNOWLEDGEMENT
     )
     self.assertEqual(
         get_good_intention(get_text_vector('espero que tenha entendido')),
         GoodIntentions.ACKNOWLEDGEMENT
     )