File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -26,9 +26,11 @@ extern const char EOS[];
2626extern const std::set<std::string> UTF8_WHITESPACE;
2727extern const std::set<std::string> ASCII_LETTERS;
2828extern const std::unordered_map<std::string, std::vector<std::string>>
29- TN_ORDERS ;
29+ ZH_TN_ORDERS ;
3030extern 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
3335struct Token {
3436 std::string name;
You can’t perform that action at this time.
0 commit comments