📦 Initialize Geulbeot structure and merge Prompts & test projects
This commit is contained in:
20
02. Prompts/문서생성/codedomain/단위일_가능성_Python_v01.py
Normal file
20
02. Prompts/문서생성/codedomain/단위일_가능성_Python_v01.py
Normal file
@@ -0,0 +1,20 @@
|
||||
def is_likely_unit(cell_val):
|
||||
"""단위일 가능성 판별 (사용자 제안 로직)"""
|
||||
if not cell_val:
|
||||
return False
|
||||
val = str(cell_val).strip()
|
||||
|
||||
# 1. 빈 값 또는 너무 긴 텍스트 (단위는 보통 6자 이내)
|
||||
if not val or len(val) > 6:
|
||||
return False
|
||||
|
||||
# 2. 순수 숫자는 제외
|
||||
cleaned = val.replace('.', '').replace(',', '').replace('-', '').replace(' ', '')
|
||||
if cleaned.isdigit():
|
||||
return False
|
||||
|
||||
# 3. 수식은 제외
|
||||
if val.startswith('='):
|
||||
return False
|
||||
|
||||
# 4. 일반적인 계산 기호 및 정크 기호 제외
|
||||
Reference in New Issue
Block a user