#!/usr/bin/env python3 from typing import Any, Dict, Tuple SYSTEM_MESSAGE = ( "You are an e-commerce product annotator. " "Continue the provided assistant Markdown table prefix. " "Do not repeat or modify the prefix, and do not add explanations outside the table." ) SHARED_ANALYSIS_INSTRUCTION = """Analyze each input product text and fill these columns: 1. Product title: a natural, localized product name based on the input text 2. Category path: a concise category hierarchy from broad to specific, separated by ">" 3. Fine-grained tags: concise tags for style, features, design details, function, or standout selling points 4. Target audience: gender, age group, body type, or suitable users when clearly implied 5. Usage scene: likely occasions, settings, or use cases 6. Applicable season: relevant season(s) based on the product text 7. Key attributes: core product attributes and specifications. Depending on the item type, this may include fit, silhouette, length, sleeve type, neckline, waistline, closure, pattern, design details, structure, or other relevant attribute dimensions 8. Material description: material, fabric, texture, or construction description 9. Functional features: practical or performance-related functions such as stretch, breathability, warmth, support, storage, protection, or ease of wear 10. Anchor text: a search-oriented keyword string covering product type, category intent, attributes, design cues, usage scenarios, and strong shopping phrases Rules: - Keep the input order and row count exactly the same. - Infer only from the provided input product text; if uncertain, prefer concise and broadly correct ecommerce wording. - Keep category paths concise and use ">" as the separator. - For columns with multiple values, the localized output requirement will define the delimiter. Input product list: """ USER_INSTRUCTION_TEMPLATE = """Please strictly return a Markdown table following the given columns in the specified language. For any column containing multiple values, separate them with commas. Do not add any other explanation. Language: {language}""" def _taxonomy_field( key: str, label: str, description: str, zh_label: str | None = None, ) -> Dict[str, str]: return { "key": key, "label": label, "description": description, "zh_label": zh_label or label, } def _build_taxonomy_shared_instruction(profile_label: str, fields: Tuple[Dict[str, str], ...]) -> str: lines = [ f"Analyze each input product text and fill the columns below using a {profile_label} attribute taxonomy.", "", "Output columns:", ] for idx, field in enumerate(fields, start=1): lines.append(f"{idx}. {field['label']}: {field['description']}") lines.extend( [ "", "Rules:", "- Keep the same row order and row count as input.", "- Infer only from the provided product text.", "- Leave blank if not applicable or not reasonably supported.", "- Use concise, standardized ecommerce wording.", "- Do not combine different attribute dimensions in one field.", "- If multiple values are needed, use the delimiter required by the localization setting.", "", "Input product list:", ] ) return "\n".join(lines) def _make_taxonomy_profile( profile_label: str, fields: Tuple[Dict[str, str], ...], *, aliases: Tuple[str, ...], output_languages: Tuple[str, ...] = ("en",), zh_headers: Tuple[str, ...] = (), ) -> Dict[str, Any]: headers = {"en": ["No.", *[field["label"] for field in fields]]} if zh_headers: headers["zh"] = ["序号", *zh_headers] return { "profile_label": profile_label, "fields": fields, "aliases": aliases, "output_languages": output_languages, "shared_instruction": _build_taxonomy_shared_instruction(profile_label, fields), "markdown_table_headers": headers, } APPAREL_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise ecommerce apparel category label, not a full marketing title", "品类"), _taxonomy_field("target_gender", "Target Gender", "intended gender only if clearly implied", "目标性别"), _taxonomy_field("age_group", "Age Group", "only if clearly implied, e.g. adults, kids, teens, toddlers, babies", "年龄段"), _taxonomy_field("season", "Season", "season(s) or all-season suitability only if supported", "适用季节"), _taxonomy_field("fit", "Fit", "body closeness, e.g. slim, regular, relaxed, oversized, fitted", "版型"), _taxonomy_field("silhouette", "Silhouette", "overall garment shape, e.g. straight, A-line, boxy, tapered, bodycon, wide-leg", "廓形"), _taxonomy_field("neckline", "Neckline", "neckline type when applicable, e.g. crew neck, V-neck, hooded, collared, square neck", "领型"), _taxonomy_field("sleeve_length_type", "Sleeve Length Type", "sleeve length only, e.g. sleeveless, short sleeve, long sleeve, three-quarter sleeve", "袖长类型"), _taxonomy_field("sleeve_style", "Sleeve Style", "sleeve design only, e.g. puff sleeve, raglan sleeve, batwing sleeve, bell sleeve", "袖型"), _taxonomy_field("strap_type", "Strap Type", "strap design when applicable, e.g. spaghetti strap, wide strap, halter strap, adjustable strap", "肩带设计"), _taxonomy_field("rise_waistline", "Rise / Waistline", "waist placement when applicable, e.g. high rise, mid rise, low rise, empire waist", "腰型"), _taxonomy_field("leg_shape", "Leg Shape", "for bottoms only, e.g. straight leg, wide leg, flare leg, tapered leg, skinny leg", "裤型"), _taxonomy_field("skirt_shape", "Skirt Shape", "for skirts only, e.g. A-line, pleated, pencil, mermaid", "裙型"), _taxonomy_field("length_type", "Length Type", "design length only, not size, e.g. cropped, regular, longline, mini, midi, maxi, ankle length, full length", "长度类型"), _taxonomy_field("closure_type", "Closure Type", "fastening method when applicable, e.g. zipper, button, drawstring, elastic waist, hook-and-loop", "闭合方式"), _taxonomy_field("design_details", "Design Details", "construction or visual details, e.g. ruched, ruffled, pleated, cut-out, layered, distressed, split hem", "设计细节"), _taxonomy_field("fabric", "Fabric", "fabric type only, e.g. denim, knit, chiffon, jersey, fleece, cotton twill", "面料"), _taxonomy_field("material_composition", "Material Composition", "fiber content or blend only if stated, e.g. cotton, polyester, spandex, linen blend, 95% cotton 5% elastane", "成分"), _taxonomy_field("fabric_properties", "Fabric Properties", "inherent fabric traits, e.g. stretch, breathable, lightweight, soft-touch, water-resistant", "面料特性"), _taxonomy_field("clothing_features", "Clothing Features", "product features, e.g. lined, reversible, hooded, packable, padded, pocketed", "服装特征"), _taxonomy_field("functional_benefits", "Functional Benefits", "wearer benefits, e.g. moisture-wicking, thermal insulation, UV protection, easy care, supportive compression", "功能"), _taxonomy_field("color", "Color", "specific color name when available", "主颜色"), _taxonomy_field("color_family", "Color Family", "normalized broad retail color group, e.g. black, white, blue, green, red, pink, beige, brown, gray", "色系"), _taxonomy_field("print_pattern", "Print / Pattern", "surface pattern when applicable, e.g. solid, striped, plaid, floral, graphic, animal print", "印花 / 图案"), _taxonomy_field("occasion_end_use", "Occasion / End Use", "likely use occasion only if supported, e.g. office, casual wear, streetwear, lounge, workout, outdoor", "适用场景"), _taxonomy_field("style_aesthetic", "Style Aesthetic", "overall style only if supported, e.g. minimalist, streetwear, athleisure, smart casual, romantic, playful", "风格"), ) THREE_C_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise 3C accessory or peripheral category label"), _taxonomy_field("compatible_device", "Compatible Device / Model", "supported device family, series, model, or form factor when clearly stated"), _taxonomy_field("connectivity", "Connectivity", "connection method such as wired, wireless, Bluetooth, Wi-Fi, NFC, or 2.4G"), _taxonomy_field("interface_port_type", "Interface / Port Type", "relevant connector or port, e.g. USB-C, Lightning, HDMI, AUX, RJ45"), _taxonomy_field("power_charging", "Power Source / Charging", "charging or power mode, e.g. battery powered, fast charging, rechargeable, plug-in"), _taxonomy_field("key_features", "Key Features", "primary hardware features such as noise cancelling, foldable, magnetic, backlit, waterproof"), _taxonomy_field("material_finish", "Material / Finish", "main material or exterior finish when supported"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("pack_size", "Pack Size", "unit count or bundle size when stated"), _taxonomy_field("use_case", "Use Case", "intended usage such as travel, office, gaming, car, charging, streaming"), ) BAGS_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise bag category such as backpack, tote bag, crossbody bag, luggage, or wallet"), _taxonomy_field("target_gender", "Target Gender", "intended gender only if clearly implied"), _taxonomy_field("carry_style", "Carry Style", "how the bag is worn or carried, e.g. handheld, shoulder, crossbody, backpack"), _taxonomy_field("size_capacity", "Size / Capacity", "size tier or capacity when supported, e.g. mini, large capacity, 20L"), _taxonomy_field("material", "Material", "main bag material such as leather, nylon, canvas, PU, straw"), _taxonomy_field("closure_type", "Closure Type", "bag closure such as zipper, flap, buckle, drawstring, magnetic snap"), _taxonomy_field("structure_compartments", "Structure / Compartments", "organizational structure such as multi-pocket, laptop sleeve, card slots, expandable"), _taxonomy_field("strap_handle_type", "Strap / Handle Type", "strap or handle design such as chain strap, top handle, adjustable strap"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("occasion_end_use", "Occasion / End Use", "likely use such as commute, travel, evening, school, casual"), ) PET_SUPPLIES_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise pet supplies category label"), _taxonomy_field("pet_type", "Pet Type", "target pet such as dog, cat, bird, fish, hamster"), _taxonomy_field("breed_size", "Breed Size", "pet size or breed size when stated, e.g. small breed, large dogs"), _taxonomy_field("life_stage", "Life Stage", "pet age stage when supported, e.g. puppy, kitten, adult, senior"), _taxonomy_field("material_ingredients", "Material / Ingredients", "main material or ingredient composition when supported"), _taxonomy_field("flavor_scent", "Flavor / Scent", "flavor or scent when applicable"), _taxonomy_field("key_features", "Key Features", "primary attributes such as interactive, leak-proof, orthopedic, washable, elevated"), _taxonomy_field("functional_benefits", "Functional Benefits", "benefits such as dental care, calming, digestion support, joint support"), _taxonomy_field("size_capacity", "Size / Capacity", "size, count, or net content when stated"), _taxonomy_field("use_scenario", "Use Scenario", "usage such as feeding, training, grooming, travel, indoor play"), ) ELECTRONICS_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise electronics device or component category label"), _taxonomy_field("device_category", "Device Category / Compatibility", "supported platform, component class, or compatible device family when stated"), _taxonomy_field("power_voltage", "Power / Voltage", "power, voltage, wattage, or battery spec when supported"), _taxonomy_field("connectivity", "Connectivity", "connection method such as wired, Bluetooth, Wi-Fi, RF, or smart app control"), _taxonomy_field("interface_port_type", "Interface / Port Type", "relevant port or interface such as USB-C, AC plug type, HDMI, SATA"), _taxonomy_field("capacity_storage", "Capacity / Storage", "capacity or storage spec such as 256GB, 2TB, 5000mAh"), _taxonomy_field("key_features", "Key Features", "main product features such as touch control, HD display, noise reduction, smart control"), _taxonomy_field("material_finish", "Material / Finish", "main housing material or finish when supported"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("use_case", "Use Case", "intended use such as home entertainment, office, charging, security, repair"), ) OUTDOOR_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise outdoor gear category label"), _taxonomy_field("activity_type", "Activity Type", "primary outdoor activity such as camping, hiking, fishing, climbing, travel"), _taxonomy_field("season_weather", "Season / Weather", "season or weather suitability when supported"), _taxonomy_field("material", "Material", "main material such as aluminum, ripstop nylon, stainless steel, EVA"), _taxonomy_field("capacity_size", "Capacity / Size", "size, length, or capacity when stated"), _taxonomy_field("protection_resistance", "Protection / Resistance", "resistance or protection such as waterproof, UV resistant, windproof"), _taxonomy_field("key_features", "Key Features", "primary gear attributes such as foldable, lightweight, insulated, non-slip"), _taxonomy_field("portability_packability", "Portability / Packability", "carry or storage trait such as collapsible, compact, ultralight, packable"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("use_scenario", "Use Scenario", "likely use setting such as campsite, trail, survival kit, beach, picnic"), ) HOME_APPLIANCES_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise home appliance category label"), _taxonomy_field("appliance_category", "Appliance Category", "functional class such as kitchen appliance, cleaning appliance, personal care appliance"), _taxonomy_field("power_voltage", "Power / Voltage", "wattage, voltage, plug type, or power supply when supported"), _taxonomy_field("capacity_coverage", "Capacity / Coverage", "capacity or coverage metric such as 1.5L, 20L, 40sqm"), _taxonomy_field("control_method", "Control Method", "operation method such as touch, knob, remote, app control"), _taxonomy_field("installation_type", "Installation Type", "setup style such as countertop, handheld, portable, wall-mounted, built-in"), _taxonomy_field("key_features", "Key Features", "main product features such as timer, steam, HEPA filter, self-cleaning"), _taxonomy_field("material_finish", "Material / Finish", "main material or exterior finish when supported"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("use_scenario", "Use Scenario", "intended use such as cooking, cleaning, grooming, cooling, air treatment"), ) HOME_LIVING_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise home and living category label"), _taxonomy_field("room_placement", "Room / Placement", "intended room or placement such as bedroom, kitchen, bathroom, desktop"), _taxonomy_field("material", "Material", "main material such as wood, ceramic, cotton, glass, metal"), _taxonomy_field("style", "Style", "home style such as modern, farmhouse, minimalist, boho, Nordic"), _taxonomy_field("size_dimensions", "Size / Dimensions", "size or dimensions when stated"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("pattern_finish", "Pattern / Finish", "surface pattern or finish such as solid, marble, matte, ribbed"), _taxonomy_field("key_features", "Key Features", "main product features such as stackable, washable, blackout, space-saving"), _taxonomy_field("assembly_installation", "Assembly / Installation", "assembly or installation trait when supported"), _taxonomy_field("use_scenario", "Use Scenario", "intended use such as storage, dining, decor, sleep, organization"), ) WIGS_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise wig or hairpiece category label"), _taxonomy_field("hair_material", "Hair Material", "hair material such as human hair, synthetic fiber, heat-resistant fiber"), _taxonomy_field("hair_texture", "Hair Texture", "texture or curl pattern such as straight, body wave, curly, kinky"), _taxonomy_field("hair_length", "Hair Length", "hair length when stated"), _taxonomy_field("hair_color", "Hair Color", "specific hair color or blend when available"), _taxonomy_field("cap_construction", "Cap Construction", "cap type such as full lace, lace front, glueless, U part"), _taxonomy_field("lace_area_part_type", "Lace Area / Part Type", "lace size or part style such as 13x4 lace, middle part, T part"), _taxonomy_field("density_volume", "Density / Volume", "hair density or fullness when supported"), _taxonomy_field("style_bang_type", "Style / Bang Type", "style cue such as bob, pixie, layered, with bangs"), _taxonomy_field("occasion_end_use", "Occasion / End Use", "intended use such as daily wear, cosplay, protective style, party"), ) BEAUTY_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise beauty or cosmetics category label"), _taxonomy_field("target_area", "Target Area", "target area such as face, lips, eyes, nails, hair, body"), _taxonomy_field("skin_hair_type", "Skin Type / Hair Type", "suitable skin or hair type when supported"), _taxonomy_field("finish_effect", "Finish / Effect", "cosmetic finish or effect such as matte, dewy, volumizing, brightening"), _taxonomy_field("key_ingredients", "Key Ingredients", "notable ingredients when stated"), _taxonomy_field("shade_color", "Shade / Color", "specific shade or color when available"), _taxonomy_field("scent", "Scent", "fragrance or scent only when supported"), _taxonomy_field("formulation", "Formulation", "product form such as cream, serum, powder, gel, stick"), _taxonomy_field("functional_benefits", "Functional Benefits", "benefits such as hydration, anti-aging, long-wear, repair, sun protection"), _taxonomy_field("use_scenario", "Use Scenario", "intended use such as daily routine, salon, travel, evening makeup"), ) ACCESSORIES_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise accessory category label such as necklace, watch, belt, hat, or sunglasses"), _taxonomy_field("target_gender", "Target Gender", "intended gender only if clearly implied"), _taxonomy_field("material", "Material", "main material such as alloy, leather, stainless steel, acetate, fabric"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("pattern_finish", "Pattern / Finish", "surface treatment or style finish such as polished, textured, braided, rhinestone"), _taxonomy_field("closure_fastening", "Closure / Fastening", "fastening method when applicable"), _taxonomy_field("size_fit", "Size / Fit", "size or fit information such as adjustable, one size, 42mm"), _taxonomy_field("style", "Style", "style cue such as minimalist, vintage, statement, sporty"), _taxonomy_field("occasion_end_use", "Occasion / End Use", "likely use such as daily wear, formal, party, travel, sun protection"), _taxonomy_field("set_pack_size", "Set / Pack Size", "set count or pack size when stated"), ) TOYS_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise toy category label"), _taxonomy_field("age_group", "Age Group", "intended age group when clearly implied"), _taxonomy_field("character_theme", "Character / Theme", "licensed character, theme, or play theme when supported"), _taxonomy_field("material", "Material", "main toy material such as plush, plastic, wood, silicone"), _taxonomy_field("power_source", "Power Source", "battery, rechargeable, wind-up, or non-powered when supported"), _taxonomy_field("interactive_features", "Interactive Features", "interactive functions such as sound, lights, remote control, motion"), _taxonomy_field("educational_play_value", "Educational / Play Value", "play value such as STEM, pretend play, sensory, puzzle solving"), _taxonomy_field("piece_count_size", "Piece Count / Size", "piece count or size when stated"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("use_scenario", "Use Scenario", "intended use such as indoor play, bath time, party favor, outdoor play"), ) SHOES_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise footwear category label"), _taxonomy_field("target_gender", "Target Gender", "intended gender only if clearly implied"), _taxonomy_field("age_group", "Age Group", "only if clearly implied"), _taxonomy_field("closure_type", "Closure Type", "fastening method such as lace-up, slip-on, buckle, hook-and-loop"), _taxonomy_field("toe_shape", "Toe Shape", "toe shape when applicable, e.g. round toe, pointed toe, open toe"), _taxonomy_field("heel_sole_type", "Heel Height / Sole Type", "heel or sole profile such as flat, block heel, wedge, platform, thick sole"), _taxonomy_field("upper_material", "Upper Material", "main upper material such as leather, knit, canvas, mesh"), _taxonomy_field("lining_insole_material", "Lining / Insole Material", "lining or insole material when supported"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("occasion_end_use", "Occasion / End Use", "likely use such as running, casual, office, hiking, formal"), ) SPORTS_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise sports product category label"), _taxonomy_field("sport_activity", "Sport / Activity", "primary sport or activity such as fitness, yoga, basketball, cycling, swimming"), _taxonomy_field("skill_level", "Skill Level", "target user level when supported, e.g. beginner, training, professional"), _taxonomy_field("material", "Material", "main material such as EVA, carbon fiber, neoprene, latex"), _taxonomy_field("size_capacity", "Size / Capacity", "size, weight, resistance level, or capacity when stated"), _taxonomy_field("protection_support", "Protection / Support", "support or protection function such as ankle support, shock absorption, impact protection"), _taxonomy_field("key_features", "Key Features", "main features such as anti-slip, adjustable, foldable, quick-dry"), _taxonomy_field("power_source", "Power Source", "battery, electric, or non-powered when applicable"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("use_scenario", "Use Scenario", "intended use such as gym, home workout, field training, competition"), ) OTHERS_TAXONOMY_FIELDS = ( _taxonomy_field("product_type", "Product Type", "concise product category label, not a full marketing title"), _taxonomy_field("product_category", "Product Category", "broader retail grouping when the specific product type is narrow"), _taxonomy_field("target_user", "Target User", "intended user, audience, or recipient when clearly implied"), _taxonomy_field("material_ingredients", "Material / Ingredients", "main material or ingredients when supported"), _taxonomy_field("key_features", "Key Features", "primary product attributes or standout features"), _taxonomy_field("functional_benefits", "Functional Benefits", "practical benefits or performance advantages when supported"), _taxonomy_field("size_capacity", "Size / Capacity", "size, count, weight, or capacity when stated"), _taxonomy_field("color", "Color", "specific color name when available"), _taxonomy_field("style_theme", "Style / Theme", "overall style, design theme, or visual direction when supported"), _taxonomy_field("use_scenario", "Use Scenario", "likely use occasion or application setting when supported"), ) CATEGORY_TAXONOMY_PROFILES: Dict[str, Dict[str, Any]] = { "apparel": _make_taxonomy_profile( "apparel", APPAREL_TAXONOMY_FIELDS, aliases=("服装", "服饰", "apparel", "clothing", "fashion"), output_languages=("zh", "en"), zh_headers=tuple(field["zh_label"] for field in APPAREL_TAXONOMY_FIELDS), ), "3c": _make_taxonomy_profile( "3C", THREE_C_TAXONOMY_FIELDS, aliases=("3c", "数码", "phone accessories", "computer peripherals", "smart wearables", "audio", "gaming gear"), ), "bags": _make_taxonomy_profile( "bags", BAGS_TAXONOMY_FIELDS, aliases=("bags", "bag", "包", "箱包", "handbag", "backpack", "wallet", "luggage"), ), "pet_supplies": _make_taxonomy_profile( "pet supplies", PET_SUPPLIES_TAXONOMY_FIELDS, aliases=("pet", "宠物", "pet supplies", "pet food", "pet toys", "pet care"), ), "electronics": _make_taxonomy_profile( "electronics", ELECTRONICS_TAXONOMY_FIELDS, aliases=("electronics", "电子", "electronic components", "consumer electronics", "digital devices"), ), "outdoor": _make_taxonomy_profile( "outdoor products", OUTDOOR_TAXONOMY_FIELDS, aliases=("outdoor", "户外", "camping", "hiking", "fishing", "travel accessories"), ), "home_appliances": _make_taxonomy_profile( "home appliances", HOME_APPLIANCES_TAXONOMY_FIELDS, aliases=("home appliances", "家电", "电器", "kitchen appliances", "cleaning appliances", "smart home devices"), ), "home_living": _make_taxonomy_profile( "home and living", HOME_LIVING_TAXONOMY_FIELDS, aliases=("home", "living", "家居", "家具", "家纺", "home decor", "kitchenware"), ), "wigs": _make_taxonomy_profile( "wigs", WIGS_TAXONOMY_FIELDS, aliases=("wig", "wigs", "假发", "hairpiece"), ), "beauty": _make_taxonomy_profile( "beauty and cosmetics", BEAUTY_TAXONOMY_FIELDS, aliases=("beauty", "cosmetics", "美容", "美妆", "makeup", "skincare", "nail care"), ), "accessories": _make_taxonomy_profile( "accessories", ACCESSORIES_TAXONOMY_FIELDS, aliases=("accessories", "配饰", "jewelry", "watches", "belts", "scarves", "hats", "sunglasses"), ), "toys": _make_taxonomy_profile( "toys", TOYS_TAXONOMY_FIELDS, aliases=("toys", "toy", "玩具", "plush", "action figures", "puzzles", "educational toys"), ), "shoes": _make_taxonomy_profile( "shoes", SHOES_TAXONOMY_FIELDS, aliases=("shoes", "shoe", "鞋", "sneakers", "boots", "sandals", "heels"), ), "sports": _make_taxonomy_profile( "sports products", SPORTS_TAXONOMY_FIELDS, aliases=("sports", "sport", "运动", "fitness", "cycling", "team sports", "water sports"), ), "others": _make_taxonomy_profile( "general merchandise", OTHERS_TAXONOMY_FIELDS, aliases=("others", "other", "其他", "general merchandise"), ), } CATEGORY_TAXONOMY_PROFILE_NAMES = tuple(CATEGORY_TAXONOMY_PROFILES.keys()) TAXONOMY_SHARED_ANALYSIS_INSTRUCTION = CATEGORY_TAXONOMY_PROFILES["apparel"]["shared_instruction"] TAXONOMY_MARKDOWN_TABLE_HEADERS_EN = CATEGORY_TAXONOMY_PROFILES["apparel"]["markdown_table_headers"]["en"] TAXONOMY_LANGUAGE_MARKDOWN_TABLE_HEADERS: Dict[str, Dict[str, Any]] = CATEGORY_TAXONOMY_PROFILES["apparel"]["markdown_table_headers"] LANGUAGE_MARKDOWN_TABLE_HEADERS: Dict[str, Dict[str, Any]] = { "en": [ "No.", "Product title", "Category path", "Fine-grained tags", "Target audience", "Usage scene", "Season", "Key attributes", "Material", "Features", "Anchor text" ], "zh": [ "序号", "商品标题", "品类路径", "细分标签", "适用人群", "使用场景", "适用季节", "关键属性", "材质说明", "功能特点", "锚文本" ], "zh_tw": [ "序號", "商品標題", "品類路徑", "細分標籤", "適用人群", "使用場景", "適用季節", "關鍵屬性", "材質說明", "功能特點", "錨文本" ], "ru": [ "№", "Название товара", "Путь категории", "Детализированные теги", "Целевая аудитория", "Сценарий использования", "Сезон", "Ключевые атрибуты", "Материал", "Особенности", "Анкорный текст" ], "ja": [ "番号", "商品タイトル", "カテゴリパス", "詳細タグ", "対象ユーザー", "利用シーン", "季節", "主要属性", "素材", "機能特徴", "アンカーテキスト" ], "ko": [ "번호", "상품 제목", "카테고리 경로", "세부 태그", "대상 고객", "사용 장면", "계절", "핵심 속성", "소재", "기능 특징", "앵커 텍스트" ], "es": [ "N.º", "Titulo del producto", "Ruta de categoria", "Etiquetas detalladas", "Publico objetivo", "Escenario de uso", "Temporada", "Atributos clave", "Material", "Caracteristicas", "Texto ancla" ], "fr": [ "N°", "Titre du produit", "Chemin de categorie", "Etiquettes detaillees", "Public cible", "Scenario d'utilisation", "Saison", "Attributs cles", "Matiere", "Caracteristiques", "Texte d'ancrage" ], "pt": [ "Nº", "Titulo do produto", "Caminho da categoria", "Tags detalhadas", "Publico-alvo", "Cenario de uso", "Estacao", "Atributos principais", "Material", "Caracteristicas", "Texto ancora" ], "de": [ "Nr.", "Produkttitel", "Kategoriepfad", "Detaillierte Tags", "Zielgruppe", "Nutzungsszenario", "Saison", "Wichtige Attribute", "Material", "Funktionen", "Ankertext" ], "it": [ "N.", "Titolo del prodotto", "Percorso categoria", "Tag dettagliati", "Pubblico target", "Scenario d'uso", "Stagione", "Attributi chiave", "Materiale", "Caratteristiche", "Testo ancora" ], "th": [ "ลำดับ", "ชื่อสินค้า", "เส้นทางหมวดหมู่", "แท็กย่อย", "กลุ่มเป้าหมาย", "สถานการณ์การใช้งาน", "ฤดูกาล", "คุณสมบัติสำคัญ", "วัสดุ", "คุณสมบัติการใช้งาน", "แองเคอร์เท็กซ์" ], "vi": [ "STT", "Tieu de san pham", "Duong dan danh muc", "The chi tiet", "Doi tuong phu hop", "Boi canh su dung", "Mua phu hop", "Thuoc tinh chinh", "Chat lieu", "Tinh nang", "Van ban neo" ], "id": [ "No.", "Judul produk", "Jalur kategori", "Tag terperinci", "Target pengguna", "Skenario penggunaan", "Musim", "Atribut utama", "Bahan", "Fitur", "Teks jangkar" ], "ms": [ "No.", "Tajuk produk", "Laluan kategori", "Tag terperinci", "Sasaran pengguna", "Senario penggunaan", "Musim", "Atribut utama", "Bahan", "Ciri-ciri", "Teks sauh" ], "ar": [ "الرقم", "عنوان المنتج", "مسار الفئة", "الوسوم التفصيلية", "الفئة المستهدفة", "سيناريو الاستخدام", "الموسم", "السمات الرئيسية", "المادة", "الميزات", "نص الربط" ], "hi": [ "क्रमांक", "उत्पाद शीर्षक", "श्रेणी पथ", "विस्तृत टैग", "लक्षित उपभोक्ता", "उपयोग परिदृश्य", "मौसम", "मुख्य गुण", "सामग्री", "विशेषताएं", "एंकर टेक्स्ट" ], "he": [ "מס׳", "כותרת המוצר", "נתיב קטגוריה", "תגיות מפורטות", "קהל יעד", "תרחיש שימוש", "עונה", "מאפיינים מרכזיים", "חומר", "תכונות", "טקסט עוגן" ], "my": [ "အမှတ်စဉ်", "ကုန်ပစ္စည်းခေါင်းစဉ်", "အမျိုးအစားလမ်းကြောင်း", "အသေးစိတ်တဂ်များ", "ပစ်မှတ်အသုံးပြုသူ", "အသုံးပြုမှုအခြေအနေ", "ရာသီ", "အဓိကဂုဏ်သတ္တိများ", "ပစ္စည်း", "လုပ်ဆောင်ချက်များ", "အန်ကာစာသား" ], "ta": [ "எண்", "தயாரிப்பு தலைப்பு", "வகை பாதை", "விரிவான குறிச்சொற்கள்", "இலக்கு பயனர்கள்", "பயன்பாட்டு நிலை", "பருவம்", "முக்கிய பண்புகள்", "பொருள்", "அம்சங்கள்", "ஆங்கர் உரை" ], "ur": [ "نمبر", "پروڈکٹ عنوان", "زمرہ راستہ", "تفصیلی ٹیگز", "ہدف صارفین", "استعمال کا منظر", "موسم", "کلیدی خصوصیات", "مواد", "فیچرز", "اینکر ٹیکسٹ" ], "bn": [ "ক্রম", "পণ্যের শিরোনাম", "শ্রেণি পথ", "বিস্তারিত ট্যাগ", "লক্ষ্য ব্যবহারকারী", "ব্যবহারের দৃশ্য", "মৌসুম", "মূল বৈশিষ্ট্য", "উপাদান", "ফিচার", "অ্যাঙ্কর টেক্সট" ], "pl": [ "Nr", "Tytul produktu", "Sciezka kategorii", "Szczegolowe tagi", "Grupa docelowa", "Scenariusz uzycia", "Sezon", "Kluczowe atrybuty", "Material", "Cechy", "Tekst kotwicy" ], "nl": [ "Nr.", "Producttitel", "Categoriepad", "Gedetailleerde tags", "Doelgroep", "Gebruikscontext", "Seizoen", "Belangrijke kenmerken", "Materiaal", "Functies", "Ankertekst" ], "ro": [ "Nr.", "Titlul produsului", "Calea categoriei", "Etichete detaliate", "Public tinta", "Scenariu de utilizare", "Sezon", "Atribute cheie", "Material", "Caracteristici", "Text ancora" ], "tr": [ "No.", "Urun basligi", "Kategori yolu", "Ayrintili etiketler", "Hedef kitle", "Kullanim senaryosu", "Sezon", "Temel ozellikler", "Malzeme", "Ozellikler", "Capa metni" ], "km": [ "ល.រ", "ចំណងជើងផលិតផល", "ផ្លូវប្រភេទ", "ស្លាកលម្អិត", "ក្រុមអ្នកប្រើគោលដៅ", "សេណារីយ៉ូប្រើប្រាស់", "រដូវកាល", "លក្ខណៈសម្បត្តិសំខាន់", "សម្ភារៈ", "មុខងារ", "អត្ថបទអង់ក័រ" ], "lo": [ "ລຳດັບ", "ຊື່ສິນຄ້າ", "ເສັ້ນທາງໝວດໝູ່", "ແທັກລະອຽດ", "ກຸ່ມເປົ້າໝາຍ", "ສະຖານະການໃຊ້ງານ", "ລະດູການ", "ຄຸນລັກສະນະສຳຄັນ", "ວັດສະດຸ", "ຄຸນສົມບັດ", "ຂໍ້ຄວາມອັງເຄີ" ], "yue": [ "序號", "商品標題", "品類路徑", "細分類標籤", "適用人群", "使用場景", "適用季節", "關鍵屬性", "材質說明", "功能特點", "錨文本" ], "cs": [ "C.", "Nazev produktu", "Cesta kategorie", "Podrobne stitky", "Cilova skupina", "Scenar pouziti", "Sezona", "Klicove atributy", "Material", "Vlastnosti", "Kotvici text" ], "el": [ "Α/Α", "Τίτλος προϊόντος", "Διαδρομή κατηγορίας", "Αναλυτικές ετικέτες", "Κοινό-στόχος", "Σενάριο χρήσης", "Εποχή", "Βασικά χαρακτηριστικά", "Υλικό", "Λειτουργίες", "Κείμενο άγκυρας" ], "sv": [ "Nr", "Produkttitel", "Kategorisokvag", "Detaljerade taggar", "Malgrupp", "Anvandningsscenario", "Sasong", "Viktiga attribut", "Material", "Funktioner", "Ankartext" ], "hu": [ "Sorszam", "Termekcim", "Kategoriavonal", "Reszletes cimkek", "Celcsoport", "Hasznalati helyzet", "Evszak", "Fo jellemzok", "Anyag", "Funkciok", "Horgonyszoveg" ], "da": [ "Nr.", "Produkttitel", "Kategoristi", "Detaljerede tags", "Malgruppe", "Brugsscenarie", "Saeson", "Nogleattributter", "Materiale", "Funktioner", "Ankertekst" ], "fi": [ "Nro", "Tuotteen nimi", "Kategoriapolku", "Yksityiskohtaiset tunnisteet", "Kohdeyleiso", "Kayttotilanne", "Kausi", "Keskeiset ominaisuudet", "Materiaali", "Ominaisuudet", "Ankkuriteksti" ], "uk": [ "№", "Назва товару", "Шлях категорії", "Детальні теги", "Цільова аудиторія", "Сценарій використання", "Сезон", "Ключові атрибути", "Матеріал", "Особливості", "Анкорний текст" ], "bg": [ "№", "Заглавие на продукта", "Път на категорията", "Подробни тагове", "Целева аудитория", "Сценарий на употреба", "Сезон", "Ключови атрибути", "Материал", "Характеристики", "Анкор текст" ] }