Exemplo n.º 1
0
 def setUp(self):
     self.korpus_file = res.korpus_file
     self.anno_file = res.anno_file
     self.test_korpus = Korpus("Test")
     self.test_korpus.insert_from_file(self.korpus_file)
     self.test_data = Data("test_data", self.test_korpus)
     self.test_data.add_anno(self.anno_file)
Exemplo n.º 2
0
 def setUp(self):
     self.korpus_file = res.korpus_file
     self.anno_file = res.anno_file
     self.test_korpus = Korpus("Test")
     self.test_korpus.insert_from_file(self.korpus_file)
     self.test_data = Data("test_data", self.test_korpus)
     self.test_data.add_anno(self.anno_file)
     self.test_data.attach_feature("bag_of_words")
Exemplo n.º 3
0
    def setUp(self):
        test_name = self.shortDescription()
        super(DataTest, self).setUp()
        self.mock_obj = Data("test_data", self.test_korpus)
        self.mock_obj.add_anno(self.anno_file)

        if test_name == "Test routine add_anno() in Data":
            print "setting up for testing add_anno()"
            self.textpair_dic = res.textpair_dic

        elif test_name == "Test routine attach_feature() in Data":
            print "setting up for testing attach_feature()"
            self.feature_name = "bag_of_words"

        elif test_name == "Test routine attach_feature_list() in Data":
            print "setting up for testing attach_feature_list()"
            self.feature_list = res.feature_list