def convert_to_ascii(chatbot, statement):
 import unicodedata
 import sys
 if (sys.version_info[0] < 3):
  statement.text = unicode(statement.text)
 text = unicodedata.normalize('NFKD', statement.text)
 text = text.encode('ascii', 'ignore').decode('utf-8')
 statement.text = str(text)
 return statement

def convert_to_ascii ( chatbot , statement ) : import unicodedata import sys if ( sys . version_info [ 0 ] < 3 ) : statement . text = unicode ( statement . text ) text = unicodedata . normalize ( 'NFKD' , statement . text ) text = text . encode ( 'ascii' , 'ignore' ) . decode ( 'utf-8' ) statement . text = str ( text ) return statement
converts unicode characters to ascii character equivalents .