ac27b5c67be3f37c81720deca45f8ed242079810,gensim/corpora/csvcorpus.py,CsvCorpus,__init__,#CsvCorpus#Any#Any#,29

Before Change


        
        Initialize the corpus from a file. labels (bool) - whether labels are present in the input file.
        
        IndexedCorpus.__init__(self, fname)
        logger.info("loading corpus from %s" % fname)

        self.fname = fname // input file, see class doc for format
        self.length = None

After Change


        self.labels = labels

        // load the first few lines, to guess the CSV dialect
        head = "".join(itertools.islice(open(self.fname), 5))
        self.headers = csv.Sniffer().has_header(head)
        self.dialect = csv.Sniffer().sniff(head)
        logger.info("sniffed CSV delimiter=%r, headers=%s" % (self.dialect.delimiter, self.headers))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: RaRe-Technologies/gensim
Commit Name: ac27b5c67be3f37c81720deca45f8ed242079810
Time: 2013-10-25
Author: radimrehurek@seznam.cz
File Name: gensim/corpora/csvcorpus.py
Class Name: CsvCorpus
Method Name: __init__


Project Name: merenlab/anvio
Commit Name: e44d8f023adb0c45ce4d88be5c671f3f3d99ea12
Time: 2020-04-28
Author: kiefl.evan@gmail.com
File Name: anvio/tables/miscdata.py
Class Name: MiscDataTableFactory
Method Name: __init__


Project Name: pyinstaller/pyinstaller
Commit Name: 279d7bf2f69801e07880b86023716ff57482ee02
Time: 2015-07-28
Author: h.goebel@crazy-compilers.com
File Name: tests/old_suite/basic/hooks1/hook-pkg1.py
Class Name:
Method Name: hook