Count Korean text deterministically with exact grapheme, line, and byte contracts for self-intros and form limits.
자기소개서, 지원서, 자유서술형 폼처럼 글자 수 제한이 중요한 한국어 텍스트를 대상으로 LLM 추정 없이 결정론적으로 카운트한다.
Intl.Segmenter 기반 Unicode extended grapheme clusterCRLF, LF, CR, U+2028, U+2029 를 줄바꿈 1회로 계산neis byte 규칙default profileIntl.Segmenter("ko", { granularity: "grapheme" })Buffer.byteLength(text, "utf8")01CRLF 는 2줄바꿈이 아니라 1줄바꿈으로 센다.neis profiledefault 와 동일default 와 동일3B1B2Bnode 18+scripts/korean_character_count.js helper 포함node scripts/korean_character_count.js 로 결정론적 카운트를 실행한다.default/neis)과 출력 형식(json/text)을 고른다.node scripts/korean_character_count.js --text "가나다"
node scripts/korean_character_count.js --text $'첫 줄\r\n둘째 줄🙂'
node scripts/korean_character_count.js --text $'첫 줄\n둘째 줄🙂' --profile neis --format text
node scripts/korean_character_count.js --file ./essay.txt --profile default
cat essay.txt | node scripts/korean_character_count.js --stdin --profile neis
default profile을 사용한다.neis 를 쓴다.default 와 neis 계약 차이가 문서에 명시된다.node scripts/korean_character_count.js --help 가 동작한다.Buffer.byteLength: https://nodejs.org/api/buffer.html