code: def get_ptn(unit):
      
      ptn = 0
      match_re = re.findall(chinese, unit)
      if match_re:
          string = ''.join(match_re)
          ptn = len(string)
      return int(ptn)
docs: 获取文本行的中文字符的个数
  
      Keyword arguments:
      unit                    -- 文本行
      Return:
          ptn                 -- 纯文本数