38387fc573058f6c3059a7363df25c301cb08a3a,tensorlayer/nlp.py,,read_words,#Any#Any#,397

Before Change


    - `tensorflow.models.rnn.ptb.reader <https://github.com/tensorflow/tensorflow/tree/master/tensorflow/models/rnn/ptb>`_
    
    with tf.gfile.GFile(filename, "r") as f:
        return f.read().replace(*replace).split()

def read_analogies_file(eval_file="questions-words.txt", word2id={}):
    Reads through an analogy question file, return its id format.

After Change


    - `tensorflow.models.rnn.ptb.reader <https://github.com/tensorflow/tensorflow/tree/master/tensorflow/models/rnn/ptb>`_
    
    with tf.gfile.GFile(filename, "r") as f:
        try:
            context_list = f.read().replace(*replace).split()
        except:
            replace = [x.encode("utf-8") for x in replace]
            context_list = f.read().replace(*replace).split()
        return context_list

def read_analogies_file(eval_file="questions-words.txt", word2id={}):
    Reads through an analogy question file, return its id format.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: 38387fc573058f6c3059a7363df25c301cb08a3a
Time: 2016-12-28
Author: a824834@163.com
File Name: tensorlayer/nlp.py
Class Name:
Method Name: read_words


Project Name: zsdonghao/text-to-image
Commit Name: 74796ff02e9425ca336f595978fe6e7c422c0378
Time: 2017-04-11
Author: dhsig552@163.com
File Name: tensorlayer/nlp.py
Class Name:
Method Name: read_words


Project Name: PyMVPA/PyMVPA
Commit Name: 6bb5e43f6e83b59a6c429878718a29c45a663eaa
Time: 2013-12-03
Author: michael.hanke@gmail.com
File Name: mvpa2/mappers/filters.py
Class Name: IIRFilterMapper
Method Name: _forward_data