"""Quick test script to demonstrate item categorization."""
import asyncio
from expense_tracker.categorizer import categorize_item
# Sample grocery items
test_items = [
"Organic Milk 2%",
"Whole Wheat Bread",
"Large Eggs Dozen",
"Kirkland Milk",
"Oatly Oat Beverage",
"Basmati Rice 5lb",
"Red Lentils",
"Fresh Broccoli",
"Gala Apples",
"Chicken Breast",
"Lay's Potato Chips",
"Orange Juice",
"Sweet Potatoes",
"Penne Pasta",
"Greek Yogurt",
]
async def test_categorization():
"""Test categorization without LLM (deterministic only)."""
print("Testing Item Categorization (Deterministic Rules Only)")
print("=" * 60)
for item in test_items:
category = await categorize_item(item, ctx=None) # No LLM context
print(f"{item:30} -> {category}")
print("\n" + "=" * 60)
print(f"Categorized {len(test_items)} items successfully!")
if __name__ == "__main__":
asyncio.run(test_categorization())