<commit_before>function computeComparisons(v, homonyme) {   
        let r = [];
        Helpers.eachObject(homonyme, (attr, val) => {
            if (attr === 'uid' || attr === 'dn' || attr === 'score') return; 
            var val2 = "" + (val || '');
            if (!(attr in v)) return;
            var val1 = "" + (v[attr] || '');
            if (val1 !== val2) {
                r.push({ attr, cmp: Helpers.formatDifferences(val1, val2) });
            }
        });
        return r;
}

const CompareUsers : ComponentOptions<any> = {
    props: ['v', 'homonyme'],
    computed: {
        comparisons() {
            let v_ = Ws.toWs(this.v);
            return computeComparisons(v_, this.homonyme);
        },
        label() {
            return conf.attr_labels;
        },
    },
    template: `
 <div>
   <div v-if="comparisons.length == 0">
     Le compte <b>{{homonyme.uid}}</b> correspond exactement.
   </div>
   <div v-else><commit_msg>ignore more attributes when comparing with existing accounts<commit_after>function computeComparisons(v, homonyme) {   
        let r = [];
        Helpers.eachObject(homonyme, (attr, val) => {
            if (attr === 'uid' || attr === 'dn' || attr === 'score' || attr === 'jpegPhoto' || attr === 'eduPersonAffiliation') return; 
            var val2 = "" + (val || '');
            if (!(attr in v)) return;
            var val1 = "" + (v[attr] || '');
            if (val1 !== val2) {
                r.push({ attr, cmp: Helpers.formatDifferences(val1, val2) });
            }
        });
        return r;
}

const CompareUsers : ComponentOptions<any> = {
    props: ['v', 'homonyme'],
    computed: {
        comparisons() {
            let v_ = Ws.toWs(this.v);
            return computeComparisons(v_, this.homonyme);
        },
        label() {
            return conf.attr_labels;
        },
    },
    template: `
 <div>
   <div v-if="comparisons.length == 0">
     Le compte <b>{{homonyme.uid}}</b> correspond exactement.
   </div>
   <div v-else>
{'fraction_non_alphanumeric': 0.1727904667328699, 'fraction_numerical': 0.006951340615690168, 'mean_word_length': 1.8785714285714286, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, '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': '7219049', 'n_tokens_mistral': 646, 'n_tokens_neox': 636, 'n_words': 144}