Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fumiama/emozi

Emoji-lized HanZi generator. ๐Ÿ‘๐Ÿšฌ๐Ÿง—๐Ÿ‘ค๐Ÿ•ธ๏ธ๐Ÿ˜๐Ÿง—โœ๏ธ๐Ÿ‘ˆ๐ŸŒž๐Ÿ˜จ๐Ÿ ๐ŸŒน๐Ÿงฆ๐Ÿ˜จ๐Ÿ‘ฅ๐ŸŒน๐Ÿ”๐Ÿ˜จ๐Ÿ’ฆโฌ…๏ธโ˜€๏ธ๐Ÿ˜จ๐Ÿก๐Ÿ’ฆ๐Ÿ’ก๐Ÿ‰๐ŸŒฑ๐Ÿต๐Ÿ’ก๐Ÿง—๐Ÿช“๐Ÿ†๐Ÿ‘”๐Ÿ˜จ๐Ÿถ
https://github.com/fumiama/emozi

Last synced: 16 days ago
JSON representation

Emoji-lized HanZi generator. ๐Ÿ‘๐Ÿšฌ๐Ÿง—๐Ÿ‘ค๐Ÿ•ธ๏ธ๐Ÿ˜๐Ÿง—โœ๏ธ๐Ÿ‘ˆ๐ŸŒž๐Ÿ˜จ๐Ÿ ๐ŸŒน๐Ÿงฆ๐Ÿ˜จ๐Ÿ‘ฅ๐ŸŒน๐Ÿ”๐Ÿ˜จ๐Ÿ’ฆโฌ…๏ธโ˜€๏ธ๐Ÿ˜จ๐Ÿก๐Ÿ’ฆ๐Ÿ’ก๐Ÿ‰๐ŸŒฑ๐Ÿต๐Ÿ’ก๐Ÿง—๐Ÿช“๐Ÿ†๐Ÿ‘”๐Ÿ˜จ๐Ÿถ

Awesome Lists containing this project

README

        

EMOZI

[![See My Viedo](https://img.shields.io/badge/%E5%8E%9F%E7%90%86%E8%AF%A6%E8%A7%81%E6%88%91%E5%8F%91%E5%B8%83%E7%9A%84%E8%A7%86%E9%A2%91-Bilibili-pink?style=for-the-badge)](https://www.bilibili.com/video/BV14K421y75F)

ๅ‚่€ƒๅคๅŸƒๅŠๅœฃไนฆไฝ“่ฎพ่ฎก็š„ไธ€็งๅŸบไบŽ้ขœๆ–‡ๅญ—็š„ๆฑ‰ๅญ—ๆŠฝ่ฑก่ฝฌๅ†™ๆณ•
๐Ÿ‘๐Ÿšฌ๐Ÿง—๐Ÿ‘ค๐Ÿ•ธ๏ธ๐Ÿ˜๐Ÿง—โœ๏ธ๐Ÿ‘ˆ๐ŸŒž๐Ÿ˜จ๐Ÿ ๐ŸŒน๐Ÿงฆ๐Ÿ˜จ๐Ÿ‘ฅ๐ŸŒน๐Ÿ”๐Ÿ˜จ๐Ÿ’ฆโฌ…๏ธโ˜€๏ธ๐Ÿ˜จ๐Ÿก๐Ÿ’ฆ๐Ÿ’ก๐Ÿ‰๐ŸŒฑ๐Ÿต๐Ÿ’ก๐Ÿง—๐Ÿช“๐Ÿ†๐Ÿ‘”๐Ÿ˜จ๐Ÿถ


## ๅ‘ฝไปค่กŒๅทฅๅ…ท
ไฝไบŽ`cmd`ๆ–‡ไปถๅคนใ€‚
```bash
็”จๆณ•: [-h|f|nr] [-db ๅญ—.db] [-d ๐ŸŒนโ€ช๐Ÿฑโข๐Ÿดโ€ญ๐Ÿ‘ฉ] [-e ๅฅฝ] ๅฝขๅฃฐๅญ—้€‰ๆ‹ฉ1 ๅฝขๅฃฐๅญ—้€‰ๆ‹ฉ2 ...
-a string
ๆทปๅŠ ไธ€ไธชๆฑ‰ๅญ—ๅˆฐ้™„ๅŠ ๅบ“
-d string
่งฃ็ ้ขœๆ–‡ๅญ—ไธบๆฑ‰ๅญ—ๅบๅˆ—
-db string
็ฌฆๅˆ่ง„่Œƒ็š„ๆŸฅ่ฏขๆ•ฐๆฎๅบ“ไฝ็ฝฎ, ไธๅญ˜ๅœจๅˆ™ไผš่‡ชๅŠจ้‡Šๆ”พๅˆฐ่ฏฅ่ทฏๅพ„. (default "ๅญ—.db")
-deloverlay int
ๅˆ ้™คไธ€ไธช้™„ๅŠ ๅบ“ไธญ็š„ๅญ—
-delradical
ๅˆ ้™ค-rๆŒ‡ๅฎš็š„้ƒจ้ฆ–็š„่ฎฐๅฝ•
-e string
็ผ–็ ๆฑ‰ๅญ—ๅบๅˆ—ไธบ้ขœๆ–‡ๅญ—
-f ๅผบๅˆถ่งฃ็ ๅนถ้ž็”ฑๆœฌ็จ‹ๅบ็”Ÿๆˆ็š„้ขœๆ–‡ๅญ—ๅบๅˆ—
-h ๆ˜พ็คบๅธฎๅŠฉไฟกๆฏ
-i ๆŒ‡ๅฎšๆฑ‰ๅญ—-aๅ’Œๅธฆๅฃฐ่ฐƒ็š„ๆ‹ผ้Ÿณ-pไปฅ่ฎก็ฎ—ๅ…ถๅ…จๅฑ€ๅ”ฏไธ€ID
-nr
ไธ้šๆœบ้€‰ๅ–ๆ‰€ๆœ‰่ฏป้Ÿณ็›ธ่ฟ‘็š„้ขœๆ–‡ๅญ—
-p string
ๅธฆๅฃฐ่ฐƒ็š„ๆ‹ผ้Ÿณ
-r string
ๆŒ‡ๅฎšๆฌฒ็ผ–่พ‘็š„้ƒจ้ฆ–
-re string
ๆŒ‡ๅฎš้ƒจ้ฆ–ๅฏนๅบ”็š„้ขœๆ–‡ๅญ—
-stabilize int
ๅ›บๅฎš้™„ๅŠ ๅบ“ไธญ็š„ๅญ—ๅˆฐไธปๅบ“
```
ไธ‹้ขๆ˜ฏไธ€ไบ›็”จไพ‹ใ€‚
### ่ฎก็ฎ—ไธ€ไธชๅญ—็š„ๅ›ฝ้™…้Ÿณๆ ‡ใ€้ƒจ้ฆ–ใ€ๅ…จๅฑ€ID
> ่ฏฅ่ฎก็ฎ—ไธๆŸฅๆ•ฐๆฎๅบ“, ๅฎŒๅ…จไธŽๆ•ฐๆฎๅบ“ๆ— ๅ…ณ.
```bash
go run cmd/main.go -i -a ๅ“ฆ -p o
ๆ–‡ๅญ—: ๅ“ฆ ๆ‹ผ้ŸณIPA: 0 ษ” ่ฝปๅฃฐ ID: 93346820784388
็จ‹ๅบๅค„็†็ป“ๆŸ
```
### ๆŸฅ่ฏขๅบ“ไธญ่ฎฐๅฝ•็š„ๅญ—็š„ไฟกๆฏ
```bash
go run cmd/main.go -a ่กŒ
ๆŸฅ่ฏขๅˆฐๆฑ‰ๅญ— ่กŒ ็š„่ฎฐๅฝ•:
0) #149859999752449 ่กŒ [ษ•, iล‹, ้˜ณๅนณ] ไปŽ่กŒ xing xรญnษก
1) #149859999554817 ่กŒ [x, ษ‘ล‹, ้˜ณๅนณ] ไปŽ่กŒ hang hรกng
็จ‹ๅบๅค„็†็ป“ๆŸ
```
### ็ผ–็ 
> ๆณจๆ„: ๅฏไปฅๆŒ‡ๅฎš`-nr`ๅ‚ๆ•ฐไปŽ่€Œไฝฟ็ผ–่งฃ็ ็ป“ๆžœๅ”ฏไธ€ใ€‚
```bash
go run cmd/main.go -e ๅฅฝ
็ผ–็ ็ป“ๆžœ: ๐ŸŒนโ€ช๐Ÿฑโข๐Ÿดโ€ญ๐Ÿ‘ฉ
็จ‹ๅบๅค„็†็ป“ๆŸ
```
### ่งฃ็ 
```bash
go run cmd/main.go -d ๐ŸŒนโ€ช๐Ÿฑโข๐Ÿดโ€ญ๐Ÿ‘ฉ
่งฃ็ ็ป“ๆžœ: ๅฅฝ
็จ‹ๅบๅค„็†็ป“ๆŸ
```
### ๆทปๅŠ ไธ€ไธชๅญ—ๅˆฐ้™„ๅŠ ๅบ“
```bash
go run cmd/main.go -e ็š„
็ผ–็ ็ป“ๆžœ: ็š„โ€ฌ๐Ÿˆณโญ๐Ÿˆณโค๐Ÿˆณ
็จ‹ๅบๅค„็†็ป“ๆŸ

go run cmd/main.go -a ็š„ -p de -r ๆ—ฅ -re ๐ŸŒž
ๅทฒๆทปๅŠ ๆฑ‰ๅญ—: ็š„ ่ฏป้Ÿณ: t, ษค, ่ฝปๅฃฐ ้ƒจ้ฆ–: ๆ—ฅ ID: 130309308023300
ๅทฒๆทปๅŠ ้ƒจ้ฆ–: ๆ—ฅ ้ขœๆ–‡ๅญ—: ๐ŸŒž
ๆŸฅ่ฏขๅˆฐๆฑ‰ๅญ— ็š„ ็š„่ฎฐๅฝ•:
0) #130309308023300 ็š„ [t, ษค, ่ฝปๅฃฐ] ไปŽๆ—ฅ de de
็จ‹ๅบๅค„็†็ป“ๆŸ

go run cmd/main.go -e ็š„
็ผ–็ ็ป“ๆžœ: ๐Ÿ”ชโ€ฌ๐Ÿ˜‹โ€ญ๐Ÿ˜ฏโ€๐ŸŒž
็จ‹ๅบๅค„็†็ป“ๆŸ
```
### ๆŒ‡ๅฎšๅคš้Ÿณๅญ—
```bash
go run cmd/main.go -e ไฝ ๅฅฝ๏ผŒไธ–็•Œ๏ผ็œ‹็œ‹ๅคš้Ÿณๅญ—๏ผš่กŒใ€‚
็ผ–็ ็ป“ๆžœ: ๐Ÿฅ›โฉ๐Ÿ‘”โจ๐Ÿดโ€๐Ÿ‘ค๐ŸŒธ๐Ÿฑ๐Ÿด๐Ÿ‘ฉ๏ผŒ๐Ÿ“™โ˜€๏ธ๐Ÿ˜จ๐ŸŒ๐Ÿฆถ๐Ÿ‘ด๐Ÿ˜จ๐Ÿ‘จโ€๐ŸŒพ๏ผ๐Ÿ‘–๐Ÿ”๐Ÿ‰๐Ÿ‘๏ธ๐Ÿ˜ญ๐Ÿ”๐Ÿ‰๐Ÿ‘๏ธ๐Ÿซ˜๐ŸŒ€๐Ÿ‰๐Ÿชฉ๐Ÿ’Š๐ŸŽต๐Ÿ‰๐ŸŽตโฌ…๐ŸŒ…๐Ÿ˜จ๐Ÿšผ๏ผš[โœจ๐Ÿฆ…๐Ÿง—โ€โ™‚๏ธโ›•|๐Ÿต๐Ÿ‘๐Ÿง—โ€โ™‚๏ธโ›•]ใ€‚
ๅฏ้€‰ๅฝขๅฃฐ: [2]
ๅœจๅ‚ๆ•ฐไธญๆŒ‡ๅฎšๅฝขๅฃฐๅญ—็ผ–ๅท(ไปŽ0ๅผ€ๅง‹)ไปฅ็”Ÿๆˆไธๅธฆไธญๆ‹ฌๅท็š„็ผ–็ ็ป“ๆžœ
็จ‹ๅบๅค„็†็ป“ๆŸ

go run cmd/main.go -e ไฝ ๅฅฝ๏ผŒไธ–็•Œ๏ผ็œ‹็œ‹ๅคš้Ÿณๅญ—๏ผš่กŒใ€‚ 1
็ผ–็ ็ป“ๆžœ: ๐Ÿฅ›โญ๐Ÿ‘”โจ๐Ÿดโช๐Ÿ‘ค๐ŸŒผ๐Ÿ˜บ๐Ÿด๐Ÿ‘ฉ๏ผŒ๐Ÿ”๏ธ๐ŸŒ…๐Ÿ˜จ๐ŸŒโž–๐Ÿ‘ด๐Ÿ˜จ๐Ÿ‘จโ€๐ŸŒพ๏ผ๐Ÿ‘–๐Ÿ”๐Ÿ‰๐Ÿ‘๏ธ๐Ÿ‘–๐Ÿ”๐Ÿ‰๐Ÿ‘๏ธ๐Ÿ”ช๐ŸŒ€๐Ÿ‰๐Ÿชฉ๐Ÿฆท๐ŸŽต๐Ÿ‰๐ŸŽตโฌ…โ˜€๏ธ๐Ÿ˜จ๐Ÿšผ๏ผš๐Ÿ”ฅ๐Ÿ‘๐Ÿง—โ›•ใ€‚
็จ‹ๅบๅค„็†็ป“ๆŸ

go run cmd/main.go -d "๐Ÿฅ›โญ๐Ÿ‘”โจ๐Ÿดโช๐Ÿ‘ค๐ŸŒผ๐Ÿ˜บ๐Ÿด๐Ÿ‘ฉ๏ผŒ๐Ÿ”๏ธ๐ŸŒ…๐Ÿ˜จ๐ŸŒโž–๐Ÿ‘ด๐Ÿ˜จ๐Ÿ‘จโ€๐ŸŒพ๏ผ๐Ÿ‘–๐Ÿ”๐Ÿ‰๐Ÿ‘๏ธ๐Ÿ‘–๐Ÿ”๐Ÿ‰๐Ÿ‘๏ธ๐Ÿ”ช๐ŸŒ€๐Ÿ‰๐Ÿชฉ๐Ÿฆท๐ŸŽต๐Ÿ‰๐ŸŽตโฌ…โ˜€๏ธ๐Ÿ˜จ๐Ÿšผ๏ผš๐Ÿ”ฅ๐Ÿ‘๐Ÿง—โ›•ใ€‚"
่งฃ็ ็ป“ๆžœ: [ไฝ |ๅ„—]ๅฅฝ๏ผŒไธ–[็•Œ|็•]๏ผ็œ‹็œ‹ๅคš้Ÿณๅญ—๏ผš่กŒใ€‚
็จ‹ๅบๅค„็†็ป“ๆŸ
```

## ไฝœไธบๅบ“ๅผ•็”จ
### ็‰นๅˆซๆณจๆ„
ๆœฌ`package`ไฝฟ็”จไบ†่‡ชไฟฎๆ”น็š„`modernc.org/sqlite`ๆ•ฐๆฎๅบ“๏ผŒๅฆ‚ๆฌฒๅผ•ๅ…ฅๆœฌๅŒ…๏ผŒ้œ€่ฆๅœจ`go.mod`ๆทปๅŠ ๅฆ‚ไธ‹ๆ›ฟๆข้กนใ€‚
```bash
replace modernc.org/sqlite => github.com/fumiama/sqlite3 v1.20.0-with-win386

replace github.com/remyoudompheng/bigfft => github.com/fumiama/bigfft v0.0.0-20211011143303-6e0bfa3c836b
```
### ๆ‹ผ้Ÿณ่ฏ†ๅˆซๆ‹†ๅˆ†
ๅฐ†ๅธฆๅฃฐ่ฐƒ็š„ๆ‹ผ้Ÿณๆ‹†ๅˆ†ไธบไปฅๅ›ฝ้™…้Ÿณๆ ‡่กจ็คบ็š„ๅฃฐๆฏ้Ÿตๆฏใ€‚
```go
s, y, t, err := emozi.SplitPinyin("jiว’ng")
if err != nil {
panic(err)
}
fmt.Println(s, y, tone) // tษ• iฬฏสŠล‹ ไธŠๅฃฐ
```
### ๆŸฅๆฑ‰ๅญ—
ๆŸฅไธ€ไธชๆฑ‰ๅญ—ๅœจๆ•ฐๆฎๅบ“ไธญ็š„่ฎฐๅฝ•ใ€‚
```go
coder, err := emozi.NewCoder(time.Minute)
if err != nil {
panic(err)
}
defer coder.Close()
lst, err := coder.Lookup('่กŒ')
if err != nil {
panic(err)
}
fmt.Println("ๆŸฅ่ฏขๅˆฐๆฑ‰ๅญ— ่กŒ ็š„่ฎฐๅฝ•:")
for i, x := range lst {
fmt.Printf("%d)\t%s\n", i, x)
}
/*
ๆŸฅ่ฏขๅˆฐๆฑ‰ๅญ— ่กŒ ็š„่ฎฐๅฝ•:
0) #149859999752449 ่กŒ [ษ•, iล‹, ้˜ณๅนณ] ไปŽ่กŒ xing xรญnษก
1) #149859999554817 ่กŒ [x, ษ‘ล‹, ้˜ณๅนณ] ไปŽ่กŒ hang hรกng
*/
```