コード例 #1
0
 def test_pdist(self):
     _input = [u'Victor Wugo', u'Albert Camus', 'Albert Camu']
     d = self.distance
     processing = LevenshteinProcessing()
     pdist = processing.pdist(_input)
     self.assertEqual([6, 6, 1], pdist)
コード例 #2
0
 def setUp(self):
     self.input1 = [u'Victor Hugo', u'Albert Camus', 'Jean Valjean']
     self.input2 = [u'Victor Wugo', u'Albert Camus', 'Albert Camu']
     self.distance = levenshtein
     processing = LevenshteinProcessing()
     self.matrix = processing.cdist(self.input1, self.input2)