<commit_before>var Plugin = require('nokomis/plugin')
var _ = require('underscore')
var path = require('path')
var extendable = require('extendable')

var Templating = require('nokomis/templating')

module.exports = Plugin.extend({

  initialize: function(config) {
    var tmpl = this.tmpl = new Templating()
    tmpl.templatePath = config.templatePath || tmpl.templatePath
  },

  run: function(instance) {
    instance.tmpl = this.tmpl
    instance.render = this.render
  },

  render: function(callback) {
    var tmpl = this.template
    var data = this.model
    var options = this.templateOptions || {}
    this.tmpl.render(tmpl, data, options, callback)
  }

})
<commit_msg>put the serialize function back in the templating method<commit_after>var Plugin = require('nokomis/plugin')
var _ = require('underscore')
var path = require('path')
var extendable = require('extendable')

var Templating = require('nokomis/templating')

module.exports = Plugin.extend({

  initialize: function(config) {
    var tmpl = this.tmpl = new Templating()
    tmpl.templatePath = config.templatePath || tmpl.templatePath
  },

  run: function(instance) {
    instance.tmpl = this.tmpl
    instance.render = this.render
  },

  // this can be overridden in your subclassed template plugin or an individual controller
  serialize: function() {
    return this.model
  },

  render: function(callback) {
    var tmpl = this.template
    var data = this.serialize()
    var options = this.templateOptions || {}
    this.tmpl.render(tmpl, data, options, callback)
  }

})

{'fraction_non_alphanumeric': 0.12002567394094994, 'fraction_numerical': 0.0, 'mean_word_length': 3.856697819314642, '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': '5485458', 'n_tokens_mistral': 492, 'n_tokens_neox': 476, 'n_words': 119}