import pickle import argparse from Orange.data import Table import abml.rules_prolog as rp parser = argparse.ArgumentParser(description='Learn and test rules for prolog programs.') parser.add_argument('Name', type=str, help='Predicate name.') args = parser.parse_args() name = args.Name data = Table('data/{}/programs-train'.format(name)) rule_learner = rp.create_learner(name, evds=False) rule_learner.calculate_evds(data) pickle.dump(rule_learner.evds, open("data/{}/evds.pickle".format(name), "wb"))