9fd70d1acbe56f009fd8bcbac94f97e615983300,torchtext/data/example.py,Example,fromCSV,#Any#Any#Any#,38

Before Change



    @classmethod
    def fromCSV(cls, data, fields):
        data = data.rstrip("\n")
        // If Python 2, encode to utf-8 since CSV doesn"t take unicode input
        if six.PY2:
            data = data.encode("utf-8")
        // Use Python CSV module to parse the CSV line
        parsed_csv_lines = csv.reader([data])

        // If Python 2, decode back to unicode (the original input format).

After Change



    @classmethod
    def fromCSV(cls, data, fields):
        if data[-1] == "\n":
            data = data[:-1]
        return cls.fromlist(list(csv.reader([data]))[0], fields)

    @classmethod
    def fromlist(cls, data, fields):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: pytorch/text
Commit Name: 9fd70d1acbe56f009fd8bcbac94f97e615983300
Time: 2017-09-07
Author: jekbradbury@gmail.com
File Name: torchtext/data/example.py
Class Name: Example
Method Name: fromCSV


Project Name: pytorch/text
Commit Name: 9fd70d1acbe56f009fd8bcbac94f97e615983300
Time: 2017-09-07
Author: jekbradbury@gmail.com
File Name: torchtext/data/example.py
Class Name: Example
Method Name: fromTSV


Project Name: ufal/npfl114
Commit Name: c343409098b4f4b8396119d9f26e040e479a0e2b
Time: 2020-04-20
Author: milan@strakovi.com
File Name: labs/08/speech_recognition_eval.py
Class Name:
Method Name: