Prześlij pliki do ''

This commit is contained in:
Joanna Kurczalska 2022-05-11 00:07:10 +02:00
parent 33b253e477
commit da944b72cb

2
run.py
View File

@ -16,7 +16,7 @@ with lzma.open("dev-0/in.tsv.xz", "rt", encoding="utf-8") as dev_file:
with lzma.open("test-A/in.tsv.xz", "rt", encoding="utf-8") as test_file: with lzma.open("test-A/in.tsv.xz", "rt", encoding="utf-8") as test_file:
in_test = [x.strip().lower() for x in test_file.readlines()] in_test = [x.strip().lower() for x in test_file.readlines()]
tfidf_vectorizer=TfidfVectorizer(stop_words="english") tfidf_vectorizer=TfidfVectorizer()
IN_train = tfidf_vectorizer.fit_transform(in_train) IN_train = tfidf_vectorizer.fit_transform(in_train)
classifier = MultinomialNB() classifier = MultinomialNB()
y_pred = classifier.fit(IN_train, out_train) y_pred = classifier.fit(IN_train, out_train)