[V10.356] prioritize Lactacyd private wash identity
This commit is contained in:
@@ -323,7 +323,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '')
|
||||
# ==========================================
|
||||
# 系統版本與路徑
|
||||
# ==========================================
|
||||
SYSTEM_VERSION = "V10.355"
|
||||
SYSTEM_VERSION = "V10.356"
|
||||
LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log')
|
||||
public_url = PUBLIC_URL # 用於模板顯示
|
||||
|
||||
|
||||
@@ -287,6 +287,7 @@ SEARCH_IDENTITY_ANCHORS = (
|
||||
"水晶香氛能量寶盒禮盒組",
|
||||
"零粉感超持久柔焦蜜粉餅",
|
||||
"私密肌潔淨露",
|
||||
"私密潔浴露",
|
||||
"身體除毛器",
|
||||
"免用水潔淨液",
|
||||
"身體按摩精油",
|
||||
@@ -383,7 +384,7 @@ BRAND_ALIAS_OVERRIDES = {
|
||||
|
||||
PRODUCT_TYPES = {
|
||||
"止汗噴霧": ("止汗爽身噴霧", "爽身噴霧", "止汗噴霧"),
|
||||
"潔膚露": ("潔膚露", "浴潔露", "護潔露", "沐浴露", "wash"),
|
||||
"潔膚露": ("潔膚露", "浴潔露", "護潔露", "沐浴露", "wash", "私密潔浴露"),
|
||||
"私密噴霧": ("私密噴霧", "抑菌噴霧", "醒肌抑菌噴霧"),
|
||||
"私密凝露": ("凝露", "激淨凝露", "緊實凝露", "亮白凝露"),
|
||||
"氣墊粉餅": ("氣墊粉餅", "cushion"),
|
||||
|
||||
@@ -695,6 +695,21 @@ def test_marketplace_matcher_promotes_romand_palette_exact_line():
|
||||
assert "shared_identity_anchor_variant_safe" in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_promotes_lactacyd_private_wash_exact_line():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
diagnostics = score_marketplace_match(
|
||||
"【Lactacyd 立朵舒】私密潔浴露250ml - 滋潤緊緻/加倍修護(私密清潔 產後私密保養 更年期乾癢修護)",
|
||||
"Lactacyd 立朵舒私密潔浴露-滋潤緊緻250ml",
|
||||
momo_price=399,
|
||||
competitor_price=399,
|
||||
)
|
||||
|
||||
assert diagnostics.score >= 0.76
|
||||
assert diagnostics.hard_veto is False
|
||||
assert "shared_identity_anchor" in diagnostics.reasons
|
||||
|
||||
|
||||
def test_marketplace_matcher_promotes_shared_model_token_for_exact_model():
|
||||
from services.marketplace_product_matcher import score_marketplace_match
|
||||
|
||||
@@ -791,6 +806,18 @@ def test_marketplace_search_terms_keep_variant_descriptor_for_sensitive_lines():
|
||||
assert romand_terms[0] == "romand 勝過眼皮十色眼影盤"
|
||||
|
||||
|
||||
def test_marketplace_search_terms_prioritize_private_wash_identity_phrase():
|
||||
from services.marketplace_product_matcher import build_search_terms
|
||||
|
||||
terms = build_search_terms(
|
||||
"【Lactacyd 立朵舒】私密潔浴露250ml - 滋潤緊緻/加倍修護(私密清潔 產後私密保養 更年期乾癢修護)",
|
||||
max_terms=5,
|
||||
)
|
||||
|
||||
assert terms[0] == "立朵舒 私密潔浴露 250ml"
|
||||
assert "滋潤緊緻" in terms[1]
|
||||
|
||||
|
||||
def test_marketplace_search_terms_prefer_specific_line_over_generic_usage_words():
|
||||
from services.marketplace_product_matcher import build_search_terms
|
||||
|
||||
|
||||
Reference in New Issue
Block a user