Skip to content

Commit

Permalink
[runtime] fix english tn (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingchensong authored Jun 3, 2024
1 parent 3fc7bb6 commit 20c2603
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions runtime/processor/wetext_token_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ TokenParser::TokenParser(ParseType type) {
if (type == ParseType::kZH_TN) {
orders_ = ZH_TN_ORDERS;
} else if (type == ParseType::kZH_ITN) {
orders_ = ZH_TN_ORDERS;
orders_ = ZH_ITN_ORDERS;
} else if (type == ParseType::kEN_TN) {
orders_ = EN_TN_ORDERS;
} else {
orders_ = ZH_ITN_ORDERS;
LOG(FATAL) << "Invalid order";
}
}

Expand Down
6 changes: 4 additions & 2 deletions runtime/processor/wetext_token_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ extern const char EOS[];
extern const std::set<std::string> UTF8_WHITESPACE;
extern const std::set<std::string> ASCII_LETTERS;
extern const std::unordered_map<std::string, std::vector<std::string>>
TN_ORDERS;
ZH_TN_ORDERS;
extern const std::unordered_map<std::string, std::vector<std::string>>
ITN_ORDERS;
ZH_ITN_ORDERS;
extern const std::unordered_map<std::string, std::vector<std::string>>
EN_TN_ORDERS;

struct Token {
std::string name;
Expand Down

0 comments on commit 20c2603

Please sign in to comment.