Ejemplo n.º 1
0
    def test_read_from_line_handles_two_column_with_index(self):
        index = 23
        text = "this is a sentence"
        label = None
        line = self.instance_to_line(text, label, index)

        instance = TextClassificationInstance.read_from_line(line)
        assert instance.text == text
        assert instance.label is label
        assert instance.index == index
Ejemplo n.º 2
0
 def test_read_from_line_handles_one_column(self):
     text = "this is a sentence"
     instance = TextClassificationInstance.read_from_line(text)
     assert instance.text == text
     assert instance.label is None
     assert instance.index is None