def get_type(self, text):
text = unidecode(text).lower().strip()
type = None
stop_pos = re.search(r'(pentru|privind)', text).start()
if stop_pos:
text = text[0:stop_pos]
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
评论列表
文章目录