Files
aionboarding/ai-patient-onboarding/scratch/test_duration_check.py
T

23 lines
1010 B
Python

import sys
import os
if hasattr(sys.stdout, "reconfigure"):
sys.stdout.reconfigure(encoding="utf-8")
sys.path.insert(0, r"c:\Users\Lenovo\New folder (2)\ai-patient-onboarding")
from app.services.contextual_normalizer import normalize_duration_from_message
test_cases = [
("10 டேஸா இருக்கு", "10 days"),
("10 days-ah இருக்கு", "10 days"),
("ஒரு பத்து நாளா இருக்கு", "10 days"),
("ரெண்டு நாளா", "2 days"),
("நேத்து ல இருந்து", "since yesterday"),
("மூணு நாளா", "3 days"),
("మూడు రోజుల నుంచి ఉంది", "3 days"),
("ಮೂರು ದಿನದಿಂದ ಇದೆ", "3 days"),
("तीन दिनों से", "3 days")
]
for text, expected in test_cases:
res = normalize_duration_from_message(text)
print(f"Text: '{text}' -> Got: '{res}' | Expected: '{expected}' | Pass: {res == expected}")