search.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:rules-bot 作者: bvanrijn 项目源码 文件源码
def wiki(self, query, amount=5, threshold=50):
        best = BestHandler()
        best.add(0, ('HOME', WIKI_URL))
        if query != '':
            for name, link in self._wiki.items():
                score = fuzz.ratio(query.lower(), name.split(ARROW_CHARACTER)[-1].strip().lower())
                best.add(score, (name, link))

        return best.to_list(amount, threshold)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号