Skip to content

Commit ce9abbf

Browse files
committed
update README
1 parent 65485e2 commit ce9abbf

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ go get -v -u github.com/caiguanhao/opencc/opencc
1313

1414
## Import Package
1515

16+
### All
17+
1618
```go
1719
package main
1820

@@ -28,3 +30,22 @@ func main() {
2830
// 滑鼠裡面的矽二極體壞了,導致游標解析度降低。
2931
}
3032
```
33+
34+
### Specific
35+
36+
```go
37+
package main
38+
39+
import (
40+
"fmt"
41+
42+
"github.com/caiguanhao/opencc/configs/tw2sp"
43+
)
44+
45+
func main() {
46+
fmt.Println(tw2sp.Description)
47+
// Traditional Chinese (Taiwan standard) to Simplified Chinese (with phrases)
48+
fmt.Println(tw2sp.Dicts.Convert(`滑鼠裡面的矽二極體壞了,導致游標解析度降低。`))
49+
// 鼠标里面的硅二极管坏了,导致光标分辨率降低。
50+
}
51+
```

0 commit comments

Comments
 (0)