analyzer.py 文件源码

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

项目:my_bit_v1 作者: iSawyer 项目源码 文件源码
def __call__(self, text, **kargs):
        words = jieba.tokenize(text, mode="search")
        token = Token()
        for (w, start_pos, stop_pos) in words:
            if not accepted_chars.match(w) and len(w) <= 1:
                continue
            token.original = token.text = w
            token.pos = start_pos
            token.startchar = start_pos
            token.endchar = stop_pos
            yield token
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号