Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kaomoji): 添加opencc转换的颜文字 #920

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

klchen0112
Copy link

@klchen0112 klchen0112 commented Jun 13, 2024

  1. 测试了仓输入法商店版本和MacOS Squirrel 1.0.2,全拼功能正常。双拼方案我不太了解,但应该没问题。
  2. 颜表情中空格使用U+2002
  3. 部分kaomoji来自 rime_kaomoji_dict

@ClixTW
Copy link

ClixTW commented Jun 19, 2024

測試了一下,
OpenCC裡空格會被當作分詞,
所以不少表情因為含有空格,一個表情被分成了好幾個候選詞而不完整,
用OpenCC實現的話,或許得改用特殊空格,不確定這樣實用性如何就是了。

@klchen0112
Copy link
Author

測試了一下, OpenCC裡空格會被當作分詞, 所以不少表情因為含有空格,一個表情被分成了好幾個候選詞而不完整, 用OpenCC實現的話,或許得改用特殊空格,不確定這樣實用性如何就是了。

以为这种给我删除干净了。这个确实有点问题,但是用特殊空格的话不知道能不能在所有情况下正常显示。我看看有没有其他解决办法。或者先直接删除所有带空格的颜表情?

@ClixTW
Copy link

ClixTW commented Jun 20, 2024

建議先別折騰😅
除非能解決空格 & 映射與emoji撞車的問題 #462
我自己是精挑了一些常用的,放到custom_phrase.txt來實現,並用v開頭的編碼。
其實效果還不錯,不會影響到平時打字,有剛需的話可以試試。

@klchen0112 klchen0112 marked this pull request as draft June 20, 2024 06:00
@klchen0112
Copy link
Author

建議先別折騰😅 除非能解決空格 & 映射與emoji撞車的問題 #462 。 我自己是精挑了一些常用的,放到custom_phrase.txt來實現,並用v開頭的編碼。 其實效果還不錯,不會影響到平時打字,有剛需的話可以試試。

替换成U+2002是能正常的。我的平台是Squirrel 1.0.2。至于和这个emoji重合,至少我测试 高兴哈哈 是没问题的。

@klchen0112
Copy link
Author

大部分应该没问题了。但我没有仔细校对。

@klchen0112
Copy link
Author

我测试了仓输入法商店版本和MacOS Squirrel 1.0.2。emoji和颜表情重合问题并没有出现。颜表情空格也能正常输出。但我没有windows和安卓设备,这两个我无法测试。

@klchen0112 klchen0112 marked this pull request as ready for review June 21, 2024 01:39
@mirtlecn
Copy link
Collaborator

mirtlecn commented Jun 23, 2024

为啥用 U+2002(en space)而不是 U+0020(space)

update:作为一个 new feature 看起来不错,不过要测测 ibus 和 fcitx 等其他前端上能不能正常工作

@klchen0112
Copy link
Author

为啥用 U+2002(en space)而不是 U+0020(space)

update:作为一个 new feature 看起来不错,不过要测测 ibus 和 fcitx 等其他前端上能不能正常工作

  1. 一个表情里如果包含空格。用U+2002会使得如✧(≖ ◡ ≖✿)被划分成✧(≖、◡、≖✿)三个表情。估计是opencc用U+2002作为划分依据的问题。
  2. 测试的话要看有没有人愿意测试了。

@Mikachu2333
Copy link
Contributor

我个人是通过字典来解决的,直接挂载了一个字典,自制的字典就一点点,下面直接放出来吧,目前用着没发现啥大问题

---
name: kaomoji
version: "2024.03.19"
sort: origin
use_preset_vocabulary: true
...

(.. )	kmjbs	1
(ノへ`、)	kmjbs	1
m(_ _)m	kmjbs	1
o(TヘTo)	kmjbs	1
( *・ω・)✄╰ひ╯	kmjgg	1
( ′Д`)彡	kmjgg	1
(。﹏。*)	kmjgg	1
(⊙﹏⊙)	kmjgg	1
(☄⊙ω⊙)☄	kmjgg	1
(ρ_・).。	kmjgg	1
┗|`O′|┛ ~~~	kmjgg	1
◐▽◑	kmjgg	1
◑▂◐	kmjgg	1
ヾ(´・ω・`)ノ	kmjgg	1
o(* ̄3 ̄)o	kmjgg	1
ʅ(´◔౪◔)ʃ	kmjgg	1
Ψ( ̄∀ ̄)Ψ	kmjgg	1
( ゚∀゚) ノ♡	kmjgx	1
(。・∀・)ノ	kmjgx	1
(*^▽^*)	kmjgx	1
(≧∀≦)ゞ	kmjgx	1
(≧∇≦)ノ	kmjgx	1
(๑•̀ㅂ•́)و✧	kmjgx	1
<(* ̄▽ ̄*)/	kmjgx	1
≧▽≦	kmjgx	1
o(* ̄︶ ̄*)o	kmjgx	1
o(* ̄▽ ̄*)o	kmjgx	1
o(^▽^)o	kmjgx	1
φ(≧ω≦*)♪	kmjgx	1
ㄟ(≧◇≦)ㄏ	kmjgx	1
(つД`)	kmjhp	1
(* /ω\*)	kmjhx	1
ˊㅅˋ	kmjhx	1
o(*////▽////*)q	kmjhx	1
つ﹏⊂	kmjhx	1
_〆(´Д` )	kmjuq	1
( ╯-_-)╯~┴—┴	kmjuq	1
╧═╧╰(`□′╰)	kmjuq	1
o( ̄ヘ ̄o#)	kmjuq	1
( ・ˍ・)	kmjvj	1
(#°Д°)	kmjvj	1
(°⌓°;	kmjvj	1
(゚Д゚≡゚д゚)!?	kmjvj	1
¯\_(౦▾౦ ✿)¯\_	kmjvj	1
∑(゚д゚;)	kmjvj	1
⊙.⊙	kmjvj	1
⊙▾⊙	kmjvj	1
o((⊙﹏⊙))o.	kmjvj	1
w(゚Д゚)w	kmjvj	1
ζ*'ヮ')ζ	kmjvj	1
Σ(っ °Д °;)っ	kmjvj	1
( *⊙~⊙)	kmjwy	1
(* ̄(エ) ̄)	kmjwy	1
(´・_・`)	kmjwy	1
(゚ー゚)	kmjwy	1
(lll¬ω¬)	kmjwy	1
(눈▂눈)	kmjwy	1
~~( ﹁ ﹁ ) ~~~	kmjwy	1
┌( ´_ゝ` )┐	kmjwy	1
┑( ̄Д  ̄)┍	kmjwy	1
٩ (ˊ〇ˋ*)و	kmjkj	1
ZZz... (¦3ꇤ [▓▓]	kmjkj	1
(-.-)..zzZZ	kmjkj	1
(o-ωq )).oO	kmjkj	1

@klchen0112
Copy link
Author

Opencc方案主要是能一次性解决双拼的问题。我日用是宫保拼音,宫保拼音就没法实现类似功能了。

@Mikachu2333
Copy link
Contributor

Opencc方案主要是能一次性解决双拼的问题。我日用是宫保拼音,宫保拼音就没法实现类似功能了。

那这个我就没办法了 ◐▽◑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants