Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples/brain.py
diff options
context:
space:
mode:
Diffstat (limited to 'pysamples/brain.py')
-rw-r--r--pysamples/brain.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/pysamples/brain.py b/pysamples/brain.py
index 456df37..33ee320 100644
--- a/pysamples/brain.py
+++ b/pysamples/brain.py
@@ -45,21 +45,18 @@ def myblock(tw, text):
import sys
sys.path.append(speakpath)
- import gobject
import aiml
import voice
-
BOTS = {
- _('Spanish'): { 'name': 'Sara',
- 'brain': os.path.join(speakpath, 'bot', 'sara.brn'),
- 'predicates': { 'nombre_bot': 'Sara',
- 'botmaster': 'La comunidad Azucar' } },
- _('English'): { 'name': 'Alice',
- 'brain': os.path.join(speakpath, 'bot', 'alice.brn'),
- 'predicates': { 'name': 'Alice',
- 'master': 'The Sugar Community' } } }
-
+ _('Spanish'): {'name': 'Sara',
+ 'brain': os.path.join(speakpath, 'bot', 'sara.brn'),
+ 'predicates': {'nombre_bot': 'Sara',
+ 'botmaster': 'La comunidad Azucar'}},
+ _('English'): {'name': 'Alice',
+ 'brain': os.path.join(speakpath, 'bot', 'alice.brn'),
+ 'predicates': {'name': 'Alice',
+ 'master': 'The Sugar Community'}}}
def get_mem_info(tag):
meminfo = file('/proc/meminfo').readlines()
@@ -107,7 +104,6 @@ Close other activities and try once more.'))
return kernel
- kernel = None
if not hasattr(tw, 'aiml_kernel'):
tw.aiml_kernel = brain_load(tw, get_default_voice())
response_text = brain_respond(tw.aiml_kernel, text)