<commit_before>class KDObject extends KDEventEmitter

  [NOTREADY, READY] = [0,1]

  utils: __utils

  constructor:(options = {}, data)->

    @id or= options.id or __utils.getUniqueId()
    @setOptions options
    @setData data  if data
    @setDelegate options.delegate if options.delegate
    @registerKDObjectInstance()

    if options.testPath
      KD.registerInstanceForTesting this

    super

    @on 'error', error
    @once 'ready', => @readyState = READY<commit_msg>Register object after initialization<commit_after>class KDObject extends KDEventEmitter

  [NOTREADY, READY] = [0,1]

  utils: __utils

  constructor:(options = {}, data)->

    @id or= options.id or __utils.getUniqueId()
    @setOptions options
    @setData data  if data
    @setDelegate options.delegate if options.delegate
    @registerKDObjectInstance()

    super

    if options.testPath
      KD.registerInstanceForTesting this

    @on 'error', error
    @once 'ready', => @readyState = READY
{'fraction_non_alphanumeric': 0.09805924412665985, 'fraction_numerical': 0.0040858018386108275, 'mean_word_length': 3.537037037037037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2961358', 'n_tokens_mistral': 306, 'n_tokens_neox': 283, 'n_words': 80}