<commit_before>(function() {
  'use strict';

  /**
   * The MusicJsonToolbox class implements static functions to operate with musicjson objects.
   * @exports MusicJsonToolbox
   */
  var MusicJsonToolbox = {

    /**
     * Pitch values for steps in base 12 system
     * <pre><code>
     * C  |    | D |    | E  | F  |    | G |    | A  |    | B
     * B# | C# |   | D# |    | E# | F# |   | G# |    | A# |
     *    | Db |   | Eb | Fb |    | Gb |   | Ab |    | Bb | Cb
     * 1  | 2  | 3 | 4  | 5  | 6  | 7  | 8 | 9  | 10 | 11 | 12
     * </code></pre>
     *
     * @constant
     * @type {object}
     */
    base12: {
      'C': 1,
      'D': 3,
      'E': 5,
      'F': 6,
      'G': 8,
      'A': 10,
      'B': 12
    },

    /**
     * Inverted {@link base12}
     *
     * @constant
     * @type {object}
     */
    base12Inverted: {
      1: 'C',
      3: 'D',
      5: 'E',
      6: 'F',
      8: 'G',
      10: 'A',
      12: 'B'
    },

    /**
     * Degrees by number of semitones (for major scale)
     *
     * @constant
     * @type {object}
     */
    degreesFromSemitones: {
      1: 1,
      3: 2,
      5: 3,
      6: 4,
      8: 5,
      10: 6,
      12: 7
    },

    /**
     * Weights for deg(n)-function of Mongeau-Sankoff-Measure.
     * n = number of degrees
     *
     * @constant
     * @type {object}
     */
    deg: {
      0: 0,
      1: 0.9,
      2: 0.2,
      3: 0.5,
      4: 0.1,
      5: 0.35,
      6: 0.8
    },

    /**
     * Weights for ton(m)-function of Mongeau-Sankoff-Measure.
     * m = number of semitones
     *
     * @constant
     * @type {object}
     */
    ton: {
      0: 0.6,
      1: 2.6,
      2: 2.3,
      3: 1,
      4: 1,
      5: 1.6,
      6: 1.8,
      7: 0.8,
      8: 1.3,
      9: 1.3,
      10: 2.2,
      11: 2.5
    },

    /**
     * Parameter k of Mongeau-Sankoff-Measure.
     * Represents the relative contribution of w_length and w_interval
     *
     * Can be set runtime via:
     * <pre><code>
     *   MusicJsonToolbox.globalK = 0.456;
     * </pre></code>
     *
     * @constant
     * @type {number}
     */
    globalK: 0.348,

    /**
     * Parameter k1 of adjusted Mongeau-Sankoff-Measure according to Gomez, Abad-Mota & Ruckhaus, 2007.
     * {@link http://www.music-ir.org/mirex/abstracts/2007/QBSH_SMS_gomez.pdf}
     * Used when calculating weight for substitution.
     *
     * Can be set runtime via:
     * <pre><code>
     *   MusicJsonToolbox.globalK1 = 0.5;
     * </pre></code>
     *
     * @constant
     * @type {number}
     */
    globalK1: 0.46,

    /**
     * Parameter k2 of adjusted Mongeau-Sankoff-Measure according to Gomez, Abad-Mota & Ruckhaus, 2007.
     * {@link http://www.music-ir.org/mirex/abstracts/2007/QBSH_SMS_gomez.pdf}
     *
     * Can be set at runtime via:
     * <pre><code>
     *   MusicJsonToolbox.globalK3 = 0.5;
     * </pre></code>
     *
     * @constant
     * @type {number}
     */
    globalK2: 0.22,

    /**
     * Parameter k3 of adjusted Mongeau-Sankoff-Measure according to Gomez, Abad-Mota & Ruckhaus, 2007.
     * {@link http://www.music-ir.org/mirex/abstracts/2007/QBSH_SMS_gomez.pdf}
     * Used when calculating weight for insertion and deletion.
     *
     * Can be set at runtime via:
     * <pre><code>
     *   MusicJsonToolbox.globalK3 = 0.5;
     * </pre></code>
     *
     * @constant
     * @type {number}
     */
    globalK3: 1,

    /**
     * Holds abc steps for conversion from base12 pitch values (including octaves).
     *<commit_msg>Fix typo<commit_after>(function() {
  'use strict';

  /**
   * The MusicJsonToolbox class implements static functions to operate with musicjson objects.
   * @exports MusicJsonToolbox
   */
  var MusicJsonToolbox = {

    /**
     * Pitch values for steps in base 12 system
     * <pre><code>
     * C  |    | D |    | E  | F  |    | G |    | A  |    | B
     * B# | C# |   | D# |    | E# | F# |   | G# |    | A# |
     *    | Db |   | Eb | Fb |    | Gb |   | Ab |    | Bb | Cb
     * 1  | 2  | 3 | 4  | 5  | 6  | 7  | 8 | 9  | 10 | 11 | 12
     * </code></pre>
     *
     * @constant
     * @type {object}
     */
    base12: {
      'C': 1,
      'D': 3,
      'E': 5,
      'F': 6,
      'G': 8,
      'A': 10,
      'B': 12
    },

    /**
     * Inverted {@link base12}
     *
     * @constant
     * @type {object}
     */
    base12Inverted: {
      1: 'C',
      3: 'D',
      5: 'E',
      6: 'F',
      8: 'G',
      10: 'A',
      12: 'B'
    },

    /**
     * Degrees by number of semitones (for major scale)
     *
     * @constant
     * @type {object}
     */
    degreesFromSemitones: {
      1: 1,
      3: 2,
      5: 3,
      6: 4,
      8: 5,
      10: 6,
      12: 7
    },

    /**
     * Weights for deg(n)-function of Mongeau-Sankoff-Measure.
     * n = number of degrees
     *
     * @constant
     * @type {object}
     */
    deg: {
      0: 0,
      1: 0.9,
      2: 0.2,
      3: 0.5,
      4: 0.1,
      5: 0.35,
      6: 0.8
    },

    /**
     * Weights for ton(m)-function of Mongeau-Sankoff-Measure.
     * m = number of semitones
     *
     * @constant
     * @type {object}
     */
    ton: {
      0: 0.6,
      1: 2.6,
      2: 2.3,
      3: 1,
      4: 1,
      5: 1.6,
      6: 1.8,
      7: 0.8,
      8: 1.3,
      9: 1.3,
      10: 2.2,
      11: 2.5
    },

    /**
     * Parameter k of Mongeau-Sankoff-Measure.
     * Represents the relative contribution of w_length and w_interval
     *
     * Can be set runtime via:
     * <pre><code>
     *   MusicJsonToolbox.globalK = 0.456;
     * </pre></code>
     *
     * @constant
     * @type {number}
     */
    globalK: 0.348,

    /**
     * Parameter k1 of adjusted Mongeau-Sankoff-Measure according to Gomez, Abad-Mota & Ruckhaus, 2007.
     * {@link http://www.music-ir.org/mirex/abstracts/2007/QBSH_SMS_gomez.pdf}
     * Used when calculating weight for substitution.
     *
     * Can be set runtime via:
     * <pre><code>
     *   MusicJsonToolbox.globalK1 = 0.5;
     * </pre></code>
     *
     * @constant
     * @type {number}
     */
    globalK1: 0.46,

    /**
     * Parameter k2 of adjusted Mongeau-Sankoff-Measure according to Gomez, Abad-Mota & Ruckhaus, 2007.
     * {@link http://www.music-ir.org/mirex/abstracts/2007/QBSH_SMS_gomez.pdf}
     *
     * Can be set at runtime via:
     * <pre><code>
     *   MusicJsonToolbox.globalK2 = 0.5;
     * </pre></code>
     *
     * @constant
     * @type {number}
     */
    globalK2: 0.22,

    /**
     * Parameter k3 of adjusted Mongeau-Sankoff-Measure according to Gomez, Abad-Mota & Ruckhaus, 2007.
     * {@link http://www.music-ir.org/mirex/abstracts/2007/QBSH_SMS_gomez.pdf}
     * Used when calculating weight for insertion and deletion.
     *
     * Can be set at runtime via:
     * <pre><code>
     *   MusicJsonToolbox.globalK3 = 0.5;
     * </pre></code>
     *
     * @constant
     * @type {number}
     */
    globalK3: 1,

    /**
     * Holds abc steps for conversion from base12 pitch values (including octaves).
     *
{'fraction_non_alphanumeric': 0.15329819062544522, 'fraction_numerical': 0.04843994871064254, 'mean_word_length': 1.4648876404494382, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '7180146', 'n_tokens_mistral': 2925, 'n_tokens_neox': 2672, 'n_words': 649}