<commit_before>function requireScript(load, url)
{
    if (!load) return;
    if (typeof require == 'undefined') {
        var head = document.getElementsByTagName('head')[0];
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = 'js/' + url;
        head.appendChild(script);
        alert('1');
    } else {
        require(url);
    }
}

requireScript(typeof Fraction == 'undefined', 'fraction.js');
requireScript(typeof MCReader == 'undefined', 'mcreader.js');
requireScript(typeof TJAWriter == 'undefined', 'tjawriter.js');

var mc2tja = function() {
    this.generated = null; // the generated result text of tja
    this.standardTja = false; // set to true to disable tja features that is only supported by malody
    this.overrideLevel = 0; // change this to specify an malody level other than the one giving in mc
    this.defaultCourse = 3; // default value if no course info is concluded
    this.defaultStar = 10; // default value if no star info is concluded
    this.levelTable = [ // standard level table, matching level & course to stars
        [0,2,3,4,5], // Kantan / Easy
        [0,0,1,2,3,4,5,6,6,7], // Futsuu / Normal
        [0,0,0,0,0,0,1,2,3,4,5,5,6,6,7,7,8], // Muzukashii / Hard
        [1,1,1,1,1,1,1,1,1,1,2,3,4,4,5,5,5,6,6,7,7,8,8,9,9,10] // Oni
    ];
    this.harderLevelTable = // stars below 10-star (according to xipigu), starting from lv.25
        [1,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9];
    this.courseStrings = [
        ['kantan', 'easy'],
        ['futsuu', 'normal', 'futsu'],
        ['muzukashii', 'hard', 'muzu'],
        ['oni', 'mania', 'ura', 'inner', '+']
    ]
};

(function() {
    mc2tja.prototype = {
        constructor: mc2tja,

        // Find all possible names in version text to know what course the chart could possible be in.
        // Return an integer represents the course, being used in 'COURSE:' property in tja.
        getCourseFromName: function(text) {
            var t = text.toLowerCase();
            for (var course = 3; course >= 0; --course)
                for (var i in this.courseStrings[course])<commit_msg>added difficulty string "extreme"<commit_after>function requireScript(load, url)
{
    if (!load) return;
    if (typeof require == 'undefined') {
        var head = document.getElementsByTagName('head')[0];
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = 'js/' + url;
        head.appendChild(script);
        alert('1');
    } else {
        require(url);
    }
}

requireScript(typeof Fraction == 'undefined', 'fraction.js');
requireScript(typeof MCReader == 'undefined', 'mcreader.js');
requireScript(typeof TJAWriter == 'undefined', 'tjawriter.js');

var mc2tja = function() {
    this.generated = null; // the generated result text of tja
    this.standardTja = false; // set to true to disable tja features that is only supported by malody
    this.overrideLevel = 0; // change this to specify an malody level other than the one giving in mc
    this.defaultCourse = 3; // default value if no course info is concluded
    this.defaultStar = 10; // default value if no star info is concluded
    this.levelTable = [ // standard level table, matching level & course to stars
        [0,2,3,4,5], // Kantan / Easy
        [0,0,1,2,3,4,5,6,6,7], // Futsuu / Normal
        [0,0,0,0,0,0,1,2,3,4,5,5,6,6,7,7,8], // Muzukashii / Hard
        [1,1,1,1,1,1,1,1,1,1,2,3,4,4,5,5,5,6,6,7,7,8,8,9,9,10] // Oni
    ];
    this.harderLevelTable = // stars below 10-star (according to xipigu), starting from lv.25
        [1,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9];
    this.courseStrings = [
        ['kantan', 'easy'],
        ['futsuu', 'normal', 'futsu'],
        ['muzukashii', 'hard', 'muzu'],
        ['oni', 'mania', 'extreme', 'ura', 'inner', '+']
    ]
};

(function() {
    mc2tja.prototype = {
        constructor: mc2tja,

        // Find all possible names in version text to know what course the chart could possible be in.
        // Return an integer represents the course, being used in 'COURSE:' property in tja.
        getCourseFromName: function(text) {
            var t = text.toLowerCase();
            for (var course = 3; course >= 0; --course)
                for (var i in this.courseStrings[course])
{'fraction_non_alphanumeric': 0.15453915453915454, 'fraction_numerical': 0.04158004158004158, 'mean_word_length': 2.794916739702016, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6088707', 'n_tokens_mistral': 1485, 'n_tokens_neox': 1452, 'n_words': 391}