<commit_before>// Fuzzy.js
// Written by Extaze
// Released under MIT license

/*

Usage :
> var arr = ['A sentence composed of multiple words', 'Set syntax JavaScript'];
> fuzzy(arr, 'scmw');

['A <span>s</span>enten<span>c</span>e co<span>m</span>posed of multiple <span>w</span>ords']

> fuzzy(arr, 'w', true, '', ''); // Case-sensitive and highlight chooser

['A sentence composed of multiple words']
*/

// Improved from Bulat Bochkariov's version (http://www.quora.com/Algorithms/How-is-the-fuzzy-search-algorithm-in-Sublime-Text-designed)
;(function (window) {
    window.fuzzy = function (searchSet, query, caseSensitive, surroundBefore, surroundAfter) {
        if (!query) return searchSet;
        if (caseSensitive === undefined) {
            caseSensitive = false;
        }
        if (surroundBefore === undefined || surroundAfter === undefined) {
            surroundBefore = '<span>';
            surroundAfter = '</span>';
        }

        var tokens = (caseSensitive) ? query.split('') : query.toLowerCase().split(''),
            i = 0,
            l = searchSet.length,
            matches = [];<commit_msg>Removes nickname<commit_after>// Fuzzy.js
// Written by <NAME>
// Released under MIT license

/*

Usage :
> var arr = ['A sentence composed of multiple words', 'Set syntax JavaScript'];
> fuzzy(arr, 'scmw');

['A <span>s</span>enten<span>c</span>e co<span>m</span>posed of multiple <span>w</span>ords']

> fuzzy(arr, 'w', true, '', ''); // Case-sensitive and highlight chooser

['A sentence composed of multiple words']
*/

// Improved from Bulat Bochkariov's version (http://www.quora.com/Algorithms/How-is-the-fuzzy-search-algorithm-in-Sublime-Text-designed)
;(function (window) {
    window.fuzzy = function (searchSet, query, caseSensitive, surroundBefore, surroundAfter) {
        if (!query) return searchSet;
        if (caseSensitive === undefined) {
            caseSensitive = false;
        }
        if (surroundBefore === undefined || surroundAfter === undefined) {
            surroundBefore = '<span>';
            surroundAfter = '</span>';
        }

        var tokens = (caseSensitive) ? query.split('') : query.toLowerCase().split(''),
            i = 0,
            l = searchSet.length,
            matches = [];
{'fraction_non_alphanumeric': 0.15805739514348785, 'fraction_numerical': 0.0008830022075055188, 'mean_word_length': 2.9204152249134947, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7167628', 'n_tokens_mistral': 695, 'n_tokens_neox': 675, 'n_words': 171}