本文介绍了iOS日语手写输入代码请帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一系列有关为iOS编写代码以及包括日语手写识别的问题.我是一个初学者,所以要谦虚,并假设我很愚蠢...

I have a series of questions about writing code for iOS and including handwritten recognition of japanese. I am a beginner, so be gentle and assume I am stupid ...

我想用平假名(日语注音字母)显示一个日语单词,然后让用户手写相应的汉字(中文字符).然后,在内部将其与正确的字符进行比较.然后,用户会收到反馈(无论是否正确).

I'd like to present a japanese word in hiragana (japanese phonetic alphabet), then have the user handwrite the appropriate kanji (chinese character). Then, this is internally compared to the correct character. Then, user gets feedback (if they were correct or not).

我的问题围绕手写输入.我通常知道如果使用中文键盘,这种输入是可能的.

My questions here revolve around the handwritten input.I know normally if one uses the chinese keyboard this type of input is possible.

如何在不使用键盘本身的情况下进行类似的设置?是否已经有为此功能的库函数(我觉得必须有此功能,因为中文键盘上的输入可用)?

How can I institute something similar, without using the keyboard itself? Are there already library functions for this (I feel there must be since that input is available on the chinese keyboard)?

此外,汉字与汉字也不完全相同.日本人发明了许多独特的人物.我如何将这些包括在笔迹识别中?

Also, Kanji aren't exactly the same as chinese characters. There are unique characters that japanese people invented themselves. How would I be able to include these in my handwriting recognition?

推荐答案

我们在大学进行了类似的练习.

We worked on a similar exercise back at University.

由于汉字对笔画的顺序进行了很好的定义,因此只有8(?)个不同的笔画.基本上每个汉字都是笔顺的顺序.像te(手)一样,顺序是短的向后下降冲程",然后是左至右冲程"的两倍,最后是长的向下冲程,底部带有小尖端".有一些数据库可以为您提供此信息.

As the order of the strokes is well defined with kanji and there are only 8 (?) different strokes. Basically each Kanji is a well-ordered sequence of strokes. Like te (hand) is the sequence "The short falling backward stroke" and then twice the "left to right stroke" and finally "The long downward stroke with the little tip at the bottom". There are databases that give you this information.

现在,几乎可以消除问题,以识别正确的冲程.您仍然会遇到一些歧义,您必须考虑某些笔画与其他笔画之间的空间关系.

Now the problem is almost reduced to identify the correct stroke. You will still run into some ambiguities where you have to take into consideration in which spatial relation some strokes are to some others.

为了进行笔画识别,我们将自由手写笔画成45度(键盘上的小圆圈符号在哪里?)角度,因此将其沿这些方向之一转换为矢量序列.假设零方向是从下到上,方向1的是右下到左上,2是从右到左,依此类推.

For stroke recognition we snapped the free hand writing to 45 degrees (Where is the little circle symbol on the keyboard?) angles, thus converting it into a sequence of vectors along one of these directions. Let's assume that direction zero is from bottom to top, direction 1 bottom right to top left, 2 from right to left and so on CCW.

然后te(手)的第一个笔画为[23] +(有些人说它掉落而有些人水平)第二和第三笔将是6+最后一个是4+ [123](就像小技巧一样,每个作者都使用不同的方向)

Then the first stroke of te (手) would be [23]+ (as some write it falling and some horizontal)The second and third stroke would be 6+and the last would be 4+[123] (as with the little tip, every writer uses a different direction)

这种粗略的捕捉实际上足以让我们识别汉字.也许还有更老练的方法,但是这个简单的解决方案设法识别了大约90%的日文汉字.它不能只掌握一位教授的笔迹,但问题是,除了他本人以外,没有人能读懂他的笔迹.

This coarse snapping was actually enough for us to recognize kanjis. Maybe there are more sofisticated ways, but this simple solution managed to recognize about 90% of kanjis. It couldn't grasp only the handwriting of one professor, but the problem was that also no human except himself could read his handwriting.

重要的是您的用户打印"汉字并且不要用书法写,因为在书法中许多笔画被合并为一个.就像在书法中用大米场"的部首写汉字时一样,该部首变成了完全不同的东西.或带有许多水平横线的部首(例如iu的部首)就变成了一条长长的扭曲线.

It is important that your user "prints" the Kanji and doesn't write in calligraphy, since in calligraphy many strokes are merged into one. Like when writing a kanji with the radical of "rice field" in calligraphy, this radical morphs into something completely different. Or radicals with a lot of horizontal dashes (like the radical of "speech" iu) just become one long wriggly line.

这篇关于iOS日语手写输入代码请帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 02:51