<commit_before>var Vizabi = function(tool_path, container, options) {
    var loaded = false,
        viz = {
            _tool: null,
            name: null,
            placeholder: null,
            setOptions: function(opts, overwrite) {
                if (tool) tool.setOptions(opts, overwrite);
            }
        };

    //require to import all tools, components, etc to AMD version
    require(["plugins"], function() {

        var tool_name = tool_path.split("/").pop(),
            path = 'tools/' + tool_path + '/' + tool_name;

        // extending options with name and tool's placeholder
        viz.name = tool_name;
        viz.placeholder = container;

        //require and render tool
        require([path], function(Tool) {
            viz._tool = new Tool(viz, options);
        });

    });

    /* Vizabi API Methods*/
    return viz;<commit_msg>Expose tool to vizabi object<commit_after>var Vizabi = function(tool_path, container, options) {

    var tool_name = tool_path.split("/").pop(),
        path = 'tools/' + tool_path + '/' + tool_name,
        loaded = false,
        viz = {
            _name: tool_name,
            _placeholder: container,
            _tool: null,
            setOptions: function(opts, overwrite) {
                if (tool) tool.setOptions(opts, overwrite);
            }
        },
        tool;

    //require to import all tools, components, etc to AMD version
    require(["plugins"], function() {

        //require and render tool
        require([path], function(Tool) {
            viz._tool = tool = new Tool({
                name: viz._name,
                placeholder: viz._placeholder
            }, options);

        });

    });

    /* Vizabi API Methods*/
    return viz;
{'fraction_non_alphanumeric': 0.1187214611872146, 'fraction_numerical': 0.0, 'mean_word_length': 1.7562893081761006, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3164033', 'n_tokens_mistral': 494, 'n_tokens_neox': 464, 'n_words': 131}