#NEWLINE# def learn( self , text ) : #NEWLINE# #INDENT# 'Learn a string of text. If the input is not already\n        Unicode, it will be decoded as utf-8.' #NEWLINE# if ( type ( text ) != types . UnicodeType ) : #NEWLINE# #INDENT# text = text . decode ( 'utf-8' , 'ignore' ) #NEWLINE# #UNINDENT# tokens = self . tokenizer . split ( text ) #NEWLINE# trace ( 'Brain.learn_input_token_count' , len ( tokens ) ) #NEWLINE# self . _learn_tokens ( text )