<commit_before>(function (env) {
    "use strict";
    env.ddg_spice_just_delete_me = function(api_result) {
        if (!api_result || api_result.length < 1) {
            return Spice.failed('just_delete_me');
        }
        var script = $('[src*="/js/spice/just_delete_me/"]')[0],
            source = $(script).attr("src"),
            query = source.match(/just_delete_me\/([^\/]+)/)[1],
            decodedQuery = decodeURIComponent(query).split(" ")[0].toLowerCase();

        if (!decodedQuery || decodedQuery.length < 4) {
            return Spice.failed('just_delete_me');
        }
        var matchPartial = function(item) {
            return (item.name.toLowerCase().includes(this) || item.domains.some(domain => domain.includes(this)));
        }
        function normalizeDomains(api_result) {
            for (var i=0;i<api_result.length; i++) {
                if (!api_result[i].domains)
                    api_result[i].domains = [];
                else if (typeof(api_result[i].domains) === "string")
                    api_result[i].domains = [api_result[i].domains];
                for (var j=0; j<api_result[i].domains.length; j++) {
                    api_result[i].domains[j] = api_result[i].domains[j].toLowerCase();
                }
            }
        }
        function filterResults(api_result) {
            var results = api_result.filter(item => item.name.toLowerCase() === decodedQuery); // check for exact match by name
            if (results > 0)
                results = [results[0]]; // take only first exact match
            else {
                results = api_result.filter(item => item.domains.indexOf(decodedQuery) != -1); // check for exact domain match
            }
            if (results > 0)
                results = [results[0]]; // take only first exact match
            else {
                results = api_result.filter(matchPartial, decodedQuery); // match partial names and partial domains
            }
            return results;
        }
        normalizeDomains(api_result);
        api_result = filterResults(api_result);
        if (!api_result || api_result.length < 1) {
            return Spice.failed('just_delete_me');
        }
        Spice.add({
            id: "just_delete_me",
            name: "Answer",
            meta: {
                sourceName: 'Just Delete Me',
                sourceUrl: "http://justdelete.me/#" + decodedQuery
            },
            data: api_result,
            normalize: function(item) {
                return {
                    delete_url: item.url,
                    title: item.name,
                    url: item.url ? item.url : "http://justdelete.me/#" + decodedQuery,
                    subtitle: "Difficulty: " + DDG.capitalize(item.difficulty),
                    description: item.notes ? item.notes : 
                                 item.email ? "Send an email to the provided address to delete your account." :
                                 item.url   ? "Click to delete your account." : 
                                 "No instructins provided."
                };
            },
            relevancy: {
                dup: 'name'
            },
            templates: {
                group: 'text',
                options: {
                    footer: Spice.just_delete_me.footer,
                    content: Spice.just_delete_me.content,
                    moreAt: true,
                    aux: false
                },
                variants: {
                    tileTitle: '1line-large',
                    tileFooter: '1line',
                    tileSnippet: 'large'
                },
                detail: api_result.length === 1 ? 'basic_info_detail' : false,
                item_detail: false
            }
        });
    };<commit_msg>fixed small typo on "instructions"<commit_after>(function (env) {
    "use strict";
    env.ddg_spice_just_delete_me = function(api_result) {
        if (!api_result || api_result.length < 1) {
            return Spice.failed('just_delete_me');
        }
        var script = $('[src*="/js/spice/just_delete_me/"]')[0],
            source = $(script).attr("src"),
            query = source.match(/just_delete_me\/([^\/]+)/)[1],
            decodedQuery = decodeURIComponent(query).split(" ")[0].toLowerCase();

        if (!decodedQuery || decodedQuery.length < 4) {
            return Spice.failed('just_delete_me');
        }
        var matchPartial = function(item) {
            return (item.name.toLowerCase().includes(this) || item.domains.some(domain => domain.includes(this)));
        }
        function normalizeDomains(api_result) {
            for (var i=0;i<api_result.length; i++) {
                if (!api_result[i].domains)
                    api_result[i].domains = [];
                else if (typeof(api_result[i].domains) === "string")
                    api_result[i].domains = [api_result[i].domains];
                for (var j=0; j<api_result[i].domains.length; j++) {
                    api_result[i].domains[j] = api_result[i].domains[j].toLowerCase();
                }
            }
        }
        function filterResults(api_result) {
            var results = api_result.filter(item => item.name.toLowerCase() === decodedQuery); // check for exact match by name
            if (results > 0)
                results = [results[0]]; // take only first exact match
            else {
                results = api_result.filter(item => item.domains.indexOf(decodedQuery) != -1); // check for exact domain match
            }
            if (results > 0)
                results = [results[0]]; // take only first exact match
            else {
                results = api_result.filter(matchPartial, decodedQuery); // match partial names and partial domains
            }
            return results;
        }
        normalizeDomains(api_result);
        api_result = filterResults(api_result);
        if (!api_result || api_result.length < 1) {
            return Spice.failed('just_delete_me');
        }
        Spice.add({
            id: "just_delete_me",
            name: "Answer",
            meta: {
                sourceName: 'Just Delete Me',
                sourceUrl: "http://justdelete.me/#" + decodedQuery
            },
            data: api_result,
            normalize: function(item) {
                return {
                    delete_url: item.url,
                    title: item.name,
                    url: item.url ? item.url : "http://justdelete.me/#" + decodedQuery,
                    subtitle: "Difficulty: " + DDG.capitalize(item.difficulty),
                    description: item.notes ? item.notes : 
                                 item.email ? "Send an email to the provided address to delete your account." :
                                 item.url   ? "Click to delete your account." : 
                                 "No instructions provided."
                };
            },
            relevancy: {
                dup: 'name'
            },
            templates: {
                group: 'text',
                options: {
                    footer: Spice.just_delete_me.footer,
                    content: Spice.just_delete_me.content,
                    moreAt: true,
                    aux: false
                },
                variants: {
                    tileTitle: '1line-large',
                    tileFooter: '1line',
                    tileSnippet: 'large'
                },
                detail: api_result.length === 1 ? 'basic_info_detail' : false,
                item_detail: false
            }
        });
    };
{'fraction_non_alphanumeric': 0.11964472309299895, 'fraction_numerical': 0.0041797283176593526, 'mean_word_length': 1.4131736526946108, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7310871', 'n_tokens_mistral': 2086, 'n_tokens_neox': 1973, 'n_words': 412}