Ejemplo n.º 1
0
    def test_segmenting(self):
        train = self.corpus[0:20000]
        dev = self.corpus[20000:20050]
        test = self.corpus[21000:23000]
        self.crf.train(train, dev)

        accuracy = sequence_accuracy(self.crf, test)
        self.assertGreaterEqual(accuracy, 0.80)
    def test_segmenting(self):
        train = self.corpus[0:20000]
        dev = self.corpus[20000:20050]
        test = self.corpus[21000:23000]
        self.crf.train(train, dev)

        accuracy = sequence_accuracy(self.crf, test)
        self.assertGreaterEqual(accuracy, 0.80)
    def test_segmenting(self):
        train = self.corpus[0:7000]
        dev = self.corpus[7000:7050]
        test = self.corpus[8000:10000]
        self.crf.train(train, dev)

        accuracy = sequence_accuracy(self.crf, test)
        print (accuracy)
        self.assertGreaterEqual(accuracy, 0.82)
    def test_segmenting(self):
        train = self.corpus[0:20000]
        dev = self.corpus[20000:21000]
        test = self.corpus[21000:24000]
        # train = self.corpus[0:350]
        # dev = self.corpus[350:375]
        # test = self.corpus[375:436]
        self.crf.train(train, dev)

        accuracy = sequence_accuracy(self.crf, test)
        print "%2.1f%%" % (accuracy * 100)
        self.assertGreaterEqual(accuracy, 0.80)