破坏韩国人物
我要做的是获取韩国动词或形容词,然后将其转换为词典形式。因此,假设有人输入了“추워요”,这是感冒的形容词。它的字典形式为“춥다”。有没有办法可以做类似的事情:
“嘿,如果它以'워요'结尾,将''附加到之前的字符”。
特别是附加的部分,有没有办法做类似的事情?
像가 +ㅆ=갔。
我正在使用JavaScript,但是如果更容易执行此操作,我可以尝试尝试另一种语言。
What I'm trying to do is get a Korean verb or adjective and turn it to its dictionary form. So let's say that someone typed '추워요', which is the adjective for cold. Its dictionary form is '춥다'. Is there a way that I can do something like:
"Hey, if it ends in '워요' append a 'ㅂ' to the character right before it".
Specifically that part of appending, is there a way to do something like that?
Like 가 + ㅆ = 갔.
I'm using Javascript but I'm open to try another language if it's easier to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TL; DR:我相信这不是编程语言的问题,而是您如何处理编码。
与另一种字母语言不同,韩国hangul具有不同的系统,因为Hangul由子字母组成(자모,不确定语言表达方式)。
并且有两种不同的方法可以将hangul编码为字符串:组合hangul和完成的hangul(조합형,완성형)。
组合的hangul编码每个子字符(ㄱ,ㄴ,ㄷ,...,ㅏ,ㅑ,ㅓ,...),将这些部分结合到完整的字母中。
完整的hangul编码每个(或经常被使用)hangul字母(가,나,다)。
组合的hangul具有更灵活的,但完成的hangul的性能更有效。
大多数情况下(尤其是在网络环境中)最有可能使用吊孔,因为它较小,更快。
由于您需要处理每个子字母,因此您需要研究处理合并hangul系统的方法。如有必要,您可能需要将完整的hangul转换为组合的吊孔。
TL;DR: I believe this is not a matter of the programming language, but how you deal with encoding.
Unlike another alphabetic language, Korean Hangul has a different system since Hangul is made up of sub-alphabets (자모, not sure how linguistically expressed).
And there are two different methods to encode Hangul into a string: Combined Hangul and Completed Hangul (조합형, 완성형).
Combined Hangul encodes each sub-alphabets (ㄱ, ㄴ, ㄷ, ..., ㅏ, ㅑ, ㅓ, ㅕ, ...), and combines those parts into complete letters.
Completed Hangul encodes every(or often being used) Hangul letter (가, 나, 다).
Combined Hangul has more flexible, but completed Hangul has more efficient performance-wise.
Mostly—especially in a web environment—combined Hangul is most likely being used since it is smaller and faster.
Since you need to deal with each sub-alphabets, you need to research ways to deal with the Combined Hangul system. You may need to convert Completed Hangul into Combined Hangul if necessary.