Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data_preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def lemmatize():
answer = line_info[5]
question = ' '.join(map(lambda x: wn_lemmatizer.lemmatize(x), nltk.word_tokenize(question)))
answer = ' '.join(map(lambda x: wn_lemmatizer.lemmatize(x), nltk.word_tokenize(answer)))
if set_name != 'test':
if 'test' not in set_name:
label = line_info[6]
fout.write('\t'.join([q_id, question, a_id, answer, label]) + '\n')
else:
Expand Down Expand Up @@ -207,4 +207,4 @@ def data_transform(embedding_size):
gen_vocab()

# 4.生成相应的embedding
data_transform(300)
data_transform(300)