<commit_before>/*
 * ContentsJS
 * https://github.com/LittleHelicase/ContentsJS
 *
 * Copyright (c) 2014 "LittleHelicase" <NAME>
 * Licensed under the MIT license.
 * https://github.com/LittleHelicase/ContentsJS/blob/master/LICENSE
 */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
path = require \path

const entry-keyword = "contents"

module.exports = {
  initialize: (contents-location, keyword=entry-keyword) ->
    # the path determines where the contentsjs-package lies
    # and what is viewed. (One might extend it for histories
    # or multiple concurrent views!?)
    entry-path = {
      path: contents-location
      entry: keyword
    }
    @patch-path entry-path, keyword

  # gets the path to the keyword file using the package-path
  # the function returns a new path with the current file
  # as the active path
  patch-path: (cjs-path, patchname) ->
    path.join cjs-path.path, patchname

  # loads a file specified by cjs-path with the specified loader
  # for the files and a callback when the file is loaded
  load-patch: (cjs, patch-path, loaded, preprocess) ->
    cjs.loader patch-path, (data) ->
      preprocess? data
      loaded patch-path, data
}<commit_msg>removed unused/unnecessary functions<commit_after>/*
 * ContentsJS
 * https://github.com/LittleHelicase/ContentsJS
 *
 * Copyright (c) 2014 "LittleHelicase" <NAME>
 * Licensed under the MIT license.
 * https://github.com/LittleHelicase/ContentsJS/blob/master/LICENSE
 */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
path = require \path

const entry-keyword = "contents"

# one file for only loading the patch seems a bit too much..
module.exports = {
  # loads a file specified by cjs-path with the specified loader
  # for the files and a callback when the file is loaded
  load-patch: (cjs, patch-path, loaded, preprocess) ->
    cjs.loader patch-path, (data) ->
      preprocess? data
      loaded patch-path, data
}
{'fraction_non_alphanumeric': 0.02929532858273951, 'fraction_numerical': 0.001266825019794141, 'mean_word_length': 0.28583061889250816, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 222, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5674193', 'n_tokens_mistral': 556, 'n_tokens_neox': 535, 'n_words': 186}