openvanilla / McBopomofo

小麥注音輸入法
http://mcbopomofo.openvanilla.org/
MIT License
615 stars 76 forks source link

[功能建議] Allow user-defined phrase frequency #498

Open xatier opened 2 months ago

xatier commented 2 months ago

痛點

I'd like to allow (optional) user-defined phrase frequency in the user's dictionary data.txt.

For instance, if I'd like to add this emoji 🎊 ㄍㄨㄥ-ㄒㄧˇ, I wish to have lower priority than 恭喜. Currently, the user dictionary ensures user-defined phrases have the highest priority and always shows 🎊 before 恭喜. Unless the engine has the temporary memory of user selections at the time.

功能說明

Allow optional 3rd field in data.txt. Keep the current behavior of top priority if this filed is not present.

🎊 ㄍㄨㄥ-ㄒㄧˇ -8 would make 🎊 to have the same phrase frequency as other emojis and to be on the bottom of the list. 🎊 ㄍㄨㄥ-ㄒㄧˇ ensures 🎊 to stay on the top of the list.

In addition to emojis, this also enables users to adjust/override the default frequency (/usr/share/fcitx5/data/mcbopomofo-data.txt) of certain words/phrases with their preferences permanently.

Related:

https://github.com/openvanilla/McBopomofo/issues/461 https://github.com/openvanilla/fcitx5-mcbopomofo/issues/144