<commit_before>'use strict'

var Common = require('./common')
var async = require('async')
var _ = require('lodash')
var util = require('util')

function EntityError (msg, constr) {
  Error.captureStackTrace(this, constr || this)
  this.message = msg || 'Entity Error'
}

util.inherits(EntityError, Error)

EntityError.prototype.name = 'EntityError'

function SourcedEntity (name, snapshot, events, seneca) {
  var self = this

  self.log$ = function () {
    this.private$.seneca.log.apply(this, arguments)
  }

  var private$ = self.private$ = function () {}

  private$.seneca = seneca

  private$.entity_name = name

  private$.events_repo = seneca.make('events', name)
  private$.snapshots_repo = seneca.make('snapshots', name)

  this.newEvents = []

  this.eventsToEmit = []
  this.replaying = false
  this.snapshotVersion = 0
  this.timestamp = Date.now()
  this.version = 0

  if (snapshot) {
    this.merge(snapshot)
  }
  if (events) {
    this.replay(events)<commit_msg>remove repos<commit_after>'use strict'

var Common = require('./common')
var async = require('async')
var _ = require('lodash')
var util = require('util')

function EntityError (msg, constr) {
  Error.captureStackTrace(this, constr || this)
  this.message = msg || 'Entity Error'
}

util.inherits(EntityError, Error)

EntityError.prototype.name = 'EntityError'

function SourcedEntity (name, snapshot, events, seneca) {
  var self = this

  self.log$ = function () {
    this.private$.seneca.log.apply(this, arguments)
  }

  var private$ = self.private$ = function () {}

  private$.seneca = seneca

  private$.entity_name = name

  this.newEvents = []

  this.eventsToEmit = []
  this.replaying = false
  this.snapshotVersion = 0
  this.timestamp = Date.now()
  this.version = 0

  if (snapshot) {
    this.merge(snapshot)
  }
  if (events) {
    this.replay(events)
{'fraction_non_alphanumeric': 0.14162162162162162, 'fraction_numerical': 0.002162162162162162, 'mean_word_length': 3.8839050131926123, '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': '3675970', 'n_tokens_mistral': 618, 'n_tokens_neox': 602, 'n_words': 136}