File size: 381 Bytes
2f500b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import pickle
import embedding
from tqdm import tqdm

class SetLine:
    def __init__(self, name):
        self.name = name
        self.inp = embedding.getvec(name)

net = []
with open("dataset.txt", "r") as f: lines = f.readlines()
for ind, i in tqdm(enumerate(lines[1:])):
    if (i[:6] != "<null>"): net.append(SetLine(i))

with open("set.pckl", "wb") as f: pickle.dump(net, f)