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: Collate all corpus data.
  
  Collate all specified corpus data.  This is a hack to call the
  Kaldi collation scripts, which are required by the the other
  prep tools.  It should be simple to remove them once they are
  no longer required.
  
  Args:
      datadir(str): The target data directory.
      corpus(str): The target corpus(train/dev/test typically).
docstr_tok: ["Collate","all","corpus","data",".","Collate","all","specified","corpus","data",".","This","is","a","hack","to","call","the","Kaldi","collation","scripts",",","which","are","required","by","the","the","other","prep","tools",".","It","should","be","simple","to","remove","them","once","they","are","no","longer","required",".","Args",":","datadir","(","str",")",":","The","target","data","directory",".","corpus","(","str",")",":","The","target","corpus","(","train\/dev\/test","typically",")","."]
code: def _collatecorpusdata(self, datadir, corpus):
      """Collate all corpus data.
  
      Collate all specified corpus data.  This is a hack to call the
      Kaldi collation scripts, which are required by the the other
      prep tools.  It should be simple to remove them once they are
      no longer required.
  
      Args:
          datadir(str): The target data directory.
          corpus(str): The target corpus(train/dev/test typically).
  
      """
      command = "utils/fix_data_dir.sh {0}"
      command = command.format(os.path.join(datadir, corpus))
      print(command)
      subprocess.call(
          [
              "export LC_COLLATE='C';export LC_ALL='C'; {0}".format(
                  command
              )
          ],
          shell=True,
      )
  
      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 11 for calling the FrPolyphonePrepper obj's underlying member method code with example usage: obj._collatecorpusdata(datadir, corpus) without return types