Skip to content
This repository was archived by the owner on Oct 3, 2025. It is now read-only.

Commit b7662aa

Browse files
committed
Update go mod and test code
1 parent d666cc1 commit b7662aa

File tree

6 files changed

+40
-35
lines changed

6 files changed

+40
-35
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
[![Build Status](https://github.com/go-ego/gpy/workflows/Go/badge.svg)](https://github.com/go-ego/gpy/commits/master)
44
[![CircleCI Status](https://circleci.com/gh/go-ego/gpy.svg?style=shield)](https://circleci.com/gh/go-ego/gpy)
5-
[![Build Status](https://travis-ci.org/go-ego/gpy.svg?branch=master)](https://travis-ci.org/go-ego/gpy)
6-
<!-- [![Coverage Status](https://coveralls.io/repos/github.com/go-ego/gpy/badge.svg?branch=master)](https://coveralls.io/r/github.com/go-ego/gpy?branch=master) -->
5+
[![Build Status](https://travis-ci.org/go-ego/gpy.svg?branch=master)](https://travis-ci.org/go-ego/gpy)<!-- [![Coverage Status](https://coveralls.io/repos/github.com/go-ego/gpy/badge.svg?branch=master)](https://coveralls.io/r/github.com/go-ego/gpy?branch=master) -->
76
[![codecov](https://codecov.io/gh/go-ego/gpy/branch/master/graph/badge.svg)](https://codecov.io/gh/go-ego/gpy)
87
[![Go Report Card](https://goreportcard.com/badge/github.com/go-ego/gpy)](https://goreportcard.com/report/github.com/go-ego/gpy)
98
[![GoDoc](https://godoc.org/github.com/go-ego/gpy?status.svg)](https://godoc.org/github.com/go-ego/gpy)

README_zh.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
[![Build Status](https://github.com/go-ego/gpy/workflows/Go/badge.svg)](https://github.com/go-ego/gpy/commits/master)
44
[![CircleCI Status](https://circleci.com/gh/go-ego/gpy.svg?style=shield)](https://circleci.com/gh/go-ego/gpy)
5-
[![Build Status](https://travis-ci.org/go-ego/gpy.svg?branch=master)](https://travis-ci.org/go-ego/gpy)
6-
<!-- [![Coverage Status](https://coveralls.io/repos/gtihub.com/go-ego/gpy/badge.svg?branch=master)](https://coveralls.io/r/github.com/go-ego/gpy?branch=master) -->
5+
[![Build Status](https://travis-ci.org/go-ego/gpy.svg?branch=master)](https://travis-ci.org/go-ego/gpy)<!-- [![Coverage Status](https://coveralls.io/repos/gtihub.com/go-ego/gpy/badge.svg?branch=master)](https://coveralls.io/r/github.com/go-ego/gpy?branch=master) -->
76
[![codecov](https://codecov.io/gh/go-ego/gpy/branch/master/graph/badge.svg)](https://codecov.io/gh/go-ego/gpy)
87
[![Go Report Card](https://goreportcard.com/badge/github.com/go-ego/gpy)](https://goreportcard.com/report/github.com/go-ego/gpy)
98
[![GoDoc](https://godoc.org/github.com/go-ego/gpy?status.svg)](https://godoc.org/github.com/go-ego/gpy)

go.mod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
module github.com/go-ego/gpy
22

3-
go 1.13
3+
go 1.17
44

55
require (
6-
github.com/go-ego/gse v0.69.2
6+
github.com/go-ego/gse v0.69.8
77
github.com/mattn/go-isatty v0.0.13
8-
github.com/vcaesar/tt v0.11.0
8+
github.com/vcaesar/tt v0.20.0
99
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect
1010
)
11+
12+
require github.com/vcaesar/cedar v0.10.1 // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
github.com/go-ego/cedar v0.10.2 h1:0AQkBNfHAzuUn306v0ydMXAawHoIdxiYwN1+2XvFySw=
2-
github.com/go-ego/cedar v0.10.2/go.mod h1:OlEbpcRpzwp69CoCXPJTmrOzELoGAmFDgW3hdWrHHc0=
3-
github.com/go-ego/gse v0.69.2 h1:2S6oXsun1YSPVuo4f2YeJPonpoIgRNjt7n3rB4Rq6/s=
4-
github.com/go-ego/gse v0.69.2/go.mod h1:AbOXXmI3rgUG/Rb3e9xtk6xDjSLj6KpBHoctONT58ns=
1+
github.com/go-ego/gse v0.69.8 h1:enzXx0Z/U5UhmUAZSD/bh1rP83hMfrhF/ZEBe784nDU=
2+
github.com/go-ego/gse v0.69.8/go.mod h1:TXy19dAfok1+NOqfTUFVqifNAcAz7srXfG+jLC8RZ0s=
53
github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA=
64
github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
7-
github.com/vcaesar/tt v0.11.0 h1:obQecjgbnAxxC6OYGY6yDvhGRW2PR5wD8Ma2uJH3WGA=
8-
github.com/vcaesar/tt v0.11.0/go.mod h1:GHPxQYhn+7OgKakRusH7KJ0M5MhywoeLb8Fcffs/Gtg=
5+
github.com/vcaesar/cedar v0.10.1 h1:vx6zUYVqDP5ECazPx3Bsm2M4DDhn4vqRobK94LwXU+k=
6+
github.com/vcaesar/cedar v0.10.1/go.mod h1:iMDweyuW76RvSrCkQeZeQk4iCbshiPzcCvcGCtpM7iI=
7+
github.com/vcaesar/tt v0.20.0 h1:9t2Ycb9RNHcP0WgQgIaRKJBB+FrRdejuaL6uWIHuoBA=
8+
github.com/vcaesar/tt v0.20.0/go.mod h1:GHPxQYhn+7OgKakRusH7KJ0M5MhywoeLb8Fcffs/Gtg=
99
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1010
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio=
1111
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

phrase/paragraph_test.go

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@ func BenchmarkParagraph(b *testing.B) {
1616

1717
func TestParagraph(t *testing.T) {
1818
expects := map[string]string{
19-
"西雅图太空针, The Space Nedle": "xi ya tu tai kong zhen, The Space Nedle",
20-
"旧金山湾金门大桥": "jiu jin shan wan jin men da qiao",
21-
"纽约帝国大厦, 纽约时代广场": "niu yue di guo da sha, niu yue shi dai guang chang",
22-
"多伦多加拿大国家电视塔, the CN Tower, 尼亚加拉大瀑布": "duo lun duo jia na da guo jia dian shi ta, the CN Tower, ni ya jia la da pu bu",
23-
"伦敦泰晤士河, 大笨钟": "lun dun tai wu shi he, da ben zhong",
24-
"雅典帕特农神庙": "ya dian pa te nong shen miao",
25-
"东京都, 东京晴空塔": "dong jing du, dong jing qing kong ta",
26-
"洛杉矶好莱坞": "luo shan ji hao lai wu",
27-
"巴黎埃菲尔铁塔": "ba li ai fei er tie ta",
28-
"上海外滩, 陆家嘴上海中心大厦": "shang hai wai tan, lu jia zui shang hai zhong xin da sha",
29-
"北京八达岭长城": "bei jing ba da ling chang cheng",
30-
"香港维多利亚港": "xiang gang wei duo li ya gang",
31-
"悉尼歌剧院": "xi ni ge ju yuan",
19+
"西雅图太空针, The Space Nedle, MT. Rainier": "xi ya tu tai kong zhen, The Space Nedle, MT. Rainier",
20+
"旧金山湾金门大桥": "jiu jin shan wan jin men da qiao",
21+
"纽约帝国大厦, 纽约时代广场, 世贸中心": "niu yue di guo da sha, niu yue shi dai guang chang, shi mao zhong xin",
22+
"多伦多加拿大国家电视塔, the CN Tower, 尼亚加拉大瀑布": "duo lun duo jia na da guo jia dian shi ta, the CN Tower, ni ya jia la da pu bu",
23+
"伦敦泰晤士河, 大笨钟, 摘星塔": "lun dun tai wu shi he, da ben zhong, zhai xing ta",
24+
25+
"洛杉矶好莱坞": "luo shan ji hao lai wu",
26+
"悉尼歌剧院": "xi ni ge ju yuan",
27+
"雅典帕特农神庙": "ya dian pa te nong shen miao",
28+
"东京都, 东京晴空塔, 富士山": "dong jing du, dong jing qing kong ta, fu shi shan",
29+
"巴黎埃菲尔铁塔": "ba li ai fei er tie ta",
30+
31+
"香港维多利亚港": "xiang gang wei duo li ya gang",
32+
"上海外滩, 陆家嘴上海中心大厦": "shang hai wai tan, lu jia zui shang hai zhong xin da sha",
33+
"北京八达岭长城": "bei jing ba da ling chang cheng",
3234
}
3335

3436
seg, err := gse.New("zh, ../examples/dict.txt")

phrase/phrase_test.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@ func Benchmark_pinyinPhrase(b *testing.B) {
1616

1717
func Test_pinyinPhrase(t *testing.T) {
1818
expects := map[string]string{
19-
"西雅图太空针, The Space Nedle": "西雅图 tai kong 针, The Space Nedle",
20-
"旧金山湾金门大桥": "旧金山湾金门 da qiao",
21-
"纽约帝国大厦, 纽约时代广场": "纽约帝国 da sha , 纽约时代 guang chang",
22-
"伦敦泰晤士河, 大笨钟": "lun dun 泰晤士河, 大笨钟",
23-
"东京都, 东京晴空塔": "东 jing du , 东京 qing kong 塔",
24-
"洛杉矶好莱坞": "洛杉矶 hao lai wu",
25-
"巴黎埃菲尔铁塔": "巴黎 ai fei er tie ta",
26-
"上海外滩, 陆家嘴上海中心": "shang hai 外滩, 陆家嘴 shang hai 中心",
27-
"北京八达岭长城": "bei jing ba da ling chang cheng",
19+
"西雅图太空针, The Space Nedle": "西雅图 tai kong 针, The Space Nedle",
20+
"旧金山湾金门大桥": "旧金山湾金门 da qiao",
21+
"纽约帝国大厦, 纽约时代广场, 世贸中心": "纽约帝国 da sha , 纽约时代 guang chang , 世贸中心",
22+
"多伦多加拿大国家电视塔, the CN Tower, 尼亚加拉大瀑布": "多伦多加拿 da guo jia dian 视塔, the CN Tower, 尼亚加拉大 pu bu",
23+
"伦敦泰晤士河, 大笨钟": "lun dun 泰晤士河, 大笨钟",
24+
25+
"洛杉矶好莱坞": "洛杉矶 hao lai wu",
26+
"东京都, 东京晴空塔": "东 jing du , 东京 qing kong 塔",
27+
"巴黎埃菲尔铁塔": "巴黎 ai fei er tie ta",
28+
"香港维多利亚港": "xiang gang 维多利亚港",
29+
"上海外滩, 陆家嘴上海中心大厦": "shang hai 外滩, 陆家嘴 shang hai 中心 da sha",
30+
"北京八达岭长城": "bei jing ba da ling chang cheng",
2831
}
2932

3033
for source, expect := range expects {

0 commit comments

Comments
 (0)