<commit_before>var e = module.exports = {};
var bu;

var bot;
e.init = (Tbot, blargutil) => {
    bot = Tbot;
    bu = blargutil;

    e.category = bu.TagType.COMPLEX;
};

e.requireCtx = require;

e.isTag = true;
e.name = 'switch';
e.args = '&lt;arg&gt; &lt;case1&gt; &lt;then1&gt; [case2] [then2].. [else]';
e.usage = '{switch;arg;case1;then1[;case2;then2..][;else]}';
e.desc = 'Finds the <code>case</code> that matches <code>arg</code> and returns the following <code>then</code>.'
        +'If there is no matching <code>case</code> and <code>else</code> is specified,'
        +'<code>else</code> is returned. If not, it returns blank.';
e.exampleIn = '{switch;{args;0};yes;Correct!;no;Incorrect!;That is not yes or no}';
e.exampleOut = 'Correct!';

e.execute = (params) => {
    for (let i = 1; i < params.args.length; i++) {
        params.args[i] = bu.processTagInner(params, i);
    }
    let args = params.args;
    var replaceString = '';
    var replaceContent = false;
    var elseDo = '';
    var cases = {};
    args.shift();
    var arg = args[0];
    args.shift();
    for (let i = 0; i < args.length; i++) {
        if (i != args.length - 1) {
            cases[args[i]] = args[i+1];
            i++;
        } else {
            elseDo = args[i];
        }
    }
    if (args.length % 2 != 1) replaceString = cases[arg] || elseDo;
    else replaceString = cases[arg] || '';
    return {
        replaceString: replaceString,
        replaceContent: replaceContent
    };
};<commit_msg>only execute some params<commit_after>var e = module.exports = {};
var bu;

var bot;
e.init = (Tbot, blargutil) => {
    bot = Tbot;
    bu = blargutil;

    e.category = bu.TagType.COMPLEX;
};

e.requireCtx = require;

e.isTag = true;
e.name = 'switch';
e.args = '&lt;arg&gt; &lt;case1&gt; &lt;then1&gt; [case2] [then2].. [default]';
e.usage = '{switch;arg;case1;then1[;case2;then2..][;default]}';
e.desc = 'Finds the <code>case</code> that matches <code>arg</code> and returns the following <code>then</code>.'
    + 'If there is no matching <code>case</code> and <code>default</code> is specified,'
    + '<code>default</code> is returned. If not, it returns blank.';
e.exampleIn = '{switch;{args;0};yes;Correct!;no;Incorrect!;That is not yes or no}';
e.exampleOut = 'Correct!';

e.execute = (params) => {
    params.args[1] = bu.processTagInner(params, 1);
    for (let i = 2; i < params.args.length; i += 2) {
        params.args[i] = bu.processTagInner(params, i);
    }
    let args = params.args;
    var replaceString = '';
    var replaceContent = false;
    var elseDo = '';
    var cases = {};
    args.shift();
    var arg = args[0];
    args.shift();
    for (let i = 0; i < args.length; i++) {
        if (i != args.length - 1) {
            cases[args[i]] = args[i + 1];
            i++;
        } else {
            elseDo = args[i];
        }
    }
    if (args.length % 2 != 1) replaceString = cases[arg] || elseDo;
    else replaceString = cases[arg] || '';
    replaceString = bu.processTag(params.msg
        , params.words
        , replaceString
        , params.fallback
        , params.author
        , params.tagName);
    return {
        replaceString: replaceString,
        replaceContent: replaceContent
    };
};
{'fraction_non_alphanumeric': 0.17790089258233302, 'fraction_numerical': 0.01077254539858418, 'mean_word_length': 2.6640360766629088, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6561774', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1144, 'n_words': 277}