Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bot/gen_brains.py
blob: 9d6f17e03375827bfed7dd0d21389c8181904ef3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python
#coding=utf-8

import aiml

k = aiml.Kernel()
import glob
laiml = glob.glob("sara/*.aiml") #devuelve lista con ficheros *.aiml
for fichero in laiml:
    k.learn(str(fichero))
k.saveBrain("sara.brn")

laiml = glob.glob("alice/*.aiml") #devuelve lista con ficheros *.aiml
for fichero in laiml:
    k.learn(str(fichero))
k.saveBrain("alice.brn")