Example #1
0
    def setUp(self):
        self.space = AtomSpace()
        self.fishgram = fishgram.Fishgram(self.space)
        add_fishgram_data(self.space)

        tempfd, self.tempfn = tempfile.mkstemp()
        # close the temp file as Logger will want to manually
        # open it
        os.close(tempfd)
        self.log = opencog.util.create_logger(self.tempfn)
Example #2
0
def run_fishgram(a):
    reload(fishgram)
    time_interval.start()
    fish = fishgram.Fishgram(a)
    log.debug(" filtering data set...")
    fishgram.notice_changes(a)
    fish.forest.extractForest()
    time_interval.end()
    log.debug("**take %s seconds on filtering**" % time_interval.interval())
    log.debug("mining patterns...")
    time_interval.start()
    fish.run()
    time_interval.end()
    log.debug("**take %s seconds on mining**" % time_interval.interval())
    log.flush()
Example #3
0
def test_fishgram():
    import sokoban
    import fishgram

    sokoban.main()
    atomspace = sokoban.ATOMSPACE

    #    for atom in atomspace:
    #        print atom

    import pdb; pdb.set_trace()

    fish = fishgram.Fishgram(atomspace)

    # Detect timestamps where a DemandGoal got satisfied or frustrated
    #fishgram.notice_changes(atomspace)

    fish.forest.extractForest()

    fish.run()