Views
No views yet
1from pythainlp import Tokenizer
2
3def get_tokenizer(vocab):
4
5 custom_vocab = set(vocab)
6 custom_tokenizer = Tokenizer(custom_vocab, engine='newmm')
7 return custom_tokenizer
8
9with open(<vocab_path>,'r',encoding='utf-8') as f:
10 vocab = []
11 for line in f.readlines():
12 vocab.append(line.strip())
13
14custom_tokenizer = get_tokenizer(vocab)
15
16tokenized_sentence_list = custom_tokenizer.word_tokenize(<your_sentence>)| Micro CER | Macro CER | Survival CER | E-commerce WER | Micro WER | Macro WER | Survival WER | E-commerce WER |
|---|---|---|---|---|---|---|---|
| 5.35 | 5.65 | 6.29 | 5.02 | 7.53 | 8.73 | 11.38 | 6.09 |
@inproceedings{suwanbandit23_interspeech,
author={Artit Suwanbandit and Burin Naowarat and Orathai Sangpetch and Ekapol Chuangsuwanich},
title={{Thai Dialect Corpus and Transfer-based Curriculum Learning Investigation for Dialect Automatic Speech Recognition}},
year=2023,
booktitle={Proc. INTERSPEECH 2023},
pages={4069--4073},
doi={10.21437/Interspeech.2023-1828}
}