<commit_before>/**
 * Created by kintesh on 28/01/15.
 */
;(function(){

    var constants = require("./constants");

    /**
     * Removes comments from the input.
     *
     * @param {string} source text
     * @returns {string} source text without comments
     */
    exports.removeComments = function(source) {
        return source.replace(constants.regex_comments, "");
    };

    /**
     * Reads slides properties and meta tags from source.
     *
     * @param {string} source text
     * @returns {{}} object with properties
     */
    exports.readProperties = function(source) {
        var properties = {},
            sLines = source.split(constants.regex_lines);
        for(var i=0; i<sLines.length; i++) {
            var cLine = sLines[i],
                match = constants.regex_properties.exec(cLine);
            if(cLine == constants.frame_separator)
                break;
            if(match != null)
                properties[match[1]] = match[2];
        }
        return properties;
    };

    /**
     * Extracts frames from the source.
     * @param {string} source text
     * @returns {Array} list of frames.
     */
    exports.extractFrames = function(source) {
        var frames = [];
        var match = constants.regex_frame.exec(source);
        while(match != null) {
            frames.push(match[1]);
            match = constants.regex_frame.exec(source);
        }
        return frames;<commit_msg>updated.<commit_after>/**
 * Created by kintesh on 28/01/15.
 */
;(function(){

    var constants = require("./constants");

    /**
     * Removes comments from the input.
     *
     * @param {string} source text
     * @returns {string} source text without comments
     */
    exports.removeComments = function(source) {
        return source.replace(constants.regex_comments, "");
    };

    /**
     * Reads slides properties and meta tags from source.
     *
     * @param {string} source text
     * @returns {{}} object with properties
     */
    exports.readProperties = function(source) {
        var properties = {},
            sLines = source.split(constants.regex_lines);
        for(var i=0; i<sLines.length; i++) {
            var cLine = sLines[i],
                match = constants.regex_properties.exec(cLine);
            if(cLine == constants.frame_separator)
                break;
            if(match != null)
                properties[match[1]] = match[2];
        }
        return properties;
    };

    /**
     * Extracts frames from the source.
     *
     * @param {string} source text
     * @returns {Array} list of frames.
     */
    exports.extractFrames = function(source) {
        var frames = [];
        var match = constants.regex_frame.exec(source);
        while(match != null) {
            frames.push(match[1]);
            match = constants.regex_frame.exec(source);
        }
        return frames;
{'fraction_non_alphanumeric': 0.12551724137931033, 'fraction_numerical': 0.006896551724137931, 'mean_word_length': 1.9481707317073171, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3695107', 'n_tokens_mistral': 816, 'n_tokens_neox': 792, 'n_words': 193}