Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -47,9 +47,10 @@ def fix_italian_transcription(transcription):
|
|
47 |
transcription = re.sub(r"\b(s|t|m|c|n)\s+(?=è\b|ha\b|hanno\b)", r"\1'", transcription)
|
48 |
transcription = re.sub(r"\bpo\b", "po'", transcription)
|
49 |
transcription = re.sub(r"\b(senz) ([aeiou])", r"\1'\2", transcription)
|
|
|
50 |
|
51 |
-
pattern_numbers = r"\b(trent|quarant|cinquant|sessant|settant|ottant|novant)\s+([
|
52 |
-
replacement_numbers = lambda m: m.group(1)[:-1] + "
|
53 |
transcription = re.sub(pattern_numbers, replacement_numbers, transcription)
|
54 |
|
55 |
for phrase in no_elision_cases:
|
|
|
47 |
transcription = re.sub(r"\b(s|t|m|c|n)\s+(?=è\b|ha\b|hanno\b)", r"\1'", transcription)
|
48 |
transcription = re.sub(r"\bpo\b", "po'", transcription)
|
49 |
transcription = re.sub(r"\b(senz) ([aeiou])", r"\1'\2", transcription)
|
50 |
+
transcription = transcription.replace("anch io", "anch'io")
|
51 |
|
52 |
+
pattern_numbers = r"\b(trent|quarant|cinquant|sessant|settant|ottant|novant)\s+([aeiouàèìòù])"
|
53 |
+
replacement_numbers = lambda m: m.group(1)[:-1] + "'" + m.group(2)
|
54 |
transcription = re.sub(pattern_numbers, replacement_numbers, transcription)
|
55 |
|
56 |
for phrase in no_elision_cases:
|