You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
488 B

from dataset import Corpus, build_glove
import pickle
train_corpus = Corpus('snips', 'train', 50)
pickle.dump(train_corpus.word2idx, open( "word2idx.pkl", "wb" ))
wordvecs = build_glove(train_corpus.word2idx, train_corpus.idx2word)
pickle.dump(wordvecs, open( "wordvecs.pkl", "wb" ))
slots = [slot for slot in train_corpus.slot2idx]
pickle.dump(slots, open( "slots.pkl", "wb" ))
intent = [intent for intent in train_corpus.intent2idx]
pickle.dump(intent, open( "intents.pkl", "wb" ))