<commit_before>class Generator {
    constructor(settings) {
        // Store the settings
        this.settings = settings;
    }

    /**
     * Generate dummy data
     * @param rule
     * @return String|Date|Integer
     */
    generate(rule) {
        if (typeof rule === "undefined" || typeof rule !== "undefined" && typeof rule.type === "undefined") {
            rule = {
                type: "unknown"
            };
        }

        switch (rule.type) {
            case "username":
                return chance.first().toLowerCase() + chance.last().toLowerCase() + chance.integer({
                        min: 111,
                        max: 999
                    });
            case "full_name":
                return chance.first() + ' ' + chance.last();
            case "first_name":
                return chance.last();
            case "last_name":
                return chance.last();
            case "gender":
                return chance.gender();
            case "email":
                return chance.email({domain: "gmail.com"}); // TODO: Include domain in settings
            case "telephone":
                return chance.phone({country: 'uk', mobile: true}); // TODO: Include country option in settings
            case "street":
                return chance.street();
            case "postal_code":
                return chance.postal();
            case "zip_code":
                return chance.zip();
            case "city":
                return chance.city();
            case "country":
                return chance.country({full: true});
            case "province":
                return chance.province({full: true});
            case "state":
                return chance.state({full: true});<commit_msg>Remove white spaces from telephone number<commit_after>class Generator {
    constructor(settings) {
        // Store the settings
        this.settings = settings;
    }

    /**
     * Generate dummy data
     * @param rule
     * @return String|Date|Integer
     */
    generate(rule) {
        if (typeof rule === "undefined" || typeof rule !== "undefined" && typeof rule.type === "undefined") {
            rule = {
                type: "unknown"
            };
        }

        switch (rule.type) {
            case "username":
                return chance.first().toLowerCase() + chance.last().toLowerCase() + chance.integer({
                        min: 111,
                        max: 999
                    });
            case "full_name":
                return chance.first() + ' ' + chance.last();
            case "first_name":
                return chance.last();
            case "last_name":
                return chance.last();
            case "gender":
                return chance.gender();
            case "email":
                return chance.email({domain: "gmail.com"}); // TODO: Include domain in settings
            case "telephone":
                return chance.phone({country: 'uk', mobile: true}).replace(' ', ''); // TODO: Include country option in settings
            case "street":
                return chance.street();
            case "postal_code":
                return chance.postal();
            case "zip_code":
                return chance.zip();
            case "city":
                return chance.city();
            case "country":
                return chance.country({full: true});
            case "province":
                return chance.province({full: true});
            case "state":
                return chance.state({full: true});
{'fraction_non_alphanumeric': 0.12231220329516895, 'fraction_numerical': 0.003351019268360793, 'mean_word_length': 1.370615486432826, 'pattern_counts': {'":': 28, '<': 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': '2741475', 'n_tokens_mistral': 875, 'n_tokens_neox': 820, 'n_words': 228}