Files
Negotiation_daegu/server/services/negotiation/korean.py
T
민헌andClaude Fable 5 dfb9ad6e66 초기 커밋 — 협상 AI 에이전트 정본: 엔진·데모 콘솔·측정 인프라·증빙
- server/: FastAPI 협상 엔진 (5라운드, Q-Table/UCB, 페르소나 계측, :53117)
- frontend/: 데모 콘솔 (React+Tailwind → nginx, /api 프록시)
- eval/·testdata/: 지표 8종 측정 하네스 + 재현 가능 테스트셋
- results/: 측정 증빙 (지표별 result+provenance, raw 원본 동결+SHA256)
  ① 86.0 · ② 76.0 · ③ 5.99% · ⑥ p95 3.61ms · ⑦ 611만/년 · ⑧ 91/100 · ⑨ 99.71 · ⑩ 97.99
- docker-compose.yml + run.sh: backend+frontend 일괄 기동

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112XUWF4bc3gGrEt8vsYCzy
2026-08-31 13:09:52 +09:00

43 lines
1.2 KiB
Python

"""숫자 → 한국어 표기 변환 (예: 1234 → 천이백삼십사)."""
def number_to_korean(number: int) -> str:
"""정수를 한국어 표기로 변환한다. 조 단위까지 지원."""
if number == 0:
return "영"
big_units = ["", "만", "억", "조"]
digits = ["", "일", "이", "삼", "사", "오", "육", "칠", "팔", "구"]
chunks = []
temp_num = number
while temp_num > 0:
chunks.append(temp_num % 10000)
temp_num //= 10000
res_str = ""
for i, chunk in enumerate(chunks):
if chunk == 0:
continue
chunk_str = ""
digit_1000 = chunk // 1000
if digit_1000 > 0:
chunk_str += (digits[digit_1000] if digit_1000 > 1 else "") + "천"
digit_100 = (chunk % 1000) // 100
if digit_100 > 0:
chunk_str += (digits[digit_100] if digit_100 > 1 else "") + "백"
digit_10 = (chunk % 100) // 10
if digit_10 > 0:
chunk_str += (digits[digit_10] if digit_10 > 1 else "") + "십"
digit_1 = chunk % 10
if digit_1 > 0:
chunk_str += digits[digit_1]
res_str = chunk_str + big_units[i] + res_str
return res_str