Zaktualizuj 'run.py'
This commit is contained in:
parent
e6fe79908d
commit
773ac3e581
11
run.py
11
run.py
@ -2,7 +2,6 @@ import lzma
|
|||||||
|
|
||||||
from sklearn.naive_bayes import MultinomialNB
|
from sklearn.naive_bayes import MultinomialNB
|
||||||
from sklearn.feature_extraction.text import TfidfVectorizer
|
from sklearn.feature_extraction.text import TfidfVectorizer
|
||||||
from sklearn.metrics import accuracy_score
|
|
||||||
|
|
||||||
|
|
||||||
def get_data(file_name, data_type):
|
def get_data(file_name, data_type):
|
||||||
@ -38,13 +37,3 @@ def bayes(train):
|
|||||||
|
|
||||||
|
|
||||||
bayes("train")
|
bayes("train")
|
||||||
|
|
||||||
# y_true = []
|
|
||||||
# with open("dev-0/expected.tsv", encoding='utf-8') as file:
|
|
||||||
# for line in file.readlines():
|
|
||||||
# y_true.append(line)
|
|
||||||
# y_pred = []
|
|
||||||
# with open("dev-0/out.tsv", encoding='utf-8') as file:
|
|
||||||
# for line in file.readlines():
|
|
||||||
# y_pred.append(line)
|
|
||||||
# print(accuracy_score(y_true, y_pred))
|
|
||||||
|
Loading…
Reference in New Issue
Block a user