<commit_before>/*~
-- DATABASE INITIALIZATION -----------------------------------------------------
--
-- The following code performs the initial setup of the PostgreSQL database with
-- required objects for the anchor database.
--
--------------------------------------------------------------------------------

CREATE SCHEMA IF NOT EXISTS $schema.metadata.encapsulation;

~*/<commit_msg>Added database initialization file.<commit_after>/*~
-- DATABASE INITIALIZATION -----------------------------------------------------
--
-- The following code performs the initial setup of the PostgreSQL database with
-- required objects for the anchor database.
--
--------------------------------------------------------------------------------

-- create schema
CREATE SCHEMA IF NOT EXISTS $schema.metadata.encapsulation;

-- set schema search path
SET search_path = $schema.metadata.encapsulation;

-- drop universal function that generates checksum values
-- DROP FUNCTION IF EXISTS $schema.metadata.encapsulation\.$schema.metadata.checksumFunction(text);

-- create universal function that generates checksum values
CREATE OR REPLACE FUNCTION $schema.metadata.encapsulation\.$schema.metadata.checksumFunction(
    value text
) RETURNS $schema.metadata.checksumType AS '
    BEGIN
        return cast(
            substring(
                MD5(value) for 16
            ) as $schema.metadata.checksumType
        );
    END;
' LANGUAGE plpgsql;

~*/
{'fraction_non_alphanumeric': 0.2546712802768166, 'fraction_numerical': 0.0020761245674740486, 'mean_word_length': 1.7129455909943714, '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': '7306934', 'n_tokens_mistral': 337, 'n_tokens_neox': 326, 'n_words': 107}