Skip to content

Commit 20c2603

Browse files
authored
[runtime] fix english tn (#220)
1 parent 3fc7bb6 commit 20c2603

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

runtime/processor/wetext_token_parser.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ TokenParser::TokenParser(ParseType type) {
4545
if (type == ParseType::kZH_TN) {
4646
orders_ = ZH_TN_ORDERS;
4747
} else if (type == ParseType::kZH_ITN) {
48-
orders_ = ZH_TN_ORDERS;
48+
orders_ = ZH_ITN_ORDERS;
4949
} else if (type == ParseType::kEN_TN) {
5050
orders_ = EN_TN_ORDERS;
5151
} else {
52-
orders_ = ZH_ITN_ORDERS;
52+
LOG(FATAL) << "Invalid order";
5353
}
5454
}
5555

runtime/processor/wetext_token_parser.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ extern const char EOS[];
2626
extern const std::set<std::string> UTF8_WHITESPACE;
2727
extern const std::set<std::string> ASCII_LETTERS;
2828
extern const std::unordered_map<std::string, std::vector<std::string>>
29-
TN_ORDERS;
29+
ZH_TN_ORDERS;
3030
extern const std::unordered_map<std::string, std::vector<std::string>>
31-
ITN_ORDERS;
31+
ZH_ITN_ORDERS;
32+
extern const std::unordered_map<std::string, std::vector<std::string>>
33+
EN_TN_ORDERS;
3234

3335
struct Token {
3436
std::string name;

0 commit comments

Comments
 (0)