3a99b86173201bb9081e1695c28d1e781c4c15b4,onmt/inputters/text_dataset.py,TextDataReader,read,#TextDataReader#,12

Before Change


        if isinstance(sequences, str):
            sequences = DataReaderBase._read_file(sequences)
        for i, seq in enumerate(sequences):
            yield {side: seq.decode("utf-8"), "indices": i}


class TextDataset(DatasetBase):

After Change


        if isinstance(sequences, str):
            sequences = DataReaderBase._read_file(sequences)
        for i, seq in enumerate(sequences):
            if isinstance(seq, six.binary_type):
                seq = seq.decode("utf-8")
            yield {side: seq, "indices": i}


class TextDataset(DatasetBase):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: 3a99b86173201bb9081e1695c28d1e781c4c15b4
Time: 2019-02-04
Author: guillaumekln@users.noreply.github.com
File Name: onmt/inputters/text_dataset.py
Class Name: TextDataReader
Method Name: read


Project Name: ray-project/ray
Commit Name: e372c0625752e32c80168c03e381271aab412d0f
Time: 2020-06-04
Author: rkooo567@gmail.com
File Name: python/ray/dashboard/node_stats.py
Class Name: NodeStats
Method Name: run


Project Name: keras-team/autokeras
Commit Name: e70a1e3fddeb24c02ea56f74ff4ce33c8642ac0c
Time: 2018-11-15
Author: jhfjhfj1@gmail.com
File Name: autokeras/utils.py
Class Name:
Method Name: get_device