This commit is contained in:
Jan Przybylski 2021-05-10 23:25:39 +02:00
parent e8c476316d
commit af73e7ad05

View File

@ -5,7 +5,7 @@ from sklearn import preprocessing
import pandas as pd import pandas as pd
from gensim.test.utils import common_texts from gensim.test.utils import common_texts
from gensim.models import Word2Vec from gensim.models import Word2Vec
00
with open("train/in.tsv") as f: with open("train/in.tsv") as f:
X_train = f.readlines() X_train = f.readlines()
with open("train/expected.tsv") as ff: with open("train/expected.tsv") as ff:
@ -13,10 +13,11 @@ with open("train/in.tsv") as f:
with open("test-A/in.tsv") as d: with open("test-A/in.tsv") as d:
X = d.readlines() X = d.readlines()
model = Word2Vec(X_train, min_count=1,size= 50,workers=3, window =3, sg = 1) model = Word2Vec(X_train, min_count=1,size= 500,workers=3, window =3, sg = 1)
X_train=model[X_train] model1 = Word2Vec(X, min_count=1,size= 500,workers=3, window =3, sg = 1)
X=model[X] X_train=model.wv
FEAUTERES=1000 X=model1.wv
FEAUTERES=500
class NeuralNetworkModel(torch.nn.Module): class NeuralNetworkModel(torch.nn.Module):