normalize.py 文件源码

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

项目:tashaphyne 作者: linuxscout 项目源码 文件源码
def strip_tatweel(text):
    """
    Strip tatweel from a text and return a result text.

    Example:
        >>> text=u"????????????"
        >>> strip_tatweel(text)
        ???????

    @param text: arabic text.
    @type text: unicode.
    @return: return a striped text.
    @rtype: unicode.
    """
    return re.sub(u'[%s]' % arabconst.TATWEEL, '', text)


#--------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号