Example #1
0
 def test_classify(self):
     tags = ["A","B","C"]
     clusterings = [Clustering([], "this is of type A"),Clustering([], "this is of type B"),Clustering([], "this is of type C"),
                    Clustering([], "this is of type B"),Clustering([], "this is of type S"),Clustering([], "this is of type A"),
                    Clustering([], "this is of type A"),Clustering([], "this is of type C"),Clustering([], "this is of type D")]
     counter =  Clustering.classify(tags, clusterings)
     self.assertEqual(counter['A'], 3)
     self.assertEqual(counter['B'], 2)
     self.assertEqual(counter['C'], 2)
Example #2
0
 def test_classify(self):
     tags = ["A", "B", "C"]
     clusterings = [
         Clustering([], "this is of type A"),
         Clustering([], "this is of type B"),
         Clustering([], "this is of type C"),
         Clustering([], "this is of type B"),
         Clustering([], "this is of type S"),
         Clustering([], "this is of type A"),
         Clustering([], "this is of type A"),
         Clustering([], "this is of type C"),
         Clustering([], "this is of type D")
     ]
     counter = Clustering.classify(tags, clusterings)
     self.assertEqual(counter['A'], 3)
     self.assertEqual(counter['B'], 2)
     self.assertEqual(counter['C'], 2)