def pattern_rate_trend(cls): # rstr_idk = RegexTool.rstr_iter2or(map(re.escape, cls.dict_lang2text_idk().values())) rstr_arrows = RegexTool.rstr_iter2or( map(re.escape, Trend.dict_trend2arrow().values())) rstr_rate_trend = RegexTool.join(r"", [r"\d{2,3}", rstr_arrows]) # rstr = r"{}\s*$".format(RegexTool.rstr_iter2or([rstr_idk, rstr_rate_trend])) # rstr = r"{}\s*$".format(rstr_rate_trend) # raise Exception(rstr) pattern = re.compile(RegexTool.rstr2wordbounded(rstr_rate_trend), re.I) return pattern
def pattern_ko(cls): return re.compile(RegexTool.rstr2wordbounded(r"육메(?:크|클)?"))
def pattern(cls): return re.compile(RegexTool.rstr2wordbounded(cls.rstr()), re.I)
def pattern(cls): return re.compile(RegexTool.rstr2wordbounded("[+-]"))