Beispiel #1
0
def get_data_parameters(opt, experiment, dataset):#####opt.exp & opt.data used for data loader path
    data = DD() ##################
    if dataset == "atomic":
        data.categories = sorted(opt.categories)
        #ORIGINAL CODE
        # hard-coded
        data.maxe1 = 17
        data.maxe2 = 35
        data.maxr = 1
        #ADRIAN ADDED      ################THIS IS WHERE YOU CHANGE PARAMETERS FOR NAME OF LOADER YOU'RE USING
        ##############MAXE1 == MAX EVENT
        ############MAXE2 == MAX EFFECT
        data.maxe1 = 50
        data.maxe2 = 35
        data.maxr = 1
        ###
        

    elif dataset == "conceptnet":
        data.rel = opt.relation_format
        data.trainsize = opt.training_set_size
        data.devversion = opt.development_set_versions_to_use
        data.maxe1 = opt.max_event_1_size
        data.maxe2 = opt.max_event_2_size
        if data.rel == "language":
            # hard-coded
            data.maxr = 5
        else:
            # hard-coded
            data.maxr = 1

    return data############
Beispiel #2
0
def get_data_parameters(opt, experiment, dataset):
    data = DD()
    if dataset == "atomic":
        data.categories = sorted(opt.categories)
        # hard-coded
        data.maxe1 = 17
        data.maxe2 = 35
        data.maxr = 1

    elif dataset == "conceptnet":
        data.rel = opt.relation_format
        data.trainsize = opt.training_set_size
        data.devversion = opt.development_set_versions_to_use
        data.maxe1 = opt.max_event_1_size
        data.maxe2 = opt.max_event_2_size
        if data.rel == "language":
            # hard-coded
            data.maxr = 5
        else:
            # hard-coded
            data.maxr = 1
    elif dataset == "motiv_sent":
        data.categories = sorted(opt.categories)
        data.maxe1 = 100
        data.maxe2 = 67
        data.maxr = 1

    return data