retroc2/test-A/set5.py

15 lines
386 B
Python
Raw Permalink Normal View History

2021-05-16 22:15:55 +02:00
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LinearRegression
import string
import csv
dev = []
with open("out.tsv", 'r', encoding="utf-8") as out:
dev = [line.strip() for line in out]
i = -1
with open("fix.tsv", 'w', encoding="utf-8") as fix:
for score in dev:
score = int(float(score))
fix.write(str(score) + ".5\n")