# sample_data.py """ Sample data to test the attribute scoring system """ SAMPLE_CATEGORY_RULES = [ { 'category': 'Electronics', 'attribute_name': 'brand', 'is_mandatory': True, 'valid_values': ['Apple', 'Samsung', 'Sony', 'LG', 'Dell', 'HP', 'Lenovo'], 'data_type': 'string' }, { 'category': 'Electronics', 'attribute_name': 'color', 'is_mandatory': True, 'valid_values': ['Black', 'White', 'Silver', 'Gray', 'Blue', 'Red', 'Gold', 'Rose Gold'], 'data_type': 'string' }, { 'category': 'Electronics', 'attribute_name': 'warranty', 'is_mandatory': True, 'valid_values': ['1 Year', '2 Years', '3 Years', 'Lifetime'], 'data_type': 'string' }, { 'category': 'Electronics', 'attribute_name': 'condition', 'is_mandatory': True, 'valid_values': ['New', 'Refurbished', 'Used'], 'data_type': 'string' }, { 'category': 'Electronics', 'attribute_name': 'model', 'is_mandatory': False, 'valid_values': [], 'data_type': 'string' }, { 'category': 'Clothing', 'attribute_name': 'brand', 'is_mandatory': True, 'valid_values': ['Nike', 'Adidas', 'Puma', 'Reebok', 'Under Armour'], 'data_type': 'string' }, { 'category': 'Clothing', 'attribute_name': 'size', 'is_mandatory': True, 'valid_values': ['XS', 'S', 'M', 'L', 'XL', 'XXL'], 'data_type': 'string' }, { 'category': 'Clothing', 'attribute_name': 'color', 'is_mandatory': True, 'valid_values': ['Black', 'White', 'Blue', 'Red', 'Green', 'Yellow', 'Gray'], 'data_type': 'string' }, { 'category': 'Clothing', 'attribute_name': 'material', 'is_mandatory': True, 'valid_values': ['Cotton', 'Polyester', 'Wool', 'Silk', 'Nylon', 'Blend'], 'data_type': 'string' }, ] SAMPLE_PRODUCTS = [ { 'sku': 'ELEC-001', 'category': 'Electronics', 'title': 'Apple MacBook Pro 14-inch Space Gray', 'description': 'Latest Apple MacBook Pro with M3 chip, 14-inch display in Space Gray color.', 'attributes': { 'brand': 'Apple', 'color': 'Space Gray', # Should suggest "Gray" 'warranty': '1 Year', 'condition': 'New', 'model': 'MacBook Pro 14"' } }, { 'sku': 'ELEC-002', 'category': 'Electronics', 'title': 'Samsung Galaxy S24 Ultra', 'description': 'Flagship Samsung phone with advanced camera system.', 'attributes': { 'brand': 'Samsung', 'color': 'blak', # Typo - should suggest "Black" 'warranty': 'N/A', # Placeholder - should flag 'condition': 'new', # Case mismatch - should suggest "New" # Missing 'model' } }, { 'sku': 'ELEC-003', 'category': 'Electronics', 'title': 'Sony WH-1000XM5 Wireless Headphones', 'description': 'Premium noise-cancelling headphones from Sony.', 'attributes': { # Missing 'brand' - mandatory field 'color': 'Black', 'warranty': '2 Years', 'condition': 'Refurbished' } }, { 'sku': 'CLTH-001', 'category': 'Clothing', 'title': 'Nike Dri-FIT Running T-Shirt Blue Medium', 'description': 'Lightweight Nike running shirt in blue color, size Medium.', 'attributes': { 'brand': 'Nike', 'size': 'M', 'color': 'Blue', 'material': 'Polyester' } }, { 'sku': 'CLTH-002', 'category': 'Clothing', 'title': 'Adidas Hoodie', 'description': 'Comfortable hoodie for casual wear.', 'attributes': { 'brand': 'Adiddas', # Typo - should suggest "Adidas" 'size': 'Large', # Should suggest "L" 'color': '', # Empty - should flag # Missing 'material' - mandatory field } }, ]