bit2r / bitTA

기능이 bitNLP로 이관되었습니다. bitNLP를 사용하시기 바랍니다.
https://r2bit.com/bitNLP/
GNU General Public License v2.0
10 stars 0 forks source link

단어의 종성여부 검출하기 #34

Closed choonghyunryu closed 1 year ago

choonghyunryu commented 1 year ago

배경

choonghyunryu commented 1 year ago

한글의 종성 여부

has_final_consonant <- function(x) {
  (utf8ToInt(x) - strtoi(0xAC00)) %% 28 != 0
}

한글 단어의 마지각 글자의 종성 여부

has_final_consonant_term <- function(x) {
  ((utf8ToInt(x) - strtoi(0xAC00)) %% 28 != 0)[nchar(x)]
}