[V10.358] 優化身份搜尋詞召回品質
This commit is contained in:
@@ -857,6 +857,30 @@ def test_marketplace_search_terms_prioritize_precise_primer_identity_phrase():
|
||||
assert "懶人霜" not in " ".join(eaoron_terms[:3])
|
||||
|
||||
|
||||
def test_marketplace_search_terms_prefer_exact_identity_for_nail_foam_and_foot_mask():
|
||||
from services.marketplace_product_matcher import build_search_terms
|
||||
|
||||
opi_terms = build_search_terms(
|
||||
"【O.P.I】Top Coat 持久閃耀保色護甲油15mL-IST31(類光繚指甲油專用亮油/小銀蓋/如膠似漆/美甲/官方直營)",
|
||||
max_terms=5,
|
||||
)
|
||||
arau_terms = build_search_terms(
|
||||
"【arau baby】愛樂寶 溫和洗手慕斯300ml (溫和不乾澀;寶寶共和國)",
|
||||
max_terms=5,
|
||||
)
|
||||
kameria_terms = build_search_terms(
|
||||
"【KAMERIA】凱蜜菈 足足稱奇足膜17ml*2枚入(任選三款)",
|
||||
max_terms=5,
|
||||
)
|
||||
|
||||
assert opi_terms[0] == "ist31 閃耀保色護甲油 15ml"
|
||||
assert "小銀蓋" not in " ".join(opi_terms[:3])
|
||||
assert arau_terms[0] == "愛樂寶 溫和洗手慕斯 300ml"
|
||||
assert "溫和不乾澀" not in " ".join(arau_terms[:3])
|
||||
assert kameria_terms[0] == "凱蜜菈 足足稱奇足膜 17ml 2包"
|
||||
assert "枚入" not in " ".join(kameria_terms[:3])
|
||||
|
||||
|
||||
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