Skip to content

Commit

Permalink
chore: revert chai format
Browse files Browse the repository at this point in the history
  • Loading branch information
nopdan committed May 31, 2024
1 parent 1e5741d commit f3b9964
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pkg/data/dict1.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ func (d *Dict) read1(format string) []*Entry {
case "bingling":
word, code = values[1], values[0]
case "chai":
if len(values) < 5 {
if len(values) < 3 {
continue
}
word, code = values[0], values[3]
pos, _ = strconv.Atoi(values[4])
code = d.addSuffix(code, pos)
word, code = values[0], values[2]
if code == "" {
code = values[1]
}
case "jisu":
word, code = values[0], values[1]
// 带空格 a_ aa_
Expand All @@ -48,7 +49,7 @@ func (d *Dict) read1(format string) []*Entry {
code = d.addSuffix(code, pos)
}
switch format {
case "duoduo", "bingling":
case "duoduo", "bingling", "chai":
stat[code]++
pos = stat[code]
code = d.addSuffix(code, pos)
Expand Down

0 comments on commit f3b9964

Please sign in to comment.