sin2piusc commited on
Commit
9bb7716
β€’
1 Parent(s): 0651bcd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -6
README.md CHANGED
@@ -36,14 +36,16 @@ import neologdn
36
  import MeCab
37
  import re
38
  from transformers.models.whisper.english_normalizer import BasicTextNormalizer
 
39
  wakati = MeCab.Tagger("-Owakati")
40
  special_characters = '[\,\、\。\.\γ€Œ\」\…\?\・\!\-\;\:\"\β€œ\%\β€˜\”\οΏ½]'
41
 
42
- def norm_everything(batch):
43
- batch["sentence"] = neologdn.normalize(batch["sentence"]).strip()
44
- batch["sentence"] = normalizer(batch["sentence"]).strip()
45
- batch["sentence"] = wakati.parse(batch["sentence"]).strip()
46
- batch["sentence"] = re.sub(special_characters,'', batch["sentence"]).strip()
47
- return batch
 
48
 
49
  ds = ds.map(norm_everything)
 
36
  import MeCab
37
  import re
38
  from transformers.models.whisper.english_normalizer import BasicTextNormalizer
39
+
40
  wakati = MeCab.Tagger("-Owakati")
41
  special_characters = '[\,\、\。\.\γ€Œ\」\…\?\・\!\-\;\:\"\β€œ\%\β€˜\”\οΏ½]'
42
 
43
+
44
+ def norm_everything(batch):
45
+ batch["sentence"] = neologdn.normalize(batch["sentence"]).strip()
46
+ batch["sentence"] = normalizer(batch["sentence"]).strip()
47
+ batch["sentence"] = wakati.parse(batch["sentence"]).strip()
48
+ batch["sentence"] = re.sub(special_characters,'', batch["sentence"]).strip()
49
+ return batch
50
 
51
  ds = ds.map(norm_everything)