ae1a7796a3df1add1ee420467afea82bde8bd44c,models/lemma/loader.py,DataLoader,load_file,#DataLoader#Any#Any#,99

Before Change


        with open(filename) as infile:
            while True:
                line = infile.readline()
                if len(line) == 0:
                    break
                line = line.strip()
                if len(line) == 0:
                    if len(cache) > 0:
                        sents.append(cache)
                        cache = []
                else:
                    array = line.split("\t")
                    assert (evaluation and len(array) == 1) or (not evaluation and len(array) == 2)
                    cache += [array]
            if len(cache) > 0:
                sents.append(cache)
        return sents

After Change


        conll_file = conll.CoNLLFile(filename)
        if evaluation:
            data = conll_file.get_words()
            data = [[d] for d in data]
        else:
            data = conll_file.get_words_and_lemmas()
        return conll_file, data
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: stanfordnlp/stanza
Commit Name: ae1a7796a3df1add1ee420467afea82bde8bd44c
Time: 2018-06-07
Author: zyh@stanford.edu
File Name: models/lemma/loader.py
Class Name: DataLoader
Method Name: load_file


Project Name: home-assistant/home-assistant
Commit Name: 7a979e9f720fb03af107bb89ad94247d76e150df
Time: 2018-03-02
Author: jeroen_ter_heerdt@hotmail.com
File Name: homeassistant/components/alarm_control_panel/egardia.py
Class Name: EgardiaAlarm
Method Name: lookupstatusfromcode


Project Name: home-assistant/home-assistant
Commit Name: 6b96bc3859edc8e9588b7392b52515bcb8047635
Time: 2017-10-31
Author: storm+github@chemicalstorm.org
File Name: homeassistant/components/device_tracker/ubus.py
Class Name: UbusDeviceScanner
Method Name: get_device_name