Skip to main content

surface_eq_canonical

Function surface_eq_canonical 

Source
pub fn surface_eq_canonical(a: &str, b: &str) -> bool
Expand description

Canonical surface 비교 (Sprint 128 P2).

양쪽 문자열을 fully decompose 후 다시 compose하여 자모/음절 표기 차이를 흡수. 예: “한” (U+D55C) vs “하ㄴ” (U+D558 + U+3134) → 둘 다 “한“으로 정규화 후 비교.

Sprint 127 P1 분석에서 KLUE의 morpheme surface가 음절 보존(예: “한”)인 반면 mecab은 어미 분해로 음절+자모 혼합(“하”+“ㄴ”)이 자주 발생함을 확인. 본 함수는 이 표기 차이를 의미 손실 없이 흡수.