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

Make Cangjie a bit more tolerant to input mistakes #5

Open
bochecha opened this issue Sep 22, 2013 · 4 comments
Open

Make Cangjie a bit more tolerant to input mistakes #5

bochecha opened this issue Sep 22, 2013 · 4 comments

Comments

@bochecha
Copy link
Member

Cangjie is very unforgiving. If you make a mistake in one of the input characters, you will only discover it when you hit space, and you have to start all over again.

It could be possible to be a bit more tolerant and permissive, for example allowing other results than what the user typed, under certain conditions.

One idea is to return candidates which have input codes that are "close" to what the user typed. Another factor to add could be the surrounding characters, or the meaning of the sentence, etc...

This could be done only when no candidates are returned for example, to avoid giving the user many candidates when he actually typed the right one.

Etc...

@bochecha
Copy link
Member Author

[I wish Github had a way to move issues...]

In the original issue, the following comment had been added.


One idea is to use the notion of "Levenshtein edit distance". For example, if I want to type 陳, the code should be NLDW. If I mistakenly typed NLWD (not valid code) for example, the programe will check against a list of all allowed codes and return the words as the candidates with the sorted edit distance.

For example
NLWD vs NLDW (陳), edit distance is 4.
NLWD vs NLWL (隅), edit distance is 2.
NLWD vs LWD (裸), edit distance is 1
.....

Therefore, the error-tolerant input method should return

@bochecha
Copy link
Member Author

[I wish Github had a way to move issues...]

In the original issue, the following comment had been added.


This is not a bad idea but I won't suggest this. Because that will cause the user unaware of their typing mistake, user will keep on typing the wrong radix set and think he/she is typing right.
But I'd suggest there can be a feature which shows the uncompleted radix set results. For example:

牛:HQ
我:HQI
牝:HQP
牪:HQHQ
牲:HQHQM

When user typed "HQ" and hasn't finished typing, the result set will show all the results starting with "HQ". When user choose an uncompleted result, it shows the correct radix set.

@yookoala
Copy link
Contributor

Some thoughts.

Auto Suggest / Auto Correct

To do a typing suggestion / auto-correct, I think we have to consider the source of input mistake first. On smartphones, the main source of error is the small size keyboard. Android does the auto-correct with reference to the adjacent keys. That works gracefully, but I'm not quite sure it works as well on desktop and physical keyboards.

Suggest on Type

I'm using an IME called "Cangjie Keyboard" on my Android. It's very neat. One good feature is it keep showing suggestion on the way you type. However, this may not be compatible to what is already done.

Mixed. Suggest on Typing Mistake

A mixed approach. Instead of auto-correcting, it can show the suggestions on your typing mistake. That may also be a cool feature.

@bochecha
Copy link
Member Author

Something I just read, which seems relevant: http://norvig.com/spell-correct.html

It's obviously not 100% what we need, but the article is interesting and could be useful for our actual implementation.

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

No branches or pull requests

2 participants