https://github.com/mozillazg/go-unidecode
ASCII transliterations of Unicode text.
https://github.com/mozillazg/go-unidecode
go golang unidecode
Last synced: 4 months ago
JSON representation
ASCII transliterations of Unicode text.
- Host: GitHub
- URL: https://github.com/mozillazg/go-unidecode
- Owner: mozillazg
- License: mit
- Created: 2016-07-08T13:15:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-05-14T12:06:38.000Z (over 2 years ago)
- Last Synced: 2025-03-12T18:41:47.024Z (8 months ago)
- Topics: go, golang, unidecode
- Language: Go
- Homepage: https://godoc.org/github.com/mozillazg/go-unidecode
- Size: 324 KB
- Stars: 136
- Watchers: 3
- Forks: 19
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - go-unidecode - ASCII transliterations of Unicode text. (Natural Language Processing / Transliteration)
- zero-alloc-awesome-go - go-unidecode - ASCII transliterations of Unicode text. (Natural Language Processing / Transliteration)
- awesome-go - go-unidecode - ASCII transliterations of Unicode text. - ★ 35 (Natural Language Processing)
- awesome-go-extra - go-unidecode - 07-08T13:15:10Z|2022-08-20T07:57:20Z| (Bot Building / Transliteration)
- awesome-go-zh - go-unidecode
README
go-unidecode
==============
[](https://github.com/mozillazg/go-unidecode/actions/workflows/ci.yml)
[](https://coveralls.io/r/mozillazg/go-unidecode?branch=master)
[](https://goreportcard.com/report/github.com/mozillazg/go-unidecode)
[](https://godoc.org/github.com/mozillazg/go-unidecode)
ASCII transliterations of Unicode text. Inspired by [python-unidecode](https://github.com/avian2/unidecode).
Installation
------------
```
go get github.com/mozillazg/go-unidecode
```
Install CLI tool:
```
$ go install github.com/mozillazg/go-unidecode/cmd/unidecode@latest
$ unidecode 北京kožušček
Bei Jing kozuscek
```
Documentation
--------------
API documentation can be found here:
https://godoc.org/github.com/mozillazg/go-unidecode
Usage
------
```go
package main
import (
"fmt"
"github.com/mozillazg/go-unidecode"
)
func main() {
s := "abc"
fmt.Println(unidecode.Unidecode(s))
// Output: abc
s = "北京"
fmt.Println(unidecode.Unidecode(s))
// Output: Bei Jing
s = "kožušček"
fmt.Println(unidecode.Unidecode(s))
// Output: kozuscek
}
```