-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Feature request: Add Korean Cheonjiin input #454
Comments
And hello to you! I have nearly zero knowledge about the language. I only know you combine dots and letters to form vowels and consonants, but how it all works is beyond me. Could you please point me to an article, preferably something wiki-like, where I can first educate myself? Or, if you can explain how letters are built and what to put on each key, it would be even better. Also, have in mind including Korean may not happen so soon. As you can see, many other bugs and features are in the queue. |
Thanks heaps for replying, you've made me think about how this actually
works which as a native I haven't really thought about. I'm okay
with waiting, I don't expect this to be implemented as it's so different to
alphabet based languages.
We might start with how Korean works.
[image: image.png]
That is what the standard Chunjiin keypad looks like.
1 =ㅣ, 2 = dot, 3 = ㅡ and these make the vowels which will be explained
below.
4 ~ 0 = Consonants
* = changes between Korean, English, numbers, and symbols. (My phone also
has a vibration mode switch (long press) but I don't expect other phones to
be the same)
# = Equivalent to right arrow (->) on other phones with physical keypads.
There are 21 vowels:
ㅏ,ㅐ,ㅑ,ㅒ,ㅓ,ㅔ,ㅕ,ㅖ,ㅗ,ㅘ,ㅙ,ㅚ,ㅛ,ㅜ,ㅝ,ㅞ,ㅟ,ㅠ,ㅡ,ㅢ,ㅣ
You are correct about combining dots to other letters to write them.
Combining follows the order that would either go left to right, or top to
bottom. This is the same method for writing each complete syllable
(explained later).
All vowels can be broken down into 'sticks' (1 = ㅣ, 3 = ㅡ) and dots (2).
I'll list all vowels as examples are the best:
ㅏ = ㅣ(1) + dot (2)
ㅐ = ㅣ(1) + dot (2) + ㅣ(1)
ㅑ = ㅣ(1) + dot (2) + dot (2)
ㅒ = ㅣ(1) + dot (2) + dot (2) + ㅣ(1)
ㅓ = dot(2) + ㅣ(1)
ㅔ = dot(2) + ㅣ(1) + ㅣ(1)
ㅕ = dot(2) + dot(2) + ㅣ(1)
ㅖ = dot(2) + dot(2) + ㅣ(1) + ㅣ(1)
ㅗ = dot(2) + ㅡ(3)
ㅘ = dot(2) + ㅡ(3) + ㅣ(1) + dot (2)
ㅙ = dot(2) + ㅡ(3) + ㅣ(1) + dot (2) + ㅣ(1)
ㅚ = dot(2) + ㅡ(3) + ㅣ(1)
ㅛ = dot(2) + dot(2) + ㅡ(3)
ㅜ = ㅡ(3) + dot(2)
ㅝ = ㅡ(3) + dot(2) + dot(2) + ㅣ(1)
ㅞ = ㅡ(3) + dot(2) + dot(2) + ㅣ(1) + ㅣ(1)
ㅟ = ㅡ(3) + dot(2) + ㅣ(1)
ㅠ = ㅡ(3) + dot(2) + dot(2)
ㅡ = ㅡ(3)
ㅢ = ㅡ(3) + ㅣ(1)
ㅣ = ㅣ(1)
Keys from 4 to 0 are all consonants, and typing them should be fairly
obvious:
ㄱ = 4
ㅋ = 44
ㄴ = 5
ㄹ = 55
And so on..
But note that while it's not shown on the keyboard, there are 'double'
consonants that need to be explained.
They are all listed below:
ㄲ= 444 (NOT ㄱ(4) + space(#) + ㄱ(4) !!!)
ㄸ= 666
ㅃ= 777
ㅆ= 888
ㅉ= 999
Let's start with an example:
If you want to write a word, you would divide it into each syllable.
For example:
Computer = com pu ter = 컴퓨터 (each of these complex looking characters are a
syllable)
Korean is always written and(typed) in this order: Starting consonant -
vowel - ending consonant (if there is one).
This is actually the same in English, using syllable 'com' as an example: C
- O - M
As you can see from the 'computer' example. Korean has vowels that can be
placed in two locations:
컴 : has a vowel (ㅓ) placed on the left of the starting consonant (ㅋ)
퓨: has a vowel (ㅠ) placed on the bottom of the starting consonant (ㅍ)
These are the only places that vowels go, and these are decided by the fact
if they are vertical or horizontal. If a vowel includes ㅣ(1) , this is a
vertical vowel. And if it includes ㅡ(3) this is a horizontal vowel. There
are vowels that have both (e.g. ㅢ), and these just go in both locations
(e.g. 의).
Notice how the syllable 'com' has a starting consonant (c) and an ending
consonant(m). Syllable 'pu' only has a starting consonant and a vowel.
Don't worry about 'ter' because 'er' doesn't really have an equivalent in
Korean.
Now these ending consonants go at the bottom of each syllable as you can
see in com(컴).
컴 = 44 2 1 00
The tricky part is deciding whether the ending consonant is the starting
consonant for the next syllable. I'm a mechanical engineer with little
coding skills but I think this is a spot for an if statement that goes
something like:
if (the next typed letter is a vowel (keys 123)):
Make that ending consonant the starting consonant of the next syllable.
This would mean that words like 애플 would type properly. Not 앺ㅡㄹ. (012177355)
There are 28 ending consonants (some of them are double):
ㄱ, ㅋ, ㄲ, ㄳ, ㄺ, ㄴ, ㄵ, ㄶ, ㄷ,ㅌ,ㅅ,ㅆ,ㅈ,ㅊ,ㅎ,ㄹ,ㄽ,ㄾ,ㅀ,ㅁ,ㄻ,ㅂ,ㅍ,ㄼ,ㄿ, ㅄ, ㅇ.
A syllable would a double ending consonants would look like: 앎 (0125500).
The right arrow (->) key (#) has an important role in the Chunjiin method.
This is actually the reason this method isn't the best designed, but it is
the most popular T9 method thanks to Samsung distributing it on their
phones.
Example: Typing 안녕.
This would be 012552210. The problem is that you can easily type 아령 due to
55 in the middle. This is when you would type it like 0125#52210 in order
to prevent two ㄴ(5)s turning into ㄹ.
If there is a tip that I can think of while testing if this works, while it
is allowed to write standalone vowels (such as ㅏ on its own) in Korean
especially in texting. When writing proper words, if a vowel ends up being
standalone in the middle of a word, then it would indicate that you've
either typed it wrong, or there is a bug. I'd be happy to help with testing
since this is my request anyway.
Using previous examples: 안ㄴㅕㅇ All of the syllables would build nicely
into chunks. This should type as 안녕
: 앺ㅡㄹ This too would need
to build into chunks. This should type as 애플.
Wowzers this was actually challenging to explain. It'd be awesome if this
can happen!
…On Sat, Mar 9, 2024 at 7:19 AM Dimo Karaivanov ***@***.***> wrote:
And hello to you!
I have nearly zero knowledge about the language. I only know you combine
dots and letters to form vowels and consonants, but how it all works is
beyond me. Could you please point me to an article, preferably something
wiki-like, where I can first educate myself? Or, if you can explain how
letters are built and what to put on each key, it would be even better.
Also, have in mind including Korean may not happen so soon. As you can
see, many other bugs and features are in the queue.
—
Reply to this email directly, view it on GitHub
<#454 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGZKLFRKTVYBJUJSC7M6TVLYXH6KVAVCNFSM6AAAAABEMVVID6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWGE4DKNBVGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
"ㄹ = 55" isn't obvious. I would have thought this is 45, because it looks like a combination of "ㄱ = 4" and "ㄴ = 5". Anyway, I've tried out Korean with Gboard and it seems to work exactly according to your explanations. I should be able to use it for reference later on. I have more questions though. Do we want to keep the current functionality of holding a number key to type a number? If so, how do you type punctuation and other special characters? The only way I see it is, typing numbers is only possible in 123 mode, and holding 0-key and 1-key will show the special character lists (as if 0 or 1 were single-pressed in English). Or is there another way? As for typing letters, I have only one concern. Currently, the entire app is designed to handle only the numeric keys for typing. All others are considered functional keys and pressing them results in performing some predefined action. The actions are listed when you configure the hotkeys. Typing Korean will definitely require a new input mode, as it doesn't fit the current Predictive or ABC which are designed for European languages. And rerouting one more key to serve as Korean space, instead of the current space on 0-key, is not a problem. The thing is, on a standard keypad, the only available extra keys are I believe the functions on A potential solution is dropping the Add Word functionality (well, just unassigning it from the Settings). It won't be necessary, because in Korean one always types letter-by-letter. Or it could be the "Show Settings" function, but I think it would be more useful. Then, I could add an extra "Korean Break Word" or "Korean Space" function, which could be assigned from the Hotkeys settings to whatever physical key you like. The thing is, I don't like the idea. It is a very special exception to general workflow. Having said all he above, I'm open to other suggestions, how to fit the two extra letters and the Spacebar on the keypad. And finally, the on-screen virtual keypad must also be redesigned, but it should be easier. I guess I'll replace the hardcoded "?" with space and "!" will be the special character key. |
You are correct about not being able to type punctuation on Korean mode.
Chunjiin always comes with the ability to type English (alphabet). The
modes are changed by using * button.[image: 스크린샷 2024-03-09 081007.png]
See how they have two buttons (!#1, 한/영) where * on a physical T9 keypad
would be. On a physical keypad where they can't have two buttons split as
you can see in the picture, * is the change mode button which would change
the mode from Korean-Alphabet-123-Symbols(punctuations). Note that changing
from Korean to English is possible by just short pressing *.
I see that we have two actions we can do with #. Short pressing changes the
mode, and long press changes the language. Would it be possible to combine
that feature so you can change the mode and the language just by short
pressing it? Whether that is * or # does not matter as the hotkeys can be
customized.
For example: just by short pressing * (or #). This will go Language1-
Language 2- 123- Symbols. Monolinguals won't be affected, as if they only
have 1 language installed, this will skip over language 2. Bilinguals will
appreciate it more as this means that they can switch between languages
faster.
So in essence, what I'm suggesting is the ability to customize the sequence
of 'switch mode' buttons. This will free up * (or#) long press.
I am not sure about how the backend of the app works, but you could have
another version of hotkey assignment that will only become active when you
are in a particular language mode. So, basically an option to have more
than one preset hotkeys to go with different languages. This might open up
the ability to add more languages in the future (if that is what you want).
So this is what it would look like under settings:
Languages > have a list of available languages > Language 1 > Hotkeys 1,
load dictionary, maybe a setting specific to language 1 etc...
Language 2 > Hotkeys 2, load dictionary, maybe a setting specific to
language 2 etc...
And under Hotkeys 2, maybe a function to match the Hotkeys 1 settings.
That's pretty much my suggestion 1.
As for another suggestion..
You're right about Korean not needing word predictions. This means that it
does not need <- and -> buttons. If we assign the -> button as "korean
space" then we can leave # as is. Potential problem could be not being able
to press the 'send' button in messengers. I see that we have a "press ok to
send in FB messenger" which can be expanded to other apps.
Which brings me to bugs. In facebook messenger, when I press ok it doesn't
send. The ok button acts like "enter" on a normal keyboard. Also, I think
it will be nice for the app to just start typing without me pressing on the
chat bubble. As of the moment, if I click on a chat:
1. Click on a chat (which is glitchy on its own, but I think that's FB
messenger issue not yours)
2. Click on the bottom of the screen to select the 'reply area'
3. Type
4. Press -> button to select send as "ok" button just acts like 'enter'
5. actually press send using the ok button.
Thank you for your effort. By the way, the English part of the app is
awesome.
…On Sat, Mar 9, 2024 at 10:10 PM Dimo Karaivanov ***@***.***> wrote:
Keys from 4 to 0 are all consonants, and typing them should be fairly
obvious:
ㄱ = 4
ㅋ = 44
ㄴ = 5
ㄹ = 55
"ㄹ = 55" isn't obvious. I would have thought this is 45, because it looks
like a combination of "ㄱ = 4" and "ㄴ = 5". Anyway, I've tried out Korean
with Gboard and it seems to work exactly according to your explanations. I
should be able to use it for reference later on.
I have more questions though. Do we want to keep the current functionality
of holding a number key to type a number? If so, how do you type
punctuation and other special characters? The only way I see it is, typing
numbers is only possible in 123 mode, and holding 0-key and 1-key will show
the special character lists (as if 0 or 1 were single-pressed in English).
Or is there another way?
As for typing letters, I have only one concern. Currently, the entire app
is designed to handle only the numeric keys for typing. All others are
considered functional keys and pressing them results in performing some
predefined action. The actions are listed when you configure the hotkeys.
Typing Korean will definitely require a new input mode, as it doesn't fit
the current Predictive or ABC which are designed for European languages.
And rerouting one more key to serve as Korean space, instead of the current
space on 0-key, is not a problem. The thing is, on a standard keypad, the
only available extra keys are #, *, and they are already taken. By
default, pressing * opens the Settings, holding it adds a word to the
dictionary; pressing # changes the typing mode (this means either switch
to ABC/123/Predictive, or change the text case) and holding it changes the
language.
I believe the functions on # are a must-have.
A potential solution is dropping the Add Word functionality (well, just
unassigning it from the Settings). It won't be necessary, because in Korean
one always types letter-by-letter. Or it could be the "Show Settings"
function, but I think it would be more useful. Then, I could add an extra
"Korean Break Word" or "Korean Space" function, which could be assigned
from the Hotkeys settings to whatever physical key you like. The thing is,
I don't like the idea. It is a very special exception to general workflow.
Having said all he above, I'm open to other suggestions, how to fit the
two extra letters and the Spacebar on the keypad.
And finally, the on-screen virtual keypad must also be redesigned, but it
should be easier. I guess I'll replace the hardcoded "?" with space and "!"
will be the special character key.
—
Reply to this email directly, view it on GitHub
<#454 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGZKLFR4W6Y3VJ7NNJBL7CDYXLGYBAVCNFSM6AAAAABEMVVID6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWHAYDEMRQGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Attachments from emails appear corrupted here. I can not see the image. Nevertheless, I think I got the idea. I'll consider all the ideas and information you have shared, but honestly, I don't want to do too many customizations, because no other language needs them, and because such code usually becomes hard to maintain as the everything around it evolves. I'll think about it and figure out the best course of action, when I get back to Korean.
The physical keys move the text cursor to the left and right. When the cursor is at the edge of a text field, they select the closest button or menu item. This is crucial for phones without touchscreen. And even on the rest of them, it is quite useful. I even intend to add the same functionality to the on-screen keyboard.
Perhaps, you misunderstood how the option works? See the manual for v29.0, in particular, the OK key section and the Compatibility section. If you still think something is not right, please create a new issue. I would like to keep the board tidy and have each problem in a separate issue. |
Just wanted to bump this up. As an expat living in Korea with an Android flip phone, having this functionality would be a dream. Maybe I can look into this myself when I have some free time! |
In order to prevent massive changes, I want to propose reassigning the
It's not ideal and natives that are used to the usual way will probably hate it. But for me, I just need some way to somewhat comfortably type Korean on my phone. Challenges:
Also, is it possible to turn of dictionary/predictive mode for one language? You might not like this approach, and that's fine. I'm okay with my changes not being merged. I'd still like to develop this for my personal use. |
First of, your post reminds me that I don't actually know the correct layout. I only got that:
Well... no. It is not possible to do it in a few lines of code or explain it in a couple of sentences. The post-processing to combine the vowels and the consonants does require massive changes. If you want to experiment, you could roughly do the following:
All in all, this is going to be a difficult feature to implement. Beware, you may waste a lot of time, if you start doing it. |
I appreciate your answer and warning. It sounds like a bigger project than I have time for right now. But maybe I'll revisit this later. Thank you for your time. |
No problem. When I started, I was also thinking that creating a keyboard is a much simpler task.
Answering myself, Gboard has a 10-key layout that can be used as an example. |
Samsung, LG, and some others all had their own variations on the keyboard layout back then, which is why you can find some variations. I'm not sure which one ended up being the one modern Android went with or if it's customizable in its settings, but I suspect that eventually most might have settled on using Samsung's as the default? If it helps, a modern Android-powered flip phone I have from a local company has gone with the layout pretty much matching Samsung's layout (the third picture). The only addition to the layout shown in the picture is that the asterisk button also shows icons indicating it's the one you use to switch between Hangeul, roman, and numerical input. |
Thanks for the sample photos! |
I'm certain this is probably far off still, but I am also looking for an alternate T9 korean keyboard to use as the default one on mive style folder (also follows chujin/samsung layout) does not allow for predictive text in English or Korean either. I'm not too experienced in working with Android from development perspective (only tried to modify a much smaller project), but if there's any way I can help test this when you do work on the feature, I am very willing to help :) |
Sure, I will upload a testing APK when I have something working. I have no intention of releasing untested code anyway. And, I am getting closer to this task. Please, have some more patience. |
Hey, folks!
Scratch the above, here is my summary of Korean. Below is a list of all possible building blocks and their respective digit combinations. INITIAL CONSONANTS
VOWELS"ㆍ" = 2 and ":" = 22 are never used separately.
FINAL CONSONANTS (optional)All single initial ones + the following:
All this means "Korea" = ""대한민국"" = "daehanmingug", is equivalent to: 6121 (ok or space) 88125 (ok or space) 0015 (ok or space) 4324. Yay, I think I got it! But please correct me if I am missing something. Otherwise, I'll start figuring out how to write all this in Java. Since the fonts do not support automatic consonant+vowel combining like in Thai, for example, it will be more difficult than I initially thought. But... I hope I can make it. References: |
Yes that looks correct! Few things that you might know, but may have missed out.
This is because inputting a vowel after a final consonant changes that final consonant into the first consonant of the next character. I think the code should have this logic. Sorry, I don't actually code. Thus, I'll describe it in words. Press 6 and ㄷ (consonant) appears, Now the tricky part (without pressing ok or space!!) Now because the next letter that comes is a vowel (either ㅣ or ㅡ) Press 1 and ㅣis added, taking away the ㅎ of 댛, and makes 대히 So basically, imagine you typed first consonant + vowel + final consonant. Then you might be wondering why we need ok (or space) to start a new character! This is actually what makes Chunjiin method inferior compared to other methods, but like someone else mentioned in the comments , all T9 phones today tend to use it. Speaking of dumbbell = 아령, the sequence would look like this on screen: 0125 = 안 I think I typed more than what you probably wanted to read, but I hope this helps. |
OK, so not confirming each character makes things much more complicated. Currently, TT9 cannot go back and edit previous letters and words but I'll see what I can do. I guess, the correct logic for doing this would be:
I also typed more than what you probably wanted to read, but I am trying to explain it to myself, to understand it better. 😄 As for ㆍ and :, I'll keep them for consistency, it isn't a problem. Someone may need to type them in a specific case, such as when explaining to someone else on GitHub what they are. Finally, as for the space key, I'll use the current SHIFT key for space, because it is useless in Korean. By default SHIFT is ✱, not #, like you are used to, but you can just reconfigure it if you want. The virtual keyboard, I'll have to redesign it for Korean. I'll probably do something like Gboard, with space on the right-hand side. |
I assumed that it would be a lot harder to not confirm each character :(. For 1 and 3, I assume that "as long as possible" means time? For method 2, you might have to be careful. We are defining keys 1,2 and 3 as "vowels", but technically, they are "components that make up the vowels". In practice, the expected behaviour is to: If I understood method 2 correctly, pressing 211 would cause it to output ㅓㅣ, or even ㆍ ㅣ ㅣ. Which is not ideal. There are scenarios where method 2 would work - scenarios where it grammatically makes sense. As an example, I hope this helps! I now see that this is massively complicated... |
We are on the same page, no worries. As a developer, I am probably explaining everything in a non-human-friendly manner. 😆 211 will produce ㅔ both when used alone, or in combination with a consonant, including the NULL consonant (not sure how it is called). "As long as possible" means: as long as you keep typing digits that make up a character, be it "3", "211" or something longer like "52210". But if you type one more digit, like another "3" after each of these, the digit sequences would be too long to match any character, so that "3" at the end must be the start of a new character. In other words, keep the longest possible digit sequence and try to find a matching character. If there is no such character, then the last digit belongs to a new character.
Every automatic thing is more complicated, because the developer must describe the possible scenarios in the code and figure out which is the optimal one at the moment.
Oh, there is more. I also have to change the dictionary file format, then I have to change the way the files are imported in the database, and only then I can get to the typing part. But this is the way to East Asian language support. If it wasn't for Korean, I would have had to do it to support Japanese, Chinese, Indic languages, and potentially, Amharic or North American languages, if ever. In the end, I don't complain, it is sort of a programming challenge quite interesting to do. Not something I would ever do in a big corporate environment. |
@ilovemegf , @chrissy0 , @ariehcore , @jibsaramnim , could you folks please provide a couple of words or even phrases that I can test with? I currently know the three below:
... but I would like to try something more complicated. Preferably, separate the digit sequences by character like above, so that I can understand them easier. Also, please note when some character must be accepted manually, not to turn into something else. |
I would love to help but I neither have a Korean T9 phone to test it out nor have I ever used one, so I'm afraid I might provide you with incorrect digits. |
I'll give you more words that requires to confirm each character. Before examples, let's make it a rule that I will put (space) between each character where it is compulsory. Otherwise I will just put space (like an empty space) between the numbers for ease of reading. 장마 = 9120(space)0012 This is probably a good time to tell you about underlining. So, All of the words above requires each character to be confirmed. If you don't, they would end up typing like this: Also, a case where you would have to delete a character before, and delete a character afterwards: Say, typing 않 would look like: And an example sentence to put it all together: Now you might be wondering why there is (space)(space). Regards, |
Thanks! It looks like there is more work do. |
Hello,
Amazing app by the way!
Would it be possible to add Korean inputs into this?
I don't think we need predictive typing as Korean is super straight forward to type using a T9 keyboard.
As a person who speaks both English and Korean it would be awesome if this can support them both :).
The text was updated successfully, but these errors were encountered: