Created
May 14, 2019 03:59
-
-
Save GalvinGao/801b57ad228d976c83761808d520c71c to your computer and use it in GitHub Desktop.
Stop asking me for commenting on things i've bought - "they were usable", that's it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
PAIRS = [ | |
["宝贝", "非常好 完美 太棒了 爱死了 喜欢 是正品"], | |
["价格", "不错 便宜 实惠 舒服 不高 刚刚好"], | |
["质量", "优良 完美 上乘 很棒 很好 不错 挺好的 有保障"], | |
["快递", "很不错 很快 特别快 也很快 配送快捷"], | |
["包装", "的特别好 得很漂亮 很严实 得很好"], | |
["卖家", "人特别好 说话好听 负责 有经验 很强 很负责"], | |
] | |
OTHERS = "划算 方便 快捷 实惠 性价比很高 值得购买 超级好用" | |
ADDITIONAL = [ | |
"发货速度,物流也相当快!", | |
"宝贝收到了,价格实惠,质量真的不错,买的特别划算。这次网购是我最满意的的一次,这个价格能买到这么好的宝贝真的是物有所值", | |
"真的超级喜欢,非常支持", | |
"质量非常好,与卖家描述的完全一致,非常满意,真的很喜欢", | |
"完全超出期望值,发货速度非常快,包装非常仔细、严实", | |
"物流公司服务态度很好,运送速度很快", | |
"很满意的一次购物,一点毛病没有", | |
"质量手感都很好,还没有使用,希望耐用", | |
"正品保障,在这么深的淘海里能找到自己期待已久的宝贝" | |
] | |
if __name__ == '__main__': | |
keywords = [] | |
pairs = random.choices(PAIRS, k=random.randint(3, 5)) | |
for pair in pairs: | |
word = pair[0] | |
desc = random.choice(pair[1].split(" ")) | |
keywords.append(f"{word}{desc}") | |
others = OTHERS.split(" ") | |
random.shuffle(others) | |
for keyword in others: | |
keywords.append(keyword) | |
additional = random.choices(ADDITIONAL, k=random.randint(3, 5)) | |
result = f"{','.join(keywords)};{';'.join(additional)}" | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment