<commit_before>import _ from 'lodash';
import { error, debug, info } from '../common/UtilityLog';
import { getYear, addYear, getBelgiumDate} from '../common/Utility';
import { SimulateurResultInfo } from '../model/SimulateurResultInfo';
import { SimulateurResultListInfo } from '../model/SimulateurResultListInfo';

export class SimulatorDao {

    constructor() {
    }

    getSimulatorResult(res, simulateData) {
        info('Entering getSimulatorResult() data: ' + JSON.stringify( simulateData ));

         try {
            res.end( JSON.stringify( this.getSimulatorResultInfo(simulateData) ) );
        } catch( e ) {
            error('error: ' + e);
            res.status(500).send('Problème pendant la simulation.');<commit_msg>Update SimulatorDao.js<commit_after>import _ from 'lodash';
import BasicDao from './BasicDao';
import { SimulateurResultInfo } from '../model/SimulateurResultInfo';

export class SimulatorDao extends BasicDao {

    constructor() {
    }

    getSimulatorResult(res, simulateData) {
        info('Entering getSimulatorResult() data: ' + JSON.stringify( simulateData ));

         try {
            res.end( JSON.stringify( this.getSimulatorResultInfo(simulateData) ) );
        } catch( e ) {
            error('error: ' + e);
            res.status(500).send('Problème pendant la simulation.');
{'fraction_non_alphanumeric': 0.1295880149812734, 'fraction_numerical': 0.0044943820224719105, 'mean_word_length': 3.254777070063694, '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': '4590848', 'n_tokens_mistral': 390, 'n_tokens_neox': 382, 'n_words': 82}