import codecs


def calculateMean(srcfile, trgfile):
  """ Caluclate mean length: mean = len(trgfile) / len(srcfile). """
  srcfile = codecs.open(srcfile,'r','utf8').read().replace(" ","")
  trgfile = codecs.open(trgfile,'r','utf8').read().replace(" ","")
  return len(trgfile)/float(len(srcfile))