Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Apr 9, 2020
2 parents c9122b8 + 2ea80f6 commit 63be21f
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 41,476 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "_tools/pinyin-data"]
path = _tools/pinyin-data
url = https://github.com/mozillazg/pinyin-data.git
[submodule "_tools/phrase-data"]
path = _tools/phrase-data
url = https://github.com/hotoo/pinyin.git
16 changes: 11 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
language: go
go:
- "1.9.x"
- "1.10.x"
- "1.11.x"
- "1.12.x"
- "1.13.x"
- '1.9.x'
- '1.10.x'
- '1.11.x'
- '1.12.x'
- '1.13.x'
- '1.14.x'
- 'master'

sudo: false

Expand All @@ -20,3 +22,7 @@ script:
- echo "abc" | go run cmd/pinyin/main.go
- echo "abc" > abc.txt && go run cmd/pinyin/main.go < abc.txt
- $HOME/gopath/bin/goveralls -service=travis-ci -v -package .

matrix:
allow_failures:
- go: master
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [0.17.0] (2020-04-09)

* **Changed** 因为依赖的 gojieba 经常出现安装异常,撤销 v0.16.0 的修改,撤销后 v0.17.0 的代码跟 v0.15.0 基本是一样的。
如果有需要使用 v0.16.0 新增的 ``func Paragraph(p string) string`` 功能的请使用 v0.16.0 版本或者通过 v0.16.0 中相关代码实现类似的需求。


## [0.16.0] (2019-12-05)

* **NEW** 增加 ``func Paragraph(p string) string`` 用于便捷处理大段文字
Expand Down Expand Up @@ -221,3 +227,5 @@
[0.14.0]: https://github.com/mozillazg/go-pinyin/compare/v0.13.0...v0.14.0
[0.15.0]: https://github.com/mozillazg/go-pinyin/compare/v0.14.0...v0.15.0
[0.16.0]: https://github.com/mozillazg/go-pinyin/compare/v0.15.0...v0.16.0
[0.17.0]: https://github.com/mozillazg/go-pinyin/compare/v0.16.0...v0.17.0

7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ test:

.PHONY: gen_pinyin_dict
gen_pinyin_dict:
@go run _tools/gen_pinyin_dict/main.go _tools/pinyin-data/pinyin.txt pinyin_dict.go

.PHONY: gen_phrase_dict
gen_phrase_dict:
@go run _tools/gen_phrase_dict/main.go _tools/phrase-data/data/phrases-dict.js phrase_dict.go
@goreturns -w phrase_dict.go
@go run _tools/gen_pinyin_dict.go _tools/pinyin-data/pinyin.txt pinyin_dict.go

.PHONY: lint
lint:
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ func main() {

fmt.Println(pinyin.LazyConvert(hans, nil))
// [zhong guo ren]

// 段落转换,支持完整支持多音字,保留符号
fmt.Println(pinyin.Paragraph("交给团长,告诉他我们给予期望。前线的供给一定要能自给自足!"))
// jiao gei tuan zhang, gao su ta wo men ji yu qi wang. qian xian de gong ji yi ding yao neng zi ji zi zu!
}
```

Expand Down
92 changes: 0 additions & 92 deletions _tools/gen_phrase_dict/main.go

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion _tools/phrase-data
Submodule phrase-data deleted from f2b37a
6 changes: 0 additions & 6 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,3 @@ func ExampleSlug() {
fmt.Println(pinyin.Slug(hans, a))
// Output: zhong-guo-ren
}

func ExampleParagraph() {
hans := "人民银行旁边一行人abc字母【路牌】,平行宇宙发行股票。"
fmt.Println(pinyin.Paragraph(hans))
// Output: ren min yin xing pang bian yi xing ren abc zi mu [lu pai], ping xing yu zhou fa xing gu piao.
}
5 changes: 0 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
module github.com/mozillazg/go-pinyin

require (
github.com/mattn/go-isatty v0.0.10
github.com/yanyiwu/gojieba v1.1.0
)
6 changes: 0 additions & 6 deletions go.sum

This file was deleted.

75 changes: 0 additions & 75 deletions paragraph.go

This file was deleted.

38 changes: 0 additions & 38 deletions paragraph_test.go

This file was deleted.

33 changes: 0 additions & 33 deletions phrase.go

This file was deleted.

Loading

0 comments on commit 63be21f

Please sign in to comment.