+ self.text = self.clean_text(text)
+
+ msg = [("",False, None),(self.text, True, 0.8)]
+ self.mk.set_messages(msg)
+
+ def clean_text(self, text):
+ # nothing like a bit of good clean text :)
+ valid = string.digits \
+ + string.letters \
+ + string.punctuation \
+ + " "
+ # uppercase it
+ text = string.upper(text)
+ clean = ""
+ for char in text:
+ if char in valid:
+ clean = clean + char
+ else:
+ clean = clean + " "
+ return clean