Skip to content

Commit

Permalink
Rename longbridgeapp to longbridge.
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Dec 13, 2024
1 parent fc69704 commit 6407c80
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14
go-version: 1.20
id: go

- name: Check out code into the Go module directory
Expand Down
29 changes: 14 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## [1.1.0] (2020-07-28)

* **Changed** 使用 [pinyin-data][pinyin-data] v0.9.0 的拼音数据
* **Bugfixed** 修复自定义的 Fallback 函数可能会导致结果乱码的问题 Fixes [#35]
- **Changed** 使用 [pinyin-data][pinyin-data] v0.9.0 的拼音数据
- **Bugfixed** 修复自定义的 Fallback 函数可能会导致结果乱码的问题 Fixes [#35]

## [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 中相关代码实现类似的需求。
- **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)

Expand All @@ -24,7 +24,7 @@

- **Changed** 使用 [pinyin-data][pinyin-data] v0.6.1 的拼音数据
- **Changed** 命令行工具移到 `cmd/pinyin/` 目录下,现在需要改为使用
`go get -u github.com/longbridgeapp/go-pinyin/cmd/pinyin` 来安装命令行工具。
`go get -u github.com/longbridge/go-pinyin/cmd/pinyin` 来安装命令行工具。

## [0.13.0] (2018-04-29)

Expand Down Expand Up @@ -84,7 +84,7 @@
## [0.8.0] (2016-08-19)

- **Changed** use [pinyin-data](https://github.com/mozillazg/pinyin-data) v0.3.0
- Fixed [#13](https://github.com/longbridgeapp/go-pinyin/issues/13) . thanks [@aisq2008](https://github.com/aisq2008)
- Fixed [#13](https://github.com/longbridge/go-pinyin/issues/13) . thanks [@aisq2008](https://github.com/aisq2008)
- Fixed pinyin of 罗

## [0.7.0] (2016-08-02)
Expand All @@ -94,15 +94,15 @@

## [0.6.0] (2016-05-14)

- **NEW** 命令行程序支持指定拼音风格:
- **NEW**命令行程序支持指定拼音风格:

```shell
$ pinyin -s Normal 你好
ni hao
```

- **Bugfixed** 解决韵母 i, u, ü 的问题:根据以下拼音方案,还原出正确的韵母
[#8](https://github.com/longbridgeapp/go-pinyin/pull/8), [python-pinyin#26](https://github.com/mozillazg/python-pinyin/pull/26)
[#8](https://github.com/longbridge/go-pinyin/pull/8), [python-pinyin#26](https://github.com/mozillazg/python-pinyin/pull/26)

> i 行的韵母,前面没有声母的时候,写成:yi(衣),yɑ(呀),ye(耶),
> yɑo(腰),you(忧),yɑn(烟),yin(因),yɑnɡ(央),yinɡ(英),yonɡ(雍)。
Expand Down Expand Up @@ -139,29 +139,29 @@
a.Fallback = func(r rune, a pinyin.Args) []string {
return []string{string(r + 1)}
}
fmt.Println(pinyin.Pinyin("中国人abc", a))
fmt.Println(pinyin.Pinyin("中国人 abcccccc", a))
// Output: [[zhong] [guo] [ren] [b] [c] [d]]

// or
pinyin.Fallback = func(r rune, a pinyin.Args) []string {
return []string{string(r)}
}
fmt.Println(pinyin.Pinyin("中国人abc", pinyin.NewArgs()))
fmt.Println(pinyin.Pinyin("中国人 abcccccc", pinyin.NewArgs()))
// Output: [[zhong] [guo] [ren] [a] [b] [c]]
```

## [0.3.0] (2015-12-29)

- fix "当字符串中有非中文的时候,会出现下标越界的情况"(影响 `pinyin.LazyPinyin``pinyin.Slug` ([#1](https://github.com/longbridgeapp/go-pinyin/issues/1)))
- fix "当字符串中有非中文的时候,会出现下标越界的情况"(影响 `pinyin.LazyPinyin``pinyin.Slug` ([#1](https://github.com/longbridge/go-pinyin/issues/1)))
- 调整对非中文字符的处理:当遇到没有拼音的字符时,直接忽略

```go
// before
fmt.Println(pinyin.Pinyin("中国人abc", pinyin.NewArgs()))
fmt.Println(pinyin.Pinyin("中国人 abcccccc", pinyin.NewArgs()))
[[zhong] [guo] [ren] [] [] []]

// after
fmt.Println(pinyin.Pinyin("中国人abc", pinyin.NewArgs()))
fmt.Println(pinyin.Pinyin("中国人 abcccccc", pinyin.NewArgs()))
[[zhong] [guo] [ren]]
```

Expand All @@ -173,7 +173,7 @@

- 新增 `func NewArgs() Args`
- 解决 `Args.Separator` 无法赋值为 `""` 的 BUG
- 规范命名:
- 规范命名
- `NORMAL` -> `Normal`
- `TONE` -> `Tone`
- `TONE2` -> `Tone2`
Expand All @@ -199,7 +199,6 @@
[#30]: https://github.com/mozillazg/go-pinyin/pull/30
[#37]: https://github.com/mozillazg/go-pinyin/pull/37
[#35]: https://github.com/mozillazg/go-pinyin/issues/35

[0.1.1]: https://github.com/mozillazg/go-pinyin/compare/v0.1.0...v0.1.1
[0.2.0]: https://github.com/mozillazg/go-pinyin/compare/v0.1.1...v0.2.0
[0.2.1]: https://github.com/mozillazg/go-pinyin/compare/v0.2.0...v0.2.1
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# go-pinyin

[![Go](https://github.com/longbridgeapp/go-pinyin/actions/workflows/go.yml/badge.svg)](https://github.com/longbridgeapp/go-pinyin/actions/workflows/go.yml)
[![Go](https://github.com/longbridge/go-pinyin/actions/workflows/go.yml/badge.svg)](https://github.com/longbridge/go-pinyin/actions/workflows/go.yml)

汉语拼音转换工具 Go 版。

Expand All @@ -9,21 +9,21 @@
## Installation

```
go get -u github.com/longbridgeapp/go-pinyin
go get -u github.com/longbridge/go-pinyin
```

install CLI tool:

```
go get -u github.com/longbridgeapp/go-pinyin/cmd/pinyin
go get -u github.com/longbridge/go-pinyin/cmd/pinyin
$ pinyin 中国人
zhōng guó rén
```

## Documentation

API documentation can be found here:
https://pkg.go.dev/github.com/longbridgeapp/go-pinyin
https://pkg.go.dev/github.com/longbridge/go-pinyin

## Usage

Expand All @@ -32,7 +32,7 @@ package main

import (
"fmt"
"github.com/longbridgeapp/go-pinyin"
"github.com/longbridge/go-pinyin"
)

func main() {
Expand Down Expand Up @@ -79,11 +79,11 @@ func main() {

注意:

* 默认情况下会忽略没有拼音的字符(可以通过自定义 `Fallback` 参数的值来自定义如何处理没有拼音的字符,
- 默认情况下会忽略没有拼音的字符(可以通过自定义 `Fallback` 参数的值来自定义如何处理没有拼音的字符,
详见 [示例](https://godoc.org/github.com/mozillazg/go-pinyin#example-Pinyin--FallbackCustom1))。
* 根据 [《汉语拼音方案》](http://www.moe.gov.cn/s78/A19/yxs_left/moe_810/s230/195802/t19580201_186000.html) y,w,ü (yu) 都不是声母,
- 根据 [《汉语拼音方案》](http://www.moe.gov.cn/s78/A19/yxs_left/moe_810/s230/195802/t19580201_186000.html) y,w,ü (yu) 都不是声母,
以及不是所有拼音都有声母,如果这不是你预期的话,你可能需要的是首字母风格 `FirstLetter`
[详细信息](https://github.com/mozillazg/python-pinyin#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%B2%A1%E6%9C%89-y-w-yu-%E5%87%A0%E4%B8%AA%E5%A3%B0%E6%AF%8D) )。
[详细信息](https://github.com/mozillazg/python-pinyin#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%B2%A1%E6%9C%89-y-w-yu-%E5%87%A0%E4%B8%AA%E5%A3%B0%E6%AF%8D) )。

## Related Projects

Expand Down
2 changes: 1 addition & 1 deletion cmd/pinyin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"strings"

"github.com/longbridgeapp/go-pinyin"
"github.com/longbridge/go-pinyin"
"github.com/mattn/go-isatty"
)

Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Usage
import (
"fmt"
"github.com/longbridgeapp/go-pinyin"
"github.com/longbridge/go-pinyin"
)
func main() {
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pinyin_test
import (
"fmt"

"github.com/longbridgeapp/go-pinyin"
"github.com/longbridge/go-pinyin"
)

func ExampleConvert() {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/longbridgeapp/go-pinyin
module github.com/longbridge/go-pinyin

go 1.13
go 1.18

require (
github.com/mattn/go-isatty v0.0.10
Expand Down

0 comments on commit 6407c80

Please sign in to comment.