Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] prepare_dict support english and chinese in one lexicon.txt #1693

Merged
merged 5 commits into from
Feb 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
formatting adjustment
  • Loading branch information
cuidongcai1035 committed Feb 15, 2023
commit c8e489498d45c198d2f03b15c6ce74e033607bc1
3 changes: 2 additions & 1 deletion tools/fst/prepare_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def contain_oov(units):
if word in lexicon_table:
continue
if bpemode:
# We assume that the lexicon does not contain code-switch, i.e., the word contains both English and Chinese.
# We assume that the lexicon does not contain code-switch,
# i.e. the word contains both English and Chinese.
# see PR https://github.com/wenet-e2e/wenet/pull/1693
# and Issue https://github.com/wenet-e2e/wenet/issues/1653
if word.encode('utf8').isalpha():
Expand Down