e56f3d0377f886d40f8c37c1450c59da5f76f72e,deeppavlov/dataset_readers/intent_dataset_reader.py,IntentDatasetReader,read,#Any#,30

Before Change


        Read a file from a path and returns data as dict with given datasets.
        
        data_dict = dict()
        train_data_path = os.path.join(data_path, "dstc2-trn.jsonlist")
        valid_data_path = os.path.join(data_path, "dstc2-val.jsonlist")
        test_data_path = os.path.join(data_path, "dstc2-tst.jsonlist")


        if train_data_path is not None:
            print("___Reading train data from %s" % train_data_path)
            if os.path.isfile(train_data_path):
                data_dict["train"] = IntentDatasetReader.read_from_json(train_data_path)
            else:
                raise IOError("Error: Train file does not exist")

After Change


        
        data_dict = dict()
        train_data_path = Path(data_path).joinpath("dstc2-trn.jsonlist")
        valid_data_path = Path(data_path).joinpath("dstc2-val.jsonlist")
        test_data_path = Path(data_path).joinpath("dstc2-tst.jsonlist")


        if Path(train_data_path).is_file():
            print("___Reading train data from %s" % train_data_path)
            data_dict["train"] = IntentDatasetReader.read_from_json(train_data_path)
        else:
            raise IOError("Error: Train file does not exist")


        if Path(valid_data_path).is_file():
            print("___Reading valid data from %s" % train_data_path)
            data_dict["valid"] = IntentDatasetReader.read_from_json(valid_data_path)
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: e56f3d0377f886d40f8c37c1450c59da5f76f72e
Time: 2017-12-25
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/dataset_readers/intent_dataset_reader.py
Class Name: IntentDatasetReader
Method Name: read


Project Name: deepmipt/DeepPavlov
Commit Name: e56f3d0377f886d40f8c37c1450c59da5f76f72e
Time: 2017-12-25
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/dataset_readers/intent_dataset_reader.py
Class Name: IntentDatasetReader
Method Name: read


Project Name: hyperspy/hyperspy
Commit Name: 629167ee324a0b955ef46cd5a0cd7bb504ef8c44
Time: 2020-09-09
Author: tjof2@cam.ac.uk
File Name: hyperspy/misc/io/tools.py
Class Name:
Method Name: incremental_filename


Project Name: deepmipt/DeepPavlov
Commit Name: dfa0c1f47a6920ebe0efde372f5aee07284f2f68
Time: 2017-12-29
Author: yoptar@gmail.com
File Name: deeppavlov/core/data/utils.py
Class Name:
Method Name: is_done