Ejemplo n.º 1
0
def main():
    """Main function, that train and validade the model for the Quotation Extractor Task.

    """
    w = train.train()
    print(w)

    dataset = train_example.load(fileName=INPUT_TEST_FILE)

    precision, recall = metrics.validate(w, dataset=dataset, argmax=quotation.argmax)

    print("On the test set:\n")
    print("precision:", precision)
    print("recall:", recall)
Ejemplo n.º 2
0
def main():
    """Main function, that train and validade the model for the Quotation Extractor Task.

    """
    w = train.train()
    print(w)

    dataset = train_example.load(fileName=INPUT_TEST_FILE)

    precision, recall = metrics.validate(w,
                                         dataset=dataset,
                                         argmax=quotation.argmax)

    print("On the test set:\n")
    print("precision:", precision)
    print("recall:", recall)
Ejemplo n.º 3
0
	def test_train(self):
		w = train.train()
		#print("w:", w)

		self.assertEqual(len(w), 537)