Skip to content

Commit

Permalink
Add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Dec 31, 2024
1 parent 4b450bf commit 531047f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sherpa-onnx/csrc/jieba-lexicon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class JiebaLexicon::Impl {

std::vector<std::pair<std::string, std::string>> puncts = {
{",", ""}, {".", ""}, {"!", ""}, {"?", ""}, {":", ""},
{"\"", ""}, {"\"", ""}, {"'", ""}, {"'", ""},
{"\"", ""}, {"\"", ""}, {"'", ""}, {"'", ""}, {";", ""},
};

for (const auto &p : puncts) {
Expand All @@ -149,6 +149,10 @@ class JiebaLexicon::Impl {
if (!token2id_.count("") && token2id_.count("")) {
token2id_[""] = token2id_[""];
}

if (!token2id_.count(";") && token2id_.count(",")) {
token2id_[";"] = token2id_[","];
}
}

void InitLexicon(std::istream &is) {
Expand Down
1 change: 1 addition & 0 deletions sherpa-onnx/python/sherpa_onnx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
OfflineStream,
OfflineTts,
OfflineTtsConfig,
OfflineTtsMatchaModelConfig,
OfflineTtsModelConfig,
OfflineTtsVitsModelConfig,
OfflineZipformerAudioTaggingModelConfig,
Expand Down

0 comments on commit 531047f

Please sign in to comment.