Added cj & jyutping lookup

This commit is contained in:
2026-02-20 12:41:04 +08:00
parent 59d5934097
commit f6c9e40540
21 changed files with 114450 additions and 139 deletions

View File

@@ -0,0 +1,27 @@
package cjlookup
import (
"testing"
)
func TestDataRead(t *testing.T) {
chars := map[string]*CChar{}
cjRepl, err := ReadCangJieKeys()
if err != nil {
t.Error(err)
}
ReadCangJieTable(chars, cjRepl)
JyutPingMap, err := ReadJyutPingTable(chars)
if err != nil {
t.Error(err)
}
j := *JyutPingMap["sing4"]
if j[0].TungJamZi != j[1].TungJamZi {
t.Errorf("%s & %s does not point to the same reference.", j[0].Face, j[1].Face)
}
/*
for i, c := range j {
t.Log(i, c.CangJie)
}
*/
}