from traceback import format_exc, extract_stack, format_list
from ..loader import load_rules as load

def run(**kw):
    try:
        load(kw['region'], kw['wvfbi'], kw['no_replace'], kw['sentence'], kw['offense'])
        return 1
    except:
        if kw['verbose']:
            raise
        return (format_exc(), format_list(extract_stack())) 