HeliBoard icon indicating copy to clipboard operation
HeliBoard copied to clipboard

CJKV character support (IMEs)

Open mvevitsis opened this issue 1 year ago • 6 comments
trafficstars

Is your feature request related to a problem? Please describe.

Can't type east asian languages

Describe the solution you'd like

Keyboard layouts/IMEs for Chinese (qwerty, 9 key) Japanese (qwerty, 12 key) Korean (dubeolsik, chungjin) Vietnamese (qwerty)

(All layouts with support for inputting chinese characters)

Use case

Type Chinese, Japanese, Korean, or Vietnamese

Describe alternatives you've considered

Additional context

mvevitsis avatar Jan 26 '24 07:01 mvevitsis

You can create layouts yourself. You do it in a text file and add it in the keyboard settings, more precisely in the "Languages & Layouts" option.

You can also copy an existing layout and simply change its characters by doing everything from the keyboard settings.

https://github.com/Helium314/openboard/blob/new/layouts.md

maruuk avatar Jan 26 '24 11:01 maruuk

A layout is not good enough. It needs an input method editor to convert the inputted text into the correct ideographs, which is beyond the scope of regular prediction dictionaries.

For example, if I type

zhongguo for Chinese ちゅうごく for Japanese 중국 for Korean Trung Quốc for Vietnamese

I should be able to get 中国 or 中國 depending on the locale (han unification has made this slightly annoying)

Vietnamese is more a nice to have, I am actually not sure if there is an android keyboard with chu nom support, but for the other three languages this is a standard feature of any keyboard.

mvevitsis avatar Jan 26 '24 11:01 mvevitsis

Dictionary files can be found at fcitx5-table-extra or awesome-rime.

The focus on high customisability guarantees that not only Vietnamese, but also other writing systems like Sawndip and Khitan would be made possible through this keyboard program.

I am not familiar with the “Dictionary” feature of this program. Maybe that's where the solution is.

GrimPixel avatar Feb 16 '24 18:02 GrimPixel

To support CJKV+, here are necessary steps:

  1. Replace the last character of an underlined string with a new character and keep the string underlined (Jamo -> Hangul, Dakuten/Handakuten + Kana -> Dakuon/Handakuon Kana) https://github.com/Helium314/HeliBoard/issues/214
  2. Underline a string that includes a space (chữ Quốc ngữ -> chữ Hán Nôm) or use another character to indicate a space instead.
  3. Replace an underlined string with a new string from dictionary candidates (Pinyin/etc. -> Hanzi, Hangul/Romaja -> Hanja, Kana/Romaji -> Kanji, chữ Quốc ngữ -> chữ Hán Nôm)

GrimPixel avatar Feb 22 '24 00:02 GrimPixel

Also see #639 for Japanese

PlexSheep avatar Apr 04 '24 21:04 PlexSheep

I think https://github.com/stroke-input/stroke-input-android can do the job. It's safe to copy its code, as both share the same license.

GrimPixel avatar May 21 '24 13:05 GrimPixel

Hi all. For Vietnamese there is usually 2 type of input that is popular. One is call VNI (Use Number) and the other call Telex.

Another user implement Telex method with this other open source Keyboard:

  1. https://github.com/florisboard/florisboard/issues?q=vietnamese
  2. florisboard/florisboard#2259
  3. florisboard/florisboard#183

The difference between the two is:

Telex use alphabet to create the "accent"/symbol/tone

For example adding: "s" will add the symbol '

as > á
os > ó

For VNI method it use Number (from 1 to 9 and 0) instead, all these number is allocate to a symbol, and pressing it will trigger that tone.

a1 > á
o1 > ó

You can read more about it here along with software and method to type it in Windows/Linux/macOS: https://yourvietnamese.com/learn-vietnamese/type-vietnamese/

UniKey (Windows software) is also Open Sources: https://www.unikey.org/en/

You can get the source code on his webpage: https://www.unikey.org/en/source.html

o-data avatar Jul 01 '24 02:07 o-data

Hi @thanhhocse96

Can you also do a Pull Request for HeliBoard?

o-data avatar Jul 01 '24 12:07 o-data

Could I asked about Heliboard approach on Vietnamese keyboard?

Florisboard approach is the bruteforce approach. So we made the whole bruteforce table to cover over 10,000 cases you could use on keyboard.

thanhhocse96 avatar Oct 16 '24 11:10 thanhhocse96

Could I asked about Heliboard approach on Vietnamese keyboard?

Florisboard approach is the bruteforce approach. So we made the whole bruteforce table to cover over 10,000 cases you could use on keyboard.

Wow you finally arrived @thanhhocse96 ! Let see if the big boss can assist @Helium314

o-data avatar Oct 18 '24 08:10 o-data

So I will explain the Frorisboard approach first: The Florisboard engine was developed to reuse for another language, not only for the Vietnamese only. So the engine simply call extensions.json to correct the user input.

For example: With the language Vietnamese was selected

  • User type: "as" -> Engine looked up in the bruteforce table and saw "as": "á" -> Engine made the correction on user input: "á"
  • User type: "ás" -> Engine looked up in the bruteforce table and saw "ás": "as" -> Engine made the correction on user input: "as"

So in that approach we not only make the case to display the vietnamese, but only make the "counter-case" when user don't want to write vietnamese telex. Eg: "cács" -> "cacs".

So the approach of Florisboard totally difference to Unikey, EVKey, IbusBamboo using for Vietnamese till now. So what we need to do is research and make the decision on what approach you should use for the keyboard.

thanhhocse96 avatar Oct 18 '24 10:10 thanhhocse96

I tried with the current HeliBoard and I don't think there any approach at the moment. The only way to type is to "long press" hold and choose the available symbol.

Alternatively is: hoping the "suggest word" to pop up on what you want.

o-data avatar Oct 19 '24 07:10 o-data

@thanhhocse96 I think you can just do a Pull Request and decide on the implementation?

A Beta was released but this #452 was forgotten. I see a few Pull Request was accepted.

https://github.com/Helium314/HeliBoard/releases/tag/v2.3-beta1

o-data avatar Jan 10 '25 08:01 o-data

I tried with the current HeliBoard and I don't think there any approach at the moment. The only way to type is to "long press" hold and choose the available symbol.

Alternatively is: hoping the "suggest word" to pop up on what you want.

Yes, I think that's unchanged from AOSP keyboard. At least I don't remember touching the Vietnamese keyboard (except migrating the layout format), and I don't think it was touched in OpenBoard.

A Beta was released but this #452 was forgotten.

I'm not sure what you mean by forgotten. It had the contributor needed label for almost a year. I don't speak any of Chinese, Japanese, Korean or Vietnames so I'm not really suited for adding such a keyboard.

Further I don't have any experience with combiners, and writing a new one will be necessary for implementing the proposed layouts. The only possible shortcut I see would be if the FlorisBoard combiner could be fitted into HeliBoard.

Helium314 avatar Jan 10 '25 21:01 Helium314

Further I don't have any experience with combiners, and writing a new one will be necessary for implementing the proposed layouts. The only possible shortcut I see would be if the FlorisBoard combiner could be fitted into HeliBoard.

I think @thanhhocse96 have an idea on how to do it but need your input or decision making?

o-data avatar Jan 14 '25 11:01 o-data