-
-
Save soomtong/37e3a93d894243ef9fd42588663f3171 to your computer and use it in GitHub Desktop.
한글 은/는, 이/가 (Powered by ActiveSupport::Multibyte::Chars)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# require 'active_support/all' | |
def korean_topic_marker(str) | |
k = str[-1] # last one char | |
return '는' if k.mb_chars.decompose.size < 3 # 종성이 없는 경우 | |
return '은' | |
end | |
def korean_subject_marker(str) | |
k = str[-1] # last one char | |
return '가' if k.mb_chars.decompose.size < 3 # 종성이 없는 경우 | |
return '이' | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment