mpenagar commited on
Commit
1d2bd05
1 Parent(s): a72a00f

remove simplified_text column

Browse files
Files changed (1) hide show
  1. albayzin.py +1 -11
albayzin.py CHANGED
@@ -75,7 +75,6 @@ class Albayzin(datasets.GeneratorBasedBuilder):
75
  "file": datasets.Value("string"),
76
  "audio": datasets.Audio(sampling_rate=16_000),
77
  "text": datasets.Value("string"),
78
- "simplified_text": datasets.Value("string"),
79
  "id": datasets.Value("string"),
80
  }
81
  ),
@@ -127,16 +126,8 @@ class Albayzin(datasets.GeneratorBasedBuilder):
127
  text[int(words[0])] = ' '.join(words[2:])
128
  return text
129
 
130
- def _simplyfy_transcription(self,txt):
131
- trantab = str.maketrans('áéíóúÁÉÍÓÚüÜv', 'aeiouaeiouuub')
132
- txt = txt.lower()
133
- txt = txt.translate(trantab)
134
- txt = txt.replace(',','').replace('.','')
135
- txt = txt.replace('ch','X').replace('h','').replace('X','ch')
136
- return txt
137
 
138
-
139
- def _generate_examples(self, split, data_dir):
140
  """Generate examples from Albayzin archive_path."""
141
  # Iterating the contents of the data to extract the relevant information
142
  split2dir = {'train':'SUB_APRE' , 'test':'SUB_PRUE'}
@@ -150,7 +141,6 @@ class Albayzin(datasets.GeneratorBasedBuilder):
150
  "file": str(wav_path),
151
  "audio": str(wav_path),
152
  "text": transcript,
153
- "simplified_text": self._simplyfy_transcription(transcript),
154
  "id": id_,
155
  }
156
 
 
75
  "file": datasets.Value("string"),
76
  "audio": datasets.Audio(sampling_rate=16_000),
77
  "text": datasets.Value("string"),
 
78
  "id": datasets.Value("string"),
79
  }
80
  ),
 
126
  text[int(words[0])] = ' '.join(words[2:])
127
  return text
128
 
 
 
 
 
 
 
 
129
 
130
+ def _generate_examples(self, split, data_dir):
 
131
  """Generate examples from Albayzin archive_path."""
132
  # Iterating the contents of the data to extract the relevant information
133
  split2dir = {'train':'SUB_APRE' , 'test':'SUB_PRUE'}
 
141
  "file": str(wav_path),
142
  "audio": str(wav_path),
143
  "text": transcript,
 
144
  "id": id_,
145
  }
146