diff --git a/go.mod b/go.mod index b28bcb5..3bfa92e 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/go-ego/gpy go 1.13 require ( - github.com/go-ego/gse v0.63.2 + github.com/go-ego/gse v0.64.1 github.com/mattn/go-isatty v0.0.12 github.com/vcaesar/tt v0.11.0 ) diff --git a/go.sum b/go.sum index b11e3ce..728bab0 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/go-ego/cedar v0.10.2 h1:0AQkBNfHAzuUn306v0ydMXAawHoIdxiYwN1+2XvFySw= github.com/go-ego/cedar v0.10.2/go.mod h1:OlEbpcRpzwp69CoCXPJTmrOzELoGAmFDgW3hdWrHHc0= -github.com/go-ego/gse v0.63.2 h1:uX6AhpiEJVPjVxpgmziJnye52lZ2UnXAycvosoMc9JQ= -github.com/go-ego/gse v0.63.2/go.mod h1:nSPjeaLwb5AlHI4b83iXFM+cA2wBx2Xxq/Bbf0BU0ME= +github.com/go-ego/gse v0.64.1 h1:EtSXdKaKiOIG/xZhJS4jIQDGEdjroXAHCQMIyXkaiWI= +github.com/go-ego/gse v0.64.1/go.mod h1:nSPjeaLwb5AlHI4b83iXFM+cA2wBx2Xxq/Bbf0BU0ME= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/vcaesar/tt v0.11.0 h1:obQecjgbnAxxC6OYGY6yDvhGRW2PR5wD8Ma2uJH3WGA= diff --git a/gpy.go b/gpy.go index 8268587..93174ef 100644 --- a/gpy.go +++ b/gpy.go @@ -44,7 +44,8 @@ func Pinyin(s string, arg ...Args) [][]string { a := args(arg...) pys := [][]string{} - sw := gse.SplitTextToWords([]byte(s)) + var seg gse.Segmenter + sw := seg.SplitTextToWords([]byte(s)) for i := 0; i < len(sw); i++ { s1 := string([]byte(sw[i])) r := []rune(s1)