Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ntoll committed May 6, 2010
1 parent 0df01ca commit 4800e9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions adventure/week6/adventure.py
Expand Up @@ -177,6 +177,8 @@ def _load_guesser(self):
if Bayes is None:
return None
guesser = Bayes()
print guesser
print dir(guesser)
guesser.load('commands.bays')
return guesser

Expand Down Expand Up @@ -271,6 +273,7 @@ def default(self, line):
for name in all_item_names:
if re.search(r'\b%s\b' % re.escape(name), line, re.I):
guesses = self.guesser.guess(line.replace(name,''))
print guesses
if guesses:
method_name = guesses[0][0]
getattr(self, method_name)(all_item_names[name])
Expand Down

0 comments on commit 4800e9a

Please sign in to comment.