class_docstr: Data preparation script for the Swiss French Polyphone corpus.
  
  This class provides the scripting backbone for preparing the
  Swiss French Polyphone corpus for ASR training with espnet.  This
  script was written in reference to the following version of the
  corpus as listed on ELRA:
  
  This class/script, together with the corresponding configuration
  file `conf/dataprep.yaml` perform all required data prep.
  
  .. _ELRA-S0030_02:
      http://catalog.elra.info/en-us/repository/browse/ELRA-S0030_02
class_docstr_tok: ["Data","preparation","script","for","the","Swiss","French","Polyphone","corpus",".","This","class","provides","the","scripting","backbone","for","preparing","the","Swiss","French","Polyphone","corpus","for","ASR","training","with","espnet",".","This","script","was","written","in","reference","to","the","following","version","of","the","corpus","as","listed","on","ELRA",":","This","class\/script",",","together","with","the","corresponding","configuration","file","`","conf\/dataprep.yaml","`","perform","all","required","data","prep",".","..","_ELRA-S0030_02",":","http",":","\/\/catalog.elra.info\/en-us\/repository\/browse\/ELRA-S0030_02"]
docstr: Preprocess and cleanup the text as needed.
  
  Preprocess and cleanup the text as needed.  These regexes perform
  some standard cleanup of the otherwise noisy transcriptions, and
  are also used to remove all `event` markers, which are not used by
  espnet during training.  After running all cleanup, any utterances
  which result in empty transcriptions are subsequently discarded
  and not used for training, development or testing.
  
  Args:
      text (str): Input transcription candidate for normalization.
  
  Returns:
      str: The normalized, possibly empty transcription candidate.
docstr_tok: ["Preprocess","and","cleanup","the","text","as","needed",".","Preprocess","and","cleanup","the","text","as","needed",".","These","regexes","perform","some","standard","cleanup","of","the","otherwise","noisy","transcriptions",",","and","are","also","used","to","remove","all","`","event","`","markers",",","which","are","not","used","by","espnet","during","training",".","After","running","all","cleanup",",","any","utterances","which","result","in","empty","transcriptions","are","subsequently","discarded","and","not","used","for","training",",","development","or","testing",".","Args",":","text","(","str",")",":","Input","transcription","candidate","for","normalization",".","Returns",":","str",":","The","normalized",",","possibly","empty","transcription","candidate","."]
code: def _cleantext(self, text):
      """Preprocess and cleanup the text as needed.
  
      Preprocess and cleanup the text as needed.  These regexes perform
      some standard cleanup of the otherwise noisy transcriptions, and
      are also used to remove all `event` markers, which are not used by
      espnet during training.  After running all cleanup, any utterances
      which result in empty transcriptions are subsequently discarded
      and not used for training, development or testing.
  
      Args:
          text (str): Input transcription candidate for normalization.
  
      Returns:
          str: The normalized, possibly empty transcription candidate.
  
      """
      # Skip digits
      if re.match(r"^.*[0-9].*$", text):
          return ""
  
      text = text.lower()
      text = re.sub(r"\[\\?hésitation", " ", text)
      text = re.sub(r"\[\\?prononciation bizarre", " ", text)
      text = re.sub(r"\[\\?inintelligible", " ", text)
      text = re.sub(r"\[[^\]]+\]", " ", text)
      text = re.sub(r"[\[\]]+", " ", text)
      text = re.sub(r"[\-]+", " ", text)
      text = re.sub(r"’+", "'", text)
      text = re.sub(r"`+", "'", text)
      text = re.sub(r"ҫœ", "oe", text)
      text = re.sub(r"ò", "o", text)
      text = re.sub(r"ҫ", "ç", text)
      text = re.sub(r"[º\"\>«ʿҫœ.\—&š,(đáñ?\_;čó£§žø!ż]+", " ", text)
      text = re.sub(r"[ˢ…^ńı\|ā/“:½\–=*»ßł”°ÿ\}\)í\{ú\$]+", " ", text)
      text = re.sub(r"\s+", " ", text)
      text = text.strip()
      for c in list(text):
          self.all_chars[c] += 1
  
      return text
  
imports: import os
  import pathlib
  import re
  import subprocess
  import sys
  from collections import defaultdict
  from random import shuffle
label_desc: Use image node_id 3 for calling the FrPolyphonePrepper obj's underlying member method code with example usage: obj._cleantext(text) and returns: text, str