<commit_before>/**
 * @scope enchant.Label.prototype
 */
enchant.Label = enchant.Class.create(enchant.Entity, {
    /**
     * @name enchant.Label
     * @class
     [lang:ja]
     * Label クラス。
     [/lang]
     [lang:en]
     * A class for Label object.
     [/lang]
     [lang:de]
     * Erstellt ein Label Objekt.
     [/lang]
     * @constructs
     * @extends enchant.Entity
     */
    initialize: function(text) {
        enchant.Entity.call(this);

        this.width = 300;
        this.font = '14px serif';
        this.text = text || '';
        this.textAlign = 'left';
    },
    /**
     [lang:ja]
     * 表示するテキスト.
     [/lang]
     [lang:en]
     * Text to be displayed.
     [/lang]
     [lang:de]
     * Darzustellender Text.
     [/lang]
     * @type {String}
     */
    text: {
        get: function() {
            return this._text;
        },
        set: function(text) {
            if(this._text === text) {
                return;
            }
            this._text = text;
            text = text.replace(/<(br|BR) ?\/?>/g, '<br/>');
            this._splitText = text.split('<br/>');
            this.updateBoundArea();
            for (var i = 0, l = this._splitText.length; i < l; i++) {
                text = this._splitText[i];
                var metrics = this.getMetrics(text);
                this._splitText[i] = {};
                this._splitText[i].text = text;
                this._splitText[i].height = metrics.height;
            }
        }
    },
    /**
     [lang:ja]
     * テキストの水平位置の指定.
     * CSSの'text-align'プロパティと同様の形式で指定できる.
     [/lang]
     [lang:en]
     * Specifies horizontal alignment of text.
     * Can be set according to the format of the CSS 'text-align' property.
     [/lang]<commit_msg>cast value when Label#text is assigned<commit_after>/**
 * @scope enchant.Label.prototype
 */
enchant.Label = enchant.Class.create(enchant.Entity, {
    /**
     * @name enchant.Label
     * @class
     [lang:ja]
     * Label クラス。
     [/lang]
     [lang:en]
     * A class for Label object.
     [/lang]
     [lang:de]
     * Erstellt ein Label Objekt.
     [/lang]
     * @constructs
     * @extends enchant.Entity
     */
    initialize: function(text) {
        enchant.Entity.call(this);

        this.width = 300;
        this.font = '14px serif';
        this.text = text || '';
        this.textAlign = 'left';
    },
    /**
     [lang:ja]
     * 表示するテキスト.
     [/lang]
     [lang:en]
     * Text to be displayed.
     [/lang]
     [lang:de]
     * Darzustellender Text.
     [/lang]
     * @type {String}
     */
    text: {
        get: function() {
            return this._text;
        },
        set: function(text) {
            text = '' + text;
            if(this._text === text) {
                return;
            }
            this._text = text;
            text = text.replace(/<(br|BR) ?\/?>/g, '<br/>');
            this._splitText = text.split('<br/>');
            this.updateBoundArea();
            for (var i = 0, l = this._splitText.length; i < l; i++) {
                text = this._splitText[i];
                var metrics = this.getMetrics(text);
                this._splitText[i] = {};
                this._splitText[i].text = text;
                this._splitText[i].height = metrics.height;
            }
        }
    },
    /**
     [lang:ja]
     * テキストの水平位置の指定.
     * CSSの'text-align'プロパティと同様の形式で指定できる.
     [/lang]
     [lang:en]
     * Specifies horizontal alignment of text.
     * Can be set according to the format of the CSS 'text-align' property.
     [/lang]
{'fraction_non_alphanumeric': 0.14841781013721647, 'fraction_numerical': 0.0033604032483898066, 'mean_word_length': 1.4926727145847871, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '7010035', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1182, 'n_words': 238}