code: def normalize(self, remove_punc=True):
      text = self.raw_text
  
      # 规范化日期
      pattern = re.compile(
          r"\D+((([089]\d|(19|20)\d{2})年)?(\d{1,2}月(\d{1,2}[日号])?)?)"
      )
      matchers = pattern.findall(text)
      if matchers:
          # print('date')
          for matcher in matchers:
              text = text.replace(
                  matcher[0], Date(date=matcher[0]).date2chntext(), 1
              )
  
      # 规范化金钱
      pattern = re.compile(
          r"\D+((\d+(\.\d+)?)[多余几]?"
          + CURRENCY_UNITS
          + r"(\d"
          + CURRENCY_UNITS
          + r"?)?)"
      )
      matchers = pattern.findall(text)
      if matchers:
          # print('money')
          for matcher in matchers:
              text = text.replace(
                  matcher[0], Money(money=matcher[0]).money2chntext(), 1
              )
  
      # 规范化固话/手机号码
      # 手机
      # http://www.jihaoba.com/news/show/13680
      # 移动：139、138、137、136、135、134、159、158、157、150、151、152、188、187、182、183、184、178、198
      # 联通：130、131、132、156、155、186、185、176
      # 电信：133、153、189、180、181、177
      pattern = re.compile(
          r"\D((\+?86 ?)?1([38]\d|5[0-35-9]|7[678]|9[89])\d{8})\D"
      )
      matchers = pattern.findall(text)
      if matchers:
          # print('telephone')
          for matcher in matchers:
              text = text.replace(
                  matcher[0],
                  TelePhone(telephone=matcher[0]).telephone2chntext(),
                  1,
              )
      # 固话
      pattern = re.compile(
          r"\D((0(10|2[1-3]|[3-9]\d{2})-?)?[1-9]\d{6,7})\D"
      )
      matchers = pattern.findall(text)
      if matchers:
          # print('fixed telephone')
          for matcher in matchers:
              text = text.replace(
                  matcher[0],
                  TelePhone(telephone=matcher[0]).telephone2chntext(
                      fixed=True
                  ),
                  1,
              )
  
      # 规范化分数
      pattern = re.compile(r"(\d+/\d+)")
      matchers = pattern.findall(text)
      if matchers:
          # print('fraction')
          for matcher in matchers:
              text = text.replace(
                  matcher,
                  Fraction(fraction=matcher).fraction2chntext(),
                  1,
              )
  
      # 规范化百分数
      text = text.replace("％", "%")
      pattern = re.compile(r"(\d+(\.\d+)?%)")
      matchers = pattern.findall(text)
      if matchers:
          # print('percentage')
          for matcher in matchers:
              text = text.replace(
                  matcher[0],
                  Percentage(
                      percentage=matcher[0]
                  ).percentage2chntext(),
                  1,
              )
  
      # 规范化纯数+量词
      pattern = re.compile(r"(\d+(\.\d+)?)[多余几]?" + COM_QUANTIFIERS)
      matchers = pattern.findall(text)
      if matchers:
          # print('cardinal+quantifier')
          for matcher in matchers:
              text = text.replace(
                  matcher[0],
                  Cardinal(cardinal=matcher[0]).cardinal2chntext(),
                  1,
              )
  
      # 规范化数字编号
      pattern = re.compile(r"(\d{4,32})")
      matchers = pattern.findall(text)
      if matchers:
          # print('digit')
          for matcher in matchers:
              text = text.replace(
                  matcher, Digit(digit=matcher).digit2chntext(), 1
              )
  
      # 规范化纯数
      pattern = re.compile(r"(\d+(\.\d+)?)")
      matchers = pattern.findall(text)
      if matchers:
          # print('cardinal')
          for matcher in matchers:
              text = text.replace(
                  matcher[0],
                  Cardinal(cardinal=matcher[0]).cardinal2chntext(),
                  1,
              )
  
      self.norm_text = text
      self._particular()
  
      text = self.norm_text.lstrip("^").rstrip("$")
      if remove_punc:
          # Punctuations removal
          old_chars = (
              CHINESE_PUNC_LIST + string.punctuation
          )  # includes all CN and EN punctuations
          new_chars = " " * len(old_chars)
          del_chars = ""
          text = text.translate(
              str.maketrans(old_chars, new_chars, del_chars)
          )
      return text
  
imports: import argparse
  import codecs
  import os
  import re
  import string
  import sys
label_desc: Use image node_id 3 for calling the NSWNormalizer obj's underlying member method code with example usage: obj.normalize(remove_punc) and returns: text