<commit_before>define (require) ->
  _ = require('underscore')
  settings = require('settings')

  shortcodes = settings.shortcodes
  inverseShortcodes = _.invert(shortcodes)

  return new class LinksHelper
    getPath: (page, data) ->
      url = settings.root

      switch page
        when 'contents'
          uuid = data.model.getVersionedId()
          uuid = inverseShortcodes[uuid] if inverseShortcodes[uuid]
          title = data.model.getBookTitle()
          bookTitle = title.replace(/\ /g,"_").substring(0,30)
          url += "contents/#{uuid}"
          url += ":#{data.page}" if data.page
          url += "/#{bookTitle}"

      return url

    metaDataUrl: (model) ->
      title = "#{model.title}"
      id = model.id
      version = model.version
      metaDataTitle = title.replace(/\ /g,"_").substring(0,30)
      url = "/contents/#{id}/#{metaDataTitle}"
<commit_msg>fixing build and removing unused variable<commit_after>define (require) ->
  _ = require('underscore')
  settings = require('settings')

  shortcodes = settings.shortcodes
  inverseShortcodes = _.invert(shortcodes)

  return new class LinksHelper
    getPath: (page, data) ->
      url = settings.root

      switch page
        when 'contents'
          uuid = data.model.getVersionedId()
          uuid = inverseShortcodes[uuid] if inverseShortcodes[uuid]
          title = data.model.getBookTitle()
          bookTitle = title.replace(/\ /g,"_").substring(0,30)
          url += "contents/#{uuid}"
          url += ":#{data.page}" if data.page
          url += "/#{bookTitle}"

      return url

    metaDataUrl: (model) ->
      title = "#{model.title}"
      id = model.id
      metaDataTitle = title.replace(/\ /g,"_").substring(0,30)
      url = "/contents/#{id}/#{metaDataTitle}"

{'fraction_non_alphanumeric': 0.14510686164229472, 'fraction_numerical': 0.006749156355455568, 'mean_word_length': 2.501968503937008, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 9, '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': '4717605', 'n_tokens_mistral': 536, 'n_tokens_neox': 523, 'n_words': 115}