From 78c396a595e012e97c96947212b6e1b3a2fd2d45 Mon Sep 17 00:00:00 2001 From: pratapbhanu Date: Wed, 5 Jul 2017 18:27:08 +0200 Subject: [PATCH] fix for python 2.7 --- seq2seq/data/embeddings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seq2seq/data/embeddings.py b/seq2seq/data/embeddings.py index 53078e9c..35869152 100644 --- a/seq2seq/data/embeddings.py +++ b/seq2seq/data/embeddings.py @@ -25,7 +25,7 @@ def read_embeddings(embeddings_path, vocab_path): """ vocab_, _, _ = vocab.read_vocab(vocab_path) word2vec = {} - with open(embeddings_path, 'rt', encoding='utf-8') as vec_file: + with open(embeddings_path, 'r') as vec_file: for line in vec_file: parts = line.split(' ') word = parts[0]