<commit_before>path        = require 'path'
fs          = require 'fs'
fsx         = require 'fsx'
dir         = __dirname

tempFolder = dir + '/../runtime/'

toName = (file) ->
  path.basename(file).split('.')[0]

read = (file) ->
  fs.readFileSync(file, 'utf8')

# object injected to modul8's interface when calling
Plugin = (@o={}) ->
  @o.key     or= 'models'
  @o.domain  or= 'mongoose'
  return

Plugin::data = ->
  files = (file for file in fsx.readDirSync(tempFolder).files when path.extname(file) is '.json')
  [@o.key, '{'+('"'+toName(file)+'":'+read(file) for file in files).join(',')+'}']


Plugin::domain = ->
  [@o.domain, dir+'/domain/'] # put forms code on here

# expose Parser class<commit_msg>indicate to modul8 that the value is pre-serialized<commit_after>path        = require 'path'
fs          = require 'fs'
fsx         = require 'fsx'
dir         = __dirname

tempFolder = dir + '/../runtime/'

toName = (file) ->
  path.basename(file).split('.')[0]

read = (file) ->
  fs.readFileSync(file, 'utf8')

# object injected to modul8's interface when calling
Plugin = (@o={}) ->
  @o.key     or= 'models'
  @o.domain  or= 'mongoose'
  return

Plugin::data = ->
  files = (file for file in fsx.readDirSync(tempFolder).files when path.extname(file) is '.json')
  [@o.key, '{'+('"'+toName(file)+'":'+read(file) for file in files).join(',')+'}', true] # this is pre-serialized


Plugin::domain = ->
  [@o.domain, dir+'/domain/'] # put forms code on here

# expose Parser class
{'fraction_non_alphanumeric': 0.19022103148024114, 'fraction_numerical': 0.004688546550569324, 'mean_word_length': 3.2084507042253523, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 13, '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': '6048954', 'n_tokens_mistral': 541, 'n_tokens_neox': 527, 'n_words': 140}