old_contents: ###
  ### Very simple word for word translator
  ### * take a sentence in Chinese
  ### * tokenize it
  ### * translate the words
  ###
  from collections import defaultdict as dd
  
  test = '我吃了饭.'
  zh2en = dd(lambda: '?')
  zh2en['我'] = 'I'
  zh2en['吃'] = 'eat' 
  zh2en['饭'] = 'rice'
  zh2en['.'] = '.'
  
  def tokenize(sent):
      'stupid tokenizer'
      return list(test)
  
  def translate(sent, dct):
      translated = []
      for w in tokenize(sent):
          translated.append(dct[w])
      return translated
  
  print(translate(test,zh2en))
  
  
new_contents: ###
  ### Very simple word for word translator
  ### * take a sentence in Chinese
  ### * tokenize it
  ### * translate the words
  ###
  from collections import defaultdict as dd
  from chien.chien import cnendict
  
  
  
  zh2en = dd(lambda: '???')
  zh2en['我'] = 'I'
  zh2en['吃'] = 'eat'  
  zh2en['饭'] = 'rice'
  zh2en['.'] = '.'
  zh2en.update(cnendict)
  
  def tokenize(sent):
      'stupid tokenizer'
      return list(test)
  
  def translate(sent, dct):
      translated = []
      for w in tokenize(sent):
          translated.append(dct[w])
      return translated
  
  test = '我吃猫猫猫猫猫了.'
  print(test)
  print(' '.join(translate(test,zh2en)))
  
  
subject: read in the dictionary from chien