<commit_before>const redis = require('redis');

exports.getAlphabet = (callback) => {
    // Get a Redis client from the connection pool
    const client = redis.createClient();

    // Connect to Redis Server
    client.on('connect', () => {
        // This is the hash that will be stored in Redis
        const hash = 'fr:alphabet';

        // Check if the key is already present in redis
        // if the product is there already we skip it
        // Otherwise we store it in Redis
        client.exists(hash, (err, reply) => {
            if (err) {
                return callback(err);
            }
            if (reply === 1) {
                console.log('Found Key in Redis');
                // After all data is returned, return results
                return callback(null, 'Found Key in Redis');
            }
            if (reply === 0) {
                console.log('Alphabet not found');
                return callback(null);
            }
            return callback(null);
        });
    });
};
<commit_msg>Added function to retrieve alphabet set from Redis<commit_after>const redis = require('redis');

exports.getAlphabet = (callback) => {
    // Get a Redis client from the connection pool
    const client = redis.createClient();

    // Connect to Redis Server
    client.on('connect', () => {
        // This is the hash that will be stored in Redis
        const hash = 'fr:alphabet';

        // Check if the key is already present in redis
        // if the product is there already we skip it
        // Otherwise we store it in Redis
        client.exists(hash, (err, reply) => {
            if (err) {
                return callback(err);
            }
            if (reply === 1) {
                console.log('Found Key in Redis');
                // After all data is returned, return results
                client.smembers(hash, (error, members) => {
                    if (error) {
                        return callback(error);
                    }
                    console.log(members);
                    return callback(null, members);
                });
                return callback(null, 'Found Key in Redis');
            }
            if (reply === 0) {
                console.log('Alphabet not found');
                return callback(null);
            }
            return callback(null);
        });
    });
};

{'fraction_non_alphanumeric': 0.10621326616288833, 'fraction_numerical': 0.0016792611251049538, 'mean_word_length': 1.4617768595041323, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '5906262', 'n_tokens_mistral': 609, 'n_tokens_neox': 580, 'n_words': 208}