예제 #1
0
 def teste_por_uma_delecao_no_comeco(self):
     texto1 = 'aperte o play'
     texto2 = 'o play'
     self.assertEqual(1, plagio.distancia(texto1, texto2))
예제 #2
0
 def teste_por_uma_troca_delecao(self):
     texto1 = 'aperte o play?'
     texto2 = 'aperte a'
     self.assertEqual(2, plagio.distancia(texto1, texto2))
예제 #3
0
 def teste_por_uma_troca(self):
     texto1 = 'aperte a play'
     texto2 = 'aperte o play?'
     self.assertEqual(1, plagio.distancia(texto1, texto2))
예제 #4
0
 def teste_uma_palavra(self):
     texto1 = 'aperte o play?'
     texto2 = 'aperte o'
     self.assertEqual(1, plagio.distancia(texto1, texto2))
예제 #5
0
 def teste_uma_palavra_com_o_segundo_texto_maior(self):
     texto1 = 'aperte o'
     texto2 = 'aperte o play?'
     self.assertEqual(1, plagio.distancia(texto1, texto2))
예제 #6
0
 def teste_textos_iguais(self):
     texto1 = u'olá, tudo bem?'
     texto2 = texto1
     self.assertEqual(0, plagio.distancia(texto1, texto2))
예제 #7
0
 def teste_textos_iguais_exceto_pela_pontuacao(self):
     texto1 = u'olá, tudo bem?'
     texto2 = u'olá tudo bem'
     self.assertEqual(0, plagio.distancia(texto1, texto2))
예제 #8
0
 def teste_por_uma_troca(self):
     texto1 = 'aperte a play'
     texto2 = 'aperte o play?'
     self.assertEqual(1, plagio.distancia(texto1, texto2)) 
예제 #9
0
 def teste_por_uma_delecao_no_comeco(self):
     texto1 = 'aperte o play'
     texto2 = 'o play'
     self.assertEqual(1, plagio.distancia(texto1, texto2)) 
예제 #10
0
 def teste_por_uma_troca_delecao(self):
     texto1 = 'aperte o play?'
     texto2 = 'aperte a'
     self.assertEqual(2, plagio.distancia(texto1, texto2)) 
예제 #11
0
 def teste_uma_palavra_com_o_segundo_texto_maior(self):
     texto1 = 'aperte o'
     texto2 = 'aperte o play?'
     self.assertEqual(1, plagio.distancia(texto1, texto2)) 
예제 #12
0
 def teste_uma_palavra(self):
     texto1 = 'aperte o play?'
     texto2 = 'aperte o'
     self.assertEqual(1, plagio.distancia(texto1, texto2)) 
예제 #13
0
 def teste_textos_iguais_exceto_pela_pontuacao(self):
     texto1 = u'olá, tudo bem?'
     texto2 = u'olá tudo bem'
     self.assertEqual(0, plagio.distancia(texto1, texto2)) 
예제 #14
0
 def teste_textos_iguais(self):
     texto1 = u'olá, tudo bem?'
     texto2 = texto1
     self.assertEqual(0, plagio.distancia(texto1, texto2))