code: def language_specific_preprocess(language, words):
      # !! Language specific cleaning !!
      # Important: feel free to specify the text normalization
      # corresponding to your alphabet.
  
      if language in ["en", "fr", "it", "rw"]:
          words = re.sub(
              "[^’'A-Za-z0-9À-ÖØ-öø-ÿЀ-ӿéæœâçèàûî]+", " ", words
          ).upper()
  
      if language == "de":
          # this replacement helps preserve the case of ß
          # (and helps retain solitary occurrences of SS)
          # since python's upper() converts ß to SS.
          words = words.replace("ß", "0000ß0000")
          words = re.sub("[^’'A-Za-z0-9öÖäÄüÜß]+", " ", words).upper()
          words = words.replace("'", " ")
          words = words.replace("’", " ")
          words = words.replace(
              "0000SS0000", "ß"
          )  # replace 0000SS0000 back to ß as its initial presence in the corpus
  
      elif language == "fr":  # SM
          words = re.sub(
              "[^’'A-Za-z0-9À-ÖØ-öø-ÿЀ-ӿéæœâçèàûî]+", " ", words
          )
          words = words.replace("’", "'")
          words = words.replace("é", "é")
          words = words.replace("æ", "ae")
          words = words.replace("œ", "oe")
          words = words.replace("â", "â")
          words = words.replace("ç", "ç")
          words = words.replace("è", "è")
          words = words.replace("à", "à")
          words = words.replace("û", "û")
          words = words.replace("î", "î")
          words = words.upper()
  
          # Case of apostrophe collés
          words = words.replace("L'", "L' ")
          words = words.replace("L'  ", "L' ")
          words = words.replace("S'", "S' ")
          words = words.replace("S'  ", "S' ")
          words = words.replace("D'", "D' ")
          words = words.replace("D'  ", "D' ")
          words = words.replace("J'", "J' ")
          words = words.replace("J'  ", "J' ")
          words = words.replace("N'", "N' ")
          words = words.replace("N'  ", "N' ")
          words = words.replace("C'", "C' ")
          words = words.replace("C'  ", "C' ")
          words = words.replace("QU'", "QU' ")
          words = words.replace("QU'  ", "QU' ")
          words = words.replace("M'", "M' ")
          words = words.replace("M'  ", "M' ")
  
          # Case of apostrophe qui encadre quelques mots
          words = words.replace(" '", " ")
          words = words.replace("A'", "A")
          words = words.replace("B'", "B")
          words = words.replace("E'", "E")
          words = words.replace("F'", "F")
          words = words.replace("G'", "G")
          words = words.replace("K'", "K")
          words = words.replace("Q'", "Q")
          words = words.replace("V'", "V")
          words = words.replace("W'", "W")
          words = words.replace("Z'", "Z")
          words = words.replace("O'", "O")
          words = words.replace("X'", "X")
          words = words.replace("AUJOURD' HUI", "AUJOURD'HUI")
      elif language == "ar":
          HAMZA = "\u0621"
          ALEF_MADDA = "\u0622"
          ALEF_HAMZA_ABOVE = "\u0623"
          letters = (
              "ابتةثجحخدذرزژشسصضطظعغفقكلمنهويىءآأؤإئ"
              + HAMZA
              + ALEF_MADDA
              + ALEF_HAMZA_ABOVE
          )
          words = re.sub("[^" + letters + " ]+", "", words).upper()
      elif language == "fa":
          HAMZA = "\u0621"
          ALEF_MADDA = "\u0622"
          ALEF_HAMZA_ABOVE = "\u0623"
          letters = (
              "ابپتةثجحخچدذرزژسشصضطظعغفقگکلمنهویىءآأؤإئ"
              + HAMZA
              + ALEF_MADDA
              + ALEF_HAMZA_ABOVE
          )
          words = re.sub("[^" + letters + " ]+", "", words).upper()
      elif language == "ga-IE":
          # Irish lower() is complicated, but upper() is nondeterministic, so use lowercase
          def pfxuc(a):
              return (
                  len(a) >= 2 and a[0] in "tn" and a[1] in "AEIOUÁÉÍÓÚ"
              )
  
          def galc(w):
              return (
                  w.lower()
                  if not pfxuc(w)
                  else w[0] + "-" + w[1:].lower()
              )
  
          words = re.sub("[^-A-Za-z'ÁÉÍÓÚáéíóú]+", " ", words)
          words = " ".join(map(galc, words.split(" ")))
      elif language == "es":
          # Fix the following error in dataset large:
          # KeyError: 'The item En noviembre lanzaron Queen Elizabeth , coproducida por Foreign Noi$e . requires replacements which were not supplied.'
          words = words.replace("$", "s")
      return words
  
file_path: speechbrain/recipes/CommonVoice/LM/common_voice_prepare.py
imports: from dataclasses import dataclass
  import os
  import csv
  import re
  import logging
  import torchaudio
  import unicodedata
  import functools
  from speechbrain.utils.parallel import parallel_map
  from speechbrain.dataio.dataio import read_audio_info
label_desc: Use image node_id 5 for calling a global function with example usage: language_specific_preprocess(language, words) and returns: words, unknown, unknown