<commit_before>/*global module, require*/
var path = require('path'),
    _ = require('underscore'),
    error = require('../error'),
    makeBufferedAccessor = require('../makeBufferedAccessor'),
    nextId = 1;

function Base(config) {
    _.extend(this, config);
    this.id = nextId;
    nextId += 1;
}

Base.prototype = {
    encoding: 'utf8', // Change to 'binary' in subclass for images etc.

    getOriginalSrc: makeBufferedAccessor('originalSrc', function (cb) {
        if (this.originalSrcProxy) {
            this.originalSrcProxy(cb);
        } else {
            cb(new Error("Don't know how to get the original asset src!"));
        }
    }),

    toString: function () {
        return "[" + this.type + "/" + this.id + "]";
    }
};

exports.Base = Base;<commit_msg>Implemented default assets.Base.getOriginalRelations that yields [].<commit_after>/*global module, require*/
var path = require('path'),
    _ = require('underscore'),
    error = require('../error'),
    makeBufferedAccessor = require('../makeBufferedAccessor'),
    nextId = 1;

function Base(config) {
    _.extend(this, config);
    this.id = nextId;
    nextId += 1;
}

Base.prototype = {
    encoding: 'utf8', // Change to 'binary' in subclass for images etc.

    getOriginalSrc: makeBufferedAccessor('originalSrc', function (cb) {
        if (this.originalSrcProxy) {
            this.originalSrcProxy(cb);
        } else {
            cb(new Error("Don't know how to get the original asset src!"));
        }
    }),

    // Override in subclass if it supports relations
    getOriginalRelations: makeBufferedAccessor('originalRelations', function (cb) {
        process.nextTick(function () {
            cb(null, []);
        });
    }),

    toString: function () {
        return "[" + this.type + "/" + this.id + "]";
    }
};

exports.Base = Base;
{'fraction_non_alphanumeric': 0.15167930660888407, 'fraction_numerical': 0.0032502708559046588, 'mean_word_length': 2.6574257425742576, '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': '3045095', 'n_tokens_mistral': 555, 'n_tokens_neox': 534, 'n_words': 131}