58897b84bffe8df29c05229bcafe74618a12db19,torchtext/datasets/trec.py,TREC,__init__,#TREC#Any#Any#Any#Any#,15

Before Change



        for line in open(os.path.expanduser(path), "rb"):
            line = UnicodeDammit(line).unicode_markup.split()
            label, text = line[0], " ".join(line[1:])
            examples.append(data.Example.fromlist([text, label], fields))

        super(TREC, self).__init__(examples, fields, **kwargs)

After Change



        for line in open(os.path.expanduser(path), "rb"):
            // there is one non-ASCII byte: sisterBADBYTEcity; replaced with space
            label, _, text = line.replace(b"\xf0", b" ").decode().partition(" ")
            examples.append(data.Example.fromlist([text, label], fields))

        super(TREC, self).__init__(examples, fields, **kwargs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pytorch/text
Commit Name: 58897b84bffe8df29c05229bcafe74618a12db19
Time: 2017-08-10
Author: Bryan.McCann.is@gmail.com
File Name: torchtext/datasets/trec.py
Class Name: TREC
Method Name: __init__


Project Name: eth-cscs/reframe
Commit Name: e2b12ca3cdb6cc4fa84b1ef6b311dc8385464d3e
Time: 2018-04-22
Author: karakasis@cscs.ch
File Name: unittests/test_pipeline.py
Class Name: TestRegressionTest
Method Name: test_extra_resources


Project Name: eth-cscs/reframe
Commit Name: e2b12ca3cdb6cc4fa84b1ef6b311dc8385464d3e
Time: 2018-04-22
Author: karakasis@cscs.ch
File Name: unittests/test_pipeline.py
Class Name: TestSanityPatterns
Method Name: setUp