Skip to content

Commit

Permalink
修正字母和符号混用的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
macroxue committed Jan 27, 2024
1 parent 7fd3c1a commit ae058e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var punctuations = {
',':',', '。':'.', ';':';', ',':',', '.':'.', ';':';', '/':'/'
};

var letters = 'abcdefghijklmnopqrstuvwxyz 0123456789';
var letters = 'abcdefghijklmnopqrstuvwxyz';

function split_pinyin(pinyin) {
if (pinyin == 'ng') {
Expand Down Expand Up @@ -164,7 +164,7 @@ function stat_pinyin() {
last_yun = punctuation;
continue;
}
if (letters.includes(c.toLowerCase())) {
if (letters.includes(c.toLowerCase()) || '1234567890 '.includes(c)) {
++alphabeta_total;
update_alphabeta_freq(c.toLowerCase());
continue;
Expand Down

0 comments on commit ae058e8

Please sign in to comment.