<commit_before>import Validator from 'vue-validator';

var init = () => {
    Vue.use(Validator);

    Vue.validator('email', function(val) {
        return /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(val)
    })

    Vue.validator('number', function(val) {
        return /^[-]?[0-9]+(.[0-9]*)?$/.test(val)
    })

    Vue.validator('posInt', function(val) {
        return /^[0-9]*$/.test(val)
    })
}

export default {
    init: init
};<commit_msg>add validator for parse float<commit_after>import Validator from 'vue-validator';

var init = () => {
    Vue.use(Validator);

    Vue.validator('email', function(val) {
        return /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(val)
    })

    Vue.validator('number', function(val) {
        return /^[-]?[0-9]+(.[0-9]*)?$/.test(val)
    })

    Vue.validator('posInt', function(val) {
        return /^[0-9]*$/.test(val)
    })

    Vue.validator('posFloat', function(val) {
        return /^[0-9][1-9]*(.?[1-9]*)$/.test(val)
    })
}

export default {
    init: init
};
{'fraction_non_alphanumeric': 0.3669579030976966, 'fraction_numerical': 0.04447974583002383, 'mean_word_length': 2.6842105263157894, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '747342', 'n_tokens_mistral': 581, 'n_tokens_neox': 568, 'n_words': 54}