Skip to content

Commit 220da96

Browse files
committed
update OpenCC to ver 1.1.6
1 parent 0f962df commit 220da96

File tree

22 files changed

+359626
-357841
lines changed

22 files changed

+359626
-357841
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ dicts: OpenCC-src
55
(cd dicts && go test -v)
66

77
OpenCC-src:
8-
mkdir OpenCC-src && curl -Ls https://github.com/BYVoid/OpenCC/archive/ver.1.1.0.tar.gz | tar --strip-components 1 -C OpenCC-src -xvzf - && (cd OpenCC-src && npm install)
8+
mkdir OpenCC-src && curl -Ls https://github.com/BYVoid/OpenCC/archive/ver.1.1.6.tar.gz | tar --strip-components 1 -C OpenCC-src -xvzf - && (cd OpenCC-src && npm install)
99

10-
.PHONY: dicts
10+
wasm:
11+
(cd wasm && GOOS=js GOARCH=wasm go build -v -o opencc.wasm)
12+
13+
.PHONY: dicts wasm

configs/hk2s/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
const (
14-
Description = "Traditional Chinese (Hong Kong standard) to Simplified Chinese"
14+
Description = "Traditional Chinese (Hong Kong variant) to Simplified Chinese"
1515
)
1616

1717
var (

configs/hk2t/main.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// this file is generated by convert_test.go
2+
3+
package hk2t
4+
5+
import (
6+
"github.com/caiguanhao/opencc/configs"
7+
"github.com/caiguanhao/opencc/dicts/HKVariantsRev"
8+
"github.com/caiguanhao/opencc/dicts/HKVariantsRevPhrases"
9+
)
10+
11+
const (
12+
Description = "Traditional Chinese (Hong Kong variant) to Traditional Chinese"
13+
)
14+
15+
var (
16+
Dicts = configs.Dicts{
17+
{
18+
HKVariantsRevPhrases.Dict,
19+
HKVariantsRev.Dict,
20+
},
21+
}
22+
)

configs/s2hk/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
const (
13-
Description = "Simplified Chinese to Traditional Chinese (Hong Kong standard)"
13+
Description = "Simplified Chinese to Traditional Chinese (Hong Kong variant)"
1414
)
1515

1616
var (

configs/t2hk/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
const (
11-
Description = "Traditional Chinese to Traditional Chinese (Hong Kong standard)"
11+
Description = "Traditional Chinese to Traditional Chinese (Hong Kong variant)"
1212
)
1313

1414
var (

configs/tw2t/main.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// this file is generated by convert_test.go
2+
3+
package tw2t
4+
5+
import (
6+
"github.com/caiguanhao/opencc/configs"
7+
"github.com/caiguanhao/opencc/dicts/TWVariantsRev"
8+
"github.com/caiguanhao/opencc/dicts/TWVariantsRevPhrases"
9+
)
10+
11+
const (
12+
Description = "Traditional Chinese (Taiwan standard) to Traditional Chinese"
13+
)
14+
15+
var (
16+
Dicts = configs.Dicts{
17+
{
18+
TWVariantsRevPhrases.Dict,
19+
TWVariantsRev.Dict,
20+
},
21+
}
22+
)

convert.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package opencc
55
import (
66
"github.com/caiguanhao/opencc/configs"
77
"github.com/caiguanhao/opencc/configs/hk2s"
8+
"github.com/caiguanhao/opencc/configs/hk2t"
89
"github.com/caiguanhao/opencc/configs/jp2t"
910
"github.com/caiguanhao/opencc/configs/s2hk"
1011
"github.com/caiguanhao/opencc/configs/s2t"
@@ -16,11 +17,13 @@ import (
1617
"github.com/caiguanhao/opencc/configs/t2tw"
1718
"github.com/caiguanhao/opencc/configs/tw2s"
1819
"github.com/caiguanhao/opencc/configs/tw2sp"
20+
"github.com/caiguanhao/opencc/configs/tw2t"
1921
)
2022

2123
var (
2224
Dictionaries = map[string]string{
2325
"hk2s": hk2s.Description,
26+
"hk2t": hk2t.Description,
2427
"jp2t": jp2t.Description,
2528
"s2hk": s2hk.Description,
2629
"s2t": s2t.Description,
@@ -32,6 +35,7 @@ var (
3235
"t2tw": t2tw.Description,
3336
"tw2s": tw2s.Description,
3437
"tw2sp": tw2sp.Description,
38+
"tw2t": tw2t.Description,
3539
}
3640
)
3741

@@ -44,6 +48,9 @@ func dictsForName(name string) configs.Dicts {
4448
if name == "hk2s" {
4549
return hk2s.Dicts
4650
}
51+
if name == "hk2t" {
52+
return hk2t.Dicts
53+
}
4754
if name == "jp2t" {
4855
return jp2t.Dicts
4956
}
@@ -77,5 +84,8 @@ func dictsForName(name string) configs.Dicts {
7784
if name == "tw2sp" {
7885
return tw2sp.Dicts
7986
}
87+
if name == "tw2t" {
88+
return tw2t.Dicts
89+
}
8090
return nil
8191
}

dicts/HKVariants/main.go

Lines changed: 381 additions & 393 deletions
Large diffs are not rendered by default.

dicts/HKVariantsRev/main.go

Lines changed: 352 additions & 355 deletions
Large diffs are not rendered by default.

dicts/HKVariantsRevPhrases/main.go

Lines changed: 1500 additions & 1047 deletions
Large diffs are not rendered by default.

dicts/JPShinjitaiCharacters/main.go

Lines changed: 320 additions & 318 deletions
Large diffs are not rendered by default.

dicts/JPVariants/main.go

Lines changed: 660 additions & 660 deletions
Large diffs are not rendered by default.

dicts/JPVariantsRev/main.go

Lines changed: 699 additions & 699 deletions
Large diffs are not rendered by default.

dicts/STCharacters/main.go

Lines changed: 7262 additions & 7136 deletions
Large diffs are not rendered by default.

dicts/STPhrases/main.go

Lines changed: 327301 additions & 327316 deletions
Large diffs are not rendered by default.

dicts/TSCharacters/main.go

Lines changed: 8732 additions & 8622 deletions
Large diffs are not rendered by default.

dicts/TSPhrases/main.go

Lines changed: 2137 additions & 1921 deletions
Large diffs are not rendered by default.

dicts/TWPhrases/main.go

Lines changed: 4245 additions & 3997 deletions
Large diffs are not rendered by default.

dicts/TWPhrasesRev/main.go

Lines changed: 4478 additions & 4229 deletions
Large diffs are not rendered by default.

dicts/TWVariants/main.go

Lines changed: 371 additions & 368 deletions
Large diffs are not rendered by default.

dicts/TWVariantsRev/main.go

Lines changed: 371 additions & 368 deletions
Large diffs are not rendered by default.

dicts/TWVariantsRevPhrases/main.go

Lines changed: 755 additions & 407 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)