File size: 446 Bytes
486585a |
1 2 3 4 5 6 7 8 9 10 11 |
import fasttext
model = fasttext.train_supervised(input='train.txt', autotuneValidationFile='validation.txt', autotuneDuration=60*60)
model.save_model("nordic-lid.bin")
print(model.test("test.txt"))
model_all = fasttext.train_supervised(input='train_all.txt', autotuneValidationFile='validation_all.txt', autotuneDuration=60*60)
model_all.save_model("nordic-lid_all.bin")
print(model_all.test("test.txt"))
print(model_all.test("test_all.txt"))
|