针对tap 的tags 数据基于order进行评分
This commit is contained in:
parent
a078193d41
commit
8aabcbad35
@ -41,10 +41,10 @@ class TapTapReport:
|
||||
if catename not in tags_data.keys():
|
||||
tags_data[catename] = {}
|
||||
temp_dict = tags_data.get(catename, {})
|
||||
print(f"base temp={temp_dict}")
|
||||
#print(f"base temp={temp_dict}")
|
||||
for tag in tags.split(","):
|
||||
temp_dict[tag] = temp_dict.get(tag, 0) + self.order2score(order)
|
||||
print(f"old={tags_data},type={catename},new={temp_dict}")
|
||||
#print(f"old={tags_data},type={catename},new={temp_dict}")
|
||||
# pdb.set_trace()
|
||||
tags_data[catename].update(temp_dict)
|
||||
except Exception:
|
||||
@ -57,11 +57,11 @@ class TapTapReport:
|
||||
if order_int <= 10 and order_int >= 1:
|
||||
return 5
|
||||
elif order_int > 10 and order_int <= 50:
|
||||
return 2
|
||||
return 3
|
||||
elif order_int <= 200:
|
||||
return 1
|
||||
return 2
|
||||
else:
|
||||
return 0
|
||||
return 1
|
||||
except Exception:
|
||||
log.error(f"PLS check order={order} ", exc_info=True)
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user