Jarvis2301 commited on
Commit
aec926d
·
1 Parent(s): 966325e

Update text/cleaners.py

Browse files
Files changed (1) hide show
  1. text/cleaners.py +9 -0
text/cleaners.py CHANGED
@@ -442,6 +442,15 @@ def korean_cleaners(text):
442
  text += '.'
443
  return text
444
 
 
 
 
 
 
 
 
 
 
445
 
446
  def chinese_cleaners(text):
447
  '''Pipeline for Chinese text'''
 
442
  text += '.'
443
  return text
444
 
445
+ def english_cleaners(text):
446
+ '''Pipeline for English text, including number and abbreviation expansion.'''
447
+ text = convert_to_ascii(text)
448
+ text = lowercase(text)
449
+ text = expand_numbers(text)
450
+ text = expand_abbreviations(text)
451
+ text = collapse_whitespace(text)
452
+ return text
453
+
454
 
455
  def chinese_cleaners(text):
456
  '''Pipeline for Chinese text'''