declare function isCho(word?: string): boolean; declare function isChoByGroups(word?: string): boolean[]; declare function isJung(word?: string): boolean; declare function isJungByGroups(word?: string): boolean[]; declare function isJong(word?: string): boolean; declare function isJongByGroups(word?: string): boolean[]; declare function isHangul(word?: string): boolean; declare function isHangulByGroups(word?: string): boolean[]; /** * 자모(ㄱ-ㅣ)인지 확인 * @example isJamo("ㄱ") → true * @example isJamo("가") → false */ declare function isJamo(word?: string): boolean; /** * 각 글자가 자모인지 배열로 반환 */ declare function isJamoByGroups(word?: string): boolean[]; /** * 자음(ㄱ-ㅎ)인지 확인 * @example isConsonant("ㄱ") → true * @example isConsonant("ㅏ") → false */ declare function isConsonant(word?: string): boolean; /** * 모음(ㅏ-ㅣ)인지 확인 * @example isVowel("ㅏ") → true * @example isVowel("ㄱ") → false */ declare function isVowel(word?: string): boolean; /** * 완성형 한글(가-힣)인지 확인 (자모 제외) * @example isCompleteHangul("가") → true * @example isCompleteHangul("ㄱ") → false */ declare function isCompleteHangul(word?: string): boolean; /** * 각 글자가 완성형 한글인지 배열로 반환 */ declare function isCompleteHangulByGroups(word?: string): boolean[]; declare function isDoubleConsonant(word?: string): boolean; type LocalTypes = "ko" | "en" | "number" | "special" | "etc"; type DivideOptionTypes = { isSplit?: boolean; resultType?: "object" | "string" | "array" | "index"; }; declare function divideHangulByGroups(word?: string, option?: DivideOptionTypes): (string | string[] | { cho: number; jung: number; jong: number; } | { cho: string; jung: string; jong: string; })[]; declare function divideHangul(word?: string, isSplit?: boolean): string[]; declare function divideByJung(jung: string): string; declare function divideByJong(jong: string): string; declare function combineHangul(str?: string | (string | string[])[]): string; declare function combineByJung(jung: string): string; declare function combineByJong(jong: string): string; /** * 문자열에서 초성만 추출 * @example getChoseong("프로그래밍") → "ㅍㄹㄱㄹㅁ" */ declare function getChoseong(word?: string): string; /** * 문자열에서 중성만 추출 * @example getJungseong("프로그래밍") → "ㅡㅗㅡㅐㅣ" */ declare function getJungseong(word?: string): string; /** * 문자열에서 종성만 추출 (종성 없으면 빈 문자열) * @example getJongseong("한글") → "ㄴㄹ" */ declare function getJongseong(word?: string): string; /** * 마지막 글자에 받침(종성)이 있는지 확인 * @example hasJongseong("한") → true * @example hasJongseong("하") → false */ declare function hasJongseong(word?: string): boolean; /** * 각 글자의 받침 유무를 배열로 반환 * @example hasJongseongByGroups("한글아") → [true, true, false] */ declare function hasJongseongByGroups(word?: string): boolean[]; /** * 종성을 제거 * @example removeJongseong("한글") → "하그" */ declare function removeJongseong(word?: string): string; /** * 초성을 교체 * @example replaceChoseong("한글", (cho) => "ㅁ") → "만믈" */ declare function replaceChoseong(word: string | undefined, replacer: (cho: string, index: number) => string): string; /** * 중성을 교체 * @example replaceJungseong("한글", (jung) => "ㅜ") → "훈굴" */ declare function replaceJungseong(word: string | undefined, replacer: (jung: string, index: number) => string): string; /** * 종성을 교체 * @example replaceJongseong("한글", (jong) => "ㅁ") → "함긂" */ declare function replaceJongseong(word: string | undefined, replacer: (jong: string, index: number) => string): string; /** * 문자열에서 한글만 추출 * @example extractHangul("hello안녕world세계") → "안녕세계" */ declare function extractHangul(word?: string): string; /** * 문자열에 한글이 포함되어 있는지 확인 * @example containsHangul("hello안녕") → true * @example containsHangul("hello") → false */ declare function containsHangul(word?: string): boolean; /** * 문자열에서 한글을 제거 * @example removeHangul("hello안녕world") → "helloworld" */ declare function removeHangul(word?: string): string; /** * 문자열에서 한글 글자 수를 반환 * @example hangulLength("hello안녕") → 2 */ declare function hangulLength(word?: string): number; /** * 초성 검색을 포함한 한글 검색 * @example hangulIncludes("프로그래밍", "ㅍㄹㄱ") → true * @example hangulIncludes("프로그래밍", "프로") → true */ declare function hangulIncludes(word: string, search: string): boolean; /** * 초성 검색을 포함한 startsWith * @example hangulStartsWith("프로그래밍", "ㅍㄹ") → true */ declare function hangulStartsWith(word: string, search: string): boolean; /** * 초성 검색을 포함한 endsWith * @example hangulEndsWith("프로그래밍", "래밍") → true */ declare function hangulEndsWith(word: string, search: string): boolean; /** * 초성 검색으로 배열 필터링 * @example hangulFilter(["사과", "바나나", "수박"], "ㅅ") → ["사과", "수박"] */ declare function hangulFilter(list: string[], search: string): string[]; /** * 초성 검색으로 일치하는 부분을 하이라이트 정보 반환 * @example hangulHighlight("프로그래밍", "ㅍㄹ") → { matched: true, ranges: [[0, 2]] } */ declare function hangulHighlight(word: string, search: string): { matched: boolean; ranges: [number, number][]; }; declare function makeRegexByCho(search?: string): RegExp; declare function includesByCho(search?: string, word?: string): boolean; declare function sortByASC(array?: any[], compare?: string[] | string): any[]; declare function sortByDESC(array?: any[], compare?: string[] | string): any[]; /** * orderASC: true -> 오름차순 * orderASC: false -> 내림차순 */ declare function sortByGroups(array?: any[], groups?: (number | string)[], orderASC?: boolean, compare?: string): any[]; declare function formatNumber(format?: number | string | null): string; declare function formatNumberAll(format?: number | string | null): string; /** * 한글 숫자를 숫자로 변환 * @example hangulToNumber("백이십삼") → 123 * @example hangulToNumber("삼만 오천") → 35000 * @example hangulToNumber("일억 이천삼백만") → 123000000 */ declare function hangulToNumber(hangul?: string): number; /** * 고유어 수사를 숫자로 변환 (1~99) * @example nativeKoreanToNumber("하나") → 1 * @example nativeKoreanToNumber("스물다섯") → 25 * @example nativeKoreanToNumber("아흔아홉") → 99 * @example nativeKoreanToNumber("세") → 3 (수 관형사도 지원) */ declare function nativeKoreanToNumber(word?: string): number; /** * 숫자를 고유어 수사로 변환 (1~99) * @example nativeKoreanNumber(1) → "하나" * @example nativeKoreanNumber(25) → "스물다섯" */ declare function nativeKoreanNumber(n: number): string; /** * 숫자 + 단위명사 (수 관형사 형태) * @example counter(3, "개") → "세 개" * @example counter(1, "명") → "한 명" * @example counter(20, "살") → "스무 살" */ declare function counter(n: number, unit?: string): string; /** * 서수사 반환 * @example ordinal(1) → "첫째" * @example ordinal(3) → "셋째" * @example ordinal(11) → "열하나째" */ declare function ordinal(n: number): string; /** * 숫자를 한자어 수사(순한글)로 변환 * @example sinoKoreanNumber(123) → "백이십삼" * @example sinoKoreanNumber(10000) → "만" * @example sinoKoreanNumber(0) → "영" */ declare function sinoKoreanNumber(n: number): string; /** * @example * YY - 22, YYYY - 2022 * M: 2, MM: 02, * D: 2, DD: 02, * d: 3, dd: '화', * H: 2, HH: 02, * m: 2, mm: 02, * s: 2, ss: 02, */ declare function formatDate(_date?: string | Date, formatStyle?: string): string; /** * 고유어 날짜 이름 (1~30) * @example days(1) → "하루" * @example days(3) → "사흘" * @example days(15) → "보름" */ declare function days(n: number): string; /** * 한국어 월 이름 (1~12) * @example months(6) → "유월" * @example months(10) → "시월" */ declare function months(n: number): string; declare function josa(letter?: string, _josa?: string): string; declare function formatJosa(letter?: string): string; declare function toBanmal(string: string): string; declare function toHonorific(string: string): string; type SpeechLevel = "formal" | "polite" | "informal" | "plain" | "unknown"; /** * 문장의 존댓말 레벨을 감지 * @example detectSpeechLevel("감사합니다") → "formal" * @example detectSpeechLevel("감사해요") → "polite" * @example detectSpeechLevel("감사해") → "informal" * @example detectSpeechLevel("감사하다") → "plain" */ declare function detectSpeechLevel(text?: string): SpeechLevel; /** * 문장이 존댓말인지 확인 * @example isFormal("감사합니다") → true * @example isFormal("감사해") → false */ declare function isFormal(text?: string): boolean; /** * 문장이 반말인지 확인 * @example isInformal("고마워") → true * @example isInformal("감사합니다") → false */ declare function isInformal(text?: string): boolean; /** * 한글 발음 변환 (표준 발음법) * 연음, 비음화, 경음화, 격음화, 유음화, 구개음화 등 적용 * @example pronounce("먹어") → "머거" * @example pronounce("국물") → "궁물" * @example pronounce("학교") → "학꾜" * @example pronounce("좋아") → "조아" * @example pronounce("신라") → "실라" */ declare function pronounce(text: string): string; interface RomanizeOptions { capitalize?: boolean; separator?: string; } /** * 국립국어원 로마자 표기법에 따른 로마자 변환 * @example romanize("한글") → "hangeul" * @example romanize("대한민국") → "daehanminguk" * @example romanize("서울", { capitalize: true }) → "Seoul" */ declare function romanize(text: string, options?: RomanizeOptions): string; declare function normalize(text: string, isSpace?: boolean): string; declare function convertKey(word?: string, toLanguage?: LocalTypes, isCombine?: boolean): string; /** * 타이핑 효과를 위한 한글 분해 (각 자모가 추가되는 중간 과정 생성) * @example disassembleForTyping("한") → ["ㅎ", "하", "한"] * @example disassembleForTyping("한글") → ["ㅎ", "하", "한", "한ㄱ", "한그", "한글"] */ declare function disassembleForTyping(text: string): string[]; /** * 한글을 자모 단위로 분해하여 배열 반환 (타이핑/슬라이스용) * 복합 모음/자음도 분해 * @example hangulToJamo("한") → ["ㅎ", "ㅏ", "ㄴ"] * @example hangulToJamo("뷁") → ["ㅂ", "ㅜ", "ㅔ", "ㄹ", "ㄱ"] */ declare function hangulToJamo(text: string): string[]; /** * 자모 단위로 문자열을 슬라이스 (잘린 한글이 부분적으로 보임) * @example hangulSlice("한글", 0, 2) → "하" (ㅎ,ㅏ까지만) * @example hangulSlice("한글", 0, 3) → "한" (ㅎ,ㅏ,ㄴ까지) * @example hangulSlice("한글", 0, 4) → "한ㄱ" (ㅎ,ㅏ,ㄴ,ㄱ까지) * @example hangulSlice("한글", 0, 5) → "한그" (ㅎ,ㅏ,ㄴ,ㄱ,ㅡ까지) */ declare function hangulSlice(text: string, start?: number, end?: number): string; /** * 자모 배열의 길이 반환 (자모 단위 길이) * @example hangulJamoLength("한글") → 6 (ㅎ,ㅏ,ㄴ,ㄱ,ㅡ,ㄹ) */ declare function hangulJamoLength(text: string): number; interface FrequencyResult { cho: Record; jung: Record; jong: Record; total: number; } /** * 한글 텍스트의 자모 빈도수 분석 * @example * hangulFrequency("안녕하세요") * // { cho: { ㅇ: 2, ㄴ: 1, ㅎ: 1, ㅅ: 1 }, jung: { ... }, jong: { ... }, total: 5 } */ declare function hangulFrequency(text: string): FrequencyResult; /** * 텍스트에서 가장 많이 사용된 초성 반환 * @example mostFrequentChoseong("사과 수박 사탕 시금치") → "ㅅ" */ declare function mostFrequentChoseong(text: string): string; declare function getDistance(first: string, second: string): number; declare function correctByDistance(word: string, list: string[], option?: { distance?: number; maxSlice?: number; isSplit?: boolean; }): any[]; declare function getLocal(word?: string): "ko" | "en" | "number" | "special" | "etc"; declare function getLocalByGroups(word?: string, isPercent?: boolean): string[] | Record; declare function encode(t?: any, l?: number): any; declare function decode(t?: any, l?: number): any; declare function isNumber(input: any): boolean; declare function splitByKey(key?: string): string[]; declare function getNestedProperty(key?: string[] | string, object?: any): any; declare function zeroPad(string?: number | string, pow?: number, pad?: string): string; declare function chunkAtEnd(value?: string, n?: number): string[]; declare function makePercentByObject(object: any): Record; declare function reverseByObject(object: any): Record; declare function reverseByArray(array: any): any; export { chunkAtEnd, combineByJong, combineByJung, combineHangul, containsHangul, convertKey, correctByDistance, counter, days, decode, detectSpeechLevel, disassembleForTyping, divideByJong, divideByJung, divideHangul, divideHangulByGroups, encode, extractHangul, formatDate, formatJosa, formatNumber, formatNumberAll, getChoseong, getDistance, getJongseong, getJungseong, getLocal, getLocalByGroups, getNestedProperty, hangulEndsWith, hangulFilter, hangulFrequency, hangulHighlight, hangulIncludes, hangulJamoLength, hangulLength, hangulSlice, hangulStartsWith, hangulToJamo, hangulToNumber, hasJongseong, hasJongseongByGroups, includesByCho, isCho, isChoByGroups, isCompleteHangul, isCompleteHangulByGroups, isConsonant, isDoubleConsonant, isFormal, isHangul, isHangulByGroups, isInformal, isJamo, isJamoByGroups, isJong, isJongByGroups, isJung, isJungByGroups, isNumber, isVowel, josa, makePercentByObject, makeRegexByCho, months, mostFrequentChoseong, nativeKoreanNumber, nativeKoreanToNumber, normalize, ordinal, pronounce, removeHangul, removeJongseong, replaceChoseong, replaceJongseong, replaceJungseong, reverseByArray, reverseByObject, romanize, sinoKoreanNumber, sortByASC, sortByDESC, sortByGroups, splitByKey, toBanmal, toHonorific, zeroPad };