<commit_before>'use strict';

// =================================================================================
// App Configuration: Create Webhook + Enable Logging + Language Resources Object
// =================================================================================

const webhook = require('../index').Webhook;
const app = require('../index').Jovo;

// Enable Logging for Quick Testing
app.enableRequestLogging();
app.enableResponseLogging();

let languageResources = {
    'en-US': {
        translation: {
            WELCOME: 'Welcome',
            WELCOME_WITH_PARAMETER: 'Welcome %s',
        },
    },
    'de-DE': {
        translation: {
            WELCOME: 'Willkommen',
            WELCOME_WITH_PARAMETER: 'Willkommen %s',
        },
    },
};

// Listen for post requests
webhook.listen(3000, function() {
    console.log('Example server listening on port 3000!');
});

webhook.post('/webhook', function(req, res) {
    app.handleRequest(req, res, handlers);
    app.execute();
});


// =================================================================================<commit_msg>:memo: Fixed i18n example file<commit_after>'use strict';

// =================================================================================
// App Configuration: Create Webhook + Enable Logging + Language Resources Object
// =================================================================================

const webhook = require('../index').Webhook;
const app = require('../index').Jovo;

// Enable Logging for Quick Testing
app.enableRequestLogging();
app.enableResponseLogging();

let languageResources = {
    'en-US': {
        translation: {
            WELCOME: 'Welcome',
            WELCOME_WITH_PARAMETER: 'Welcome %s',
        },
    },
    'de-DE': {
        translation: {
            WELCOME: 'Willkommen',
            WELCOME_WITH_PARAMETER: 'Willkommen %s',
        },
    },
};

// Listen for post requests
webhook.listen(3000, function() {
    console.log('Example server listening on port 3000!');
});

webhook.post('/webhook', function(req, res) {
    app.handleRequest(req, res, handlers);
    app.setLanguageResources(languageResources);
    app.execute();
});


// =================================================================================
{'fraction_non_alphanumeric': 0.3309982486865149, 'fraction_numerical': 0.00788091068301226, 'mean_word_length': 3.8105263157894735, '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': '7209463', 'n_tokens_mistral': 604, 'n_tokens_neox': 561, 'n_words': 123}