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: Remove spaces, dashes, and commas from folder names.
  
  The default directory naming conventions for the corpus are not
  particularly friendly to automatic processing.  This function
  simply translates spaces/commas/dashes to a consistent underscore
  pattern for simplicity.
  
  Args:
      folderroot (str): The folder root to start processing from.
docstr_tok: ["Remove","spaces",",","dashes",",","and","commas","from","folder","names",".","The","default","directory","naming","conventions","for","the","corpus","are","not","particularly","friendly","to","automatic","processing",".","This","function","simply","translates","spaces\/commas\/dashes","to","a","consistent","underscore","pattern","for","simplicity",".","Args",":","folderroot","(","str",")",":","The","folder","root","to","start","processing","from","."]
code: def fixdirnames(self, folderroot):
      """Remove spaces, dashes, and commas from folder names.
  
      The default directory naming conventions for the corpus are not
      particularly friendly to automatic processing.  This function
      simply translates spaces/commas/dashes to a consistent underscore
      pattern for simplicity.
  
      Args:
          folderroot (str): The folder root to start processing from.
  
      """
      for folder in os.listdir(folderroot):
          if not folder.startswith("Polyphone") or not os.path.isdir(
              os.path.join(folderroot, folder)
          ):
              continue
          nospace = re.sub(r"\s+", "_", folder)
          nospace = re.sub(r"\-", "_", nospace)
          nospace = re.sub(r",", "_", nospace)
          nospace = re.sub(r"_+", "_", nospace)
          folderpath = os.path.join(folderroot, folder)
          nospacepath = os.path.join(folderroot, nospace)
  
          if not folderpath == nospacepath:
              os.rename(folderpath, nospace)
  
      return
  
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 6 for calling the FrPolyphonePrepper obj's underlying member method code with example usage: obj.fixdirnames(folderroot) without return types