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")) | |