import codecs


def read_mutual_info(fname):
  """Reads mutual_info from a file into a dictionary

  Args:
    fname: the file name
  Returns:
    A dictionary with the mutual information
  """
  mutual_info = {}
  with codecs.open(fname, 'r', "utf-8") as f:
    for line in f:
      line = line.strip()
      fields = line.split('\t')
      if len(fields) > 1:
        term = fields[0]
        mi =fields[1]
        mutual_info[term] = mi
  return mutual_info