"""Finite bilingual appearance modifiers for existing scene entities only. Canonical values are intent tags, not asset eligibility or satisfaction proof. Whole-house style is only ``spec.style.style_tags``; no native style filter is enabled. Entity/style/source pins and existing structured appearance win. Negation, alternatives, multiple noun references or duplicate entity kinds in one scope are unresolved. This deliberately does not perform general language understanding. """ import copy import re _VOCABULARY = { 'style_tags': { 'modern': ('现代风格', '现代风', '现代', 'modern'), 'scandinavian': ('北欧风格', '北欧风', '北欧', 'scandinavian', 'nordic'), 'industrial': ('工业风格', '工业风', '工业', 'industrial'), 'japanese': ('日式风格', '日式', 'japanese'), }, 'colors': { 'blue': ('蓝色', '蓝', 'blue'), 'white': ('白色', '白', 'white'), 'black': ('黑色', '黑', 'black'), 'gray': ('灰色', '灰', 'gray', 'grey'), 'beige': ('米色', 'beige'), 'red': ('红色', '红', 'red'), 'green': ('绿色', '绿', 'green'), 'brown': ('棕色', '褐色', 'brown'), }, 'materials': { 'solid_wood': ('实木', 'solid wood', 'solid-wood'), 'wood': ('木质', '木制', '木头', 'wooden', 'wood'), 'metal': ('金属', 'metal'), 'velvet': ('丝绒', 'velvet'), 'leather': ('皮革', 'leather'), 'glass': ('玻璃', 'glass'), }, 'shapes': { 'l_shaped': ('L型', 'L形', 'L-shaped', 'L shaped'), 'round': ('圆形', '圆的', 'round', 'circular'), 'square': ('方形', '方的', 'square'), 'three_seater': ('三人位', '三人座', 'three-seater', 'three seater', '3-seater'), }, } def _literal(term): pattern = re.escape(term) if term[0].isascii() and term[0].isalnum(): pattern = r'(?