<commit_before>"use strict";

var modificationConfig = require('./modificationConfig.json');

// modKey should be a key in modificationsConfig (eg. 'turf_grass').
function getHumanReadableName(modKey) {
    if (modificationConfig[modKey]) {
        return modificationConfig[modKey].name;
    } else {
        throw 'Unknown Land Cover or Conservation Practice: ' + modKey;
    }
}

// If no shortName, just use name.
function getHumanReadableShortName(modKey) {
    if (modificationConfig[modKey]) {
        if (modificationConfig[modKey].shortName) {
            return modificationConfig[modKey].shortName;
        } else {
            return modificationConfig[modKey].name;
        }
    } else {
        throw 'Unknown Land Cover or Conservation Practice: ' + modKey;
    }
}

function getHumanReadableSummary(modKey) {
    if (modificationConfig[modKey]) {
        return modificationConfig[modKey].summary || '';
    } else {
        throw 'Unknown Land Cover or Conservation Practice: ' + modKey;
    }
}

var getDrawOpts = function(modKey) {
    if (modKey && modificationConfig[modKey] && modificationConfig[modKey].color) {
        return {
            color: modificationConfig[modKey].color,
            opacity: 1,
            weight: 3,
            fillColor: 'url(#fill-' + modKey + ')',
            fillOpacity: 0.74
        };
    } else {<commit_msg>Fail silently when we can't find template labels<commit_after>"use strict";

var modificationConfig = require('./modificationConfig.json');

// modKey should be a key in modificationsConfig (eg. 'turf_grass').
function getHumanReadableName(modKey) {
    if (modificationConfig[modKey]) {
        return modificationConfig[modKey].name;
    }
    console.warn('Unknown Land Cover or Conservation Practice: ' + modKey);
    return '';
}

// If no shortName, just use name.
function getHumanReadableShortName(modKey) {
    if (modificationConfig[modKey]) {
        if (modificationConfig[modKey].shortName) {
            return modificationConfig[modKey].shortName;
        } else {
            return modificationConfig[modKey].name;
        }
    }
    console.warn('Unknown Land Cover or Conservation Practice: ' + modKey);
    return '';
}

function getHumanReadableSummary(modKey) {
    if (modificationConfig[modKey]) {
        return modificationConfig[modKey].summary || '';
    }
    console.warn('Unknown Land Cover or Conservation Practice: ' + modKey);
    return '';
}

var getDrawOpts = function(modKey) {
    if (modKey && modificationConfig[modKey] && modificationConfig[modKey].color) {
        return {
            color: modificationConfig[modKey].color,
            opacity: 1,
            weight: 3,
            fillColor: 'url(#fill-' + modKey + ')',
            fillOpacity: 0.74
        };
    } else {
{'fraction_non_alphanumeric': 0.11278195488721804, 'fraction_numerical': 0.0035803795202291443, 'mean_word_length': 2.8537931034482757, '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': '2268835', 'n_tokens_mistral': 793, 'n_tokens_neox': 765, 'n_words': 184}