tineret.py 文件源码

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

项目:czl-scrape 作者: code4romania 项目源码 文件源码
def get_type(self, text):
        text = unidecode(text).lower().strip()
        type = None

        stop_pos = re.search(r'(pentru|privind)', text)
        if stop_pos:
            text = text[0:stop_pos.start()]

        if re.search(r'ordin', text):
            type = 'OM'

        if re.search(r'lege', text):
            type = 'LEGE'

        if re.search(r'hotarare', text):
            type = 'HG'

        if re.search(r'ordonanta', text):
            if re.search(r'urgenta', text):
                type = 'OUG'
            else:
                type = 'OG'

        return type
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号