def load_axioms(fname): for d in datadirs: kf = d + fname + '.scm' try: tmp = open(kf, 'r') scheme_wrapper.load_scm(a, kf) print kf return except IOError: continue raise IOError("missing data file: " + kf)
def load_axioms(fname): for d in datadirs: kf = d+fname+'.scm' try: tmp = open(kf,'r') scheme_wrapper.load_scm(a, kf) print kf return except IOError: continue raise IOError("missing data file: "+kf)
def run_pln_example(self, filename): self.atomspace.clear() tmp = open(filename,'r') if not scheme_wrapper.load_scm(self.atomspace, filename): print 'unable to load file',filename return print filename chainer = Chainer(self.atomspace, stimulateAtoms = False, agent = self, learnRuleFrequencies=False) try: query = chainer.get_predicate_arguments('query')[0] rules_nodes = chainer.get_predicate_arguments('rules') except ValueError, e: print e return
def run_pln_example(self, filename): self.atomspace.clear() tmp = open(filename, 'r') if not scheme_wrapper.load_scm(self.atomspace, filename): print 'unable to load file', filename return print filename chainer = Chainer(self.atomspace, stimulateAtoms=False, agent=self, learnRuleFrequencies=False) try: query = chainer.get_predicate_arguments('query')[0] rules_nodes = chainer.get_predicate_arguments('rules') except ValueError, e: print e return