<commit_before>if Meteor.isClient
  if Package.ui
    Handlebars = Package.ui.Handlebars

  Handlebars.registerHelper 't9n', (x) ->
    T9n.get(x)

class T9n

  @maps: {}
  @defaultLanguage: 'en'
  @language: ''
  @dep: new Deps.Dependency()
  @depLanguage: new Deps.Dependency()
  @missingPrefix = ">"
  @missingPostfix = "<"

  @map: (language, map) ->
    if(!@maps[language]) 
      @maps[language] = {}
    @registerMap(language, '', false, map)
    @dep.changed()

  @get: (label) ->
    @dep.depend()
    @depLanguage.depend()
    if typeof label != 'string' 
      return ''
    @maps[@language]?[label] ||
      @maps[@defaultLanguage]?[label] ||
      @missingPrefix + label + @missingPostfix
  
  @registerMap = (language, prefix, dot, map) ->
    if typeof map == 'string' 
      @maps[language][prefix] = map
    else if typeof map == 'object'
      if dot 
        prefix = prefix + '.'
      for key, value of map
        @registerMap(language, prefix + key, true, value)        

  @getLanguage: () ->
    @depLanguage.depend()
    return @language

  @getLanguages: () ->
    @dep.depend()
    return Object.keys(@maps).sort()

  @setLanguage: (language) ->
    if(!@maps[language] || @language == language) 
      return;
    @language = language
    @depLanguage.changed()

@T9n = T9n
@t9n = (x) -> T9n.get(x)
<commit_msg>added default parameter markIfMissing to method get<commit_after>if Meteor.isClient
  if Package.ui
    Handlebars = Package.ui.Handlebars

  Handlebars.registerHelper 't9n', (x) ->
    T9n.get(x)

class T9n

  @maps: {}
  @defaultLanguage: 'en'
  @language: ''
  @dep: new Deps.Dependency()
  @depLanguage: new Deps.Dependency()
  @missingPrefix = ">"
  @missingPostfix = "<"

  @map: (language, map) ->
    if(!@maps[language]) 
      @maps[language] = {}
    @registerMap(language, '', false, map)
    @dep.changed()

  @get: (label, markIfMissing = true) ->
    @dep.depend()
    @depLanguage.depend()
    if typeof label != 'string' 
      return ''
    @maps[@language]?[label] ||
      @maps[@defaultLanguage]?[label] ||
      if markIfMissing then @missingPrefix + label + @missingPostfix else label
  
  @registerMap = (language, prefix, dot, map) ->
    if typeof map == 'string' 
      @maps[language][prefix] = map
    else if typeof map == 'object'
      if dot 
        prefix = prefix + '.'
      for key, value of map
        @registerMap(language, prefix + key, true, value)        

  @getLanguage: () ->
    @depLanguage.depend()
    return @language

  @getLanguages: () ->
    @dep.depend()
    return Object.keys(@maps).sort()

  @setLanguage: (language) ->
    if(!@maps[language] || @language == language) 
      return;
    @language = language
    @depLanguage.changed()

@T9n = T9n
@t9n = (x) -> T9n.get(x)

{'fraction_non_alphanumeric': 0.16144144144144143, 'fraction_numerical': 0.005045045045045045, 'mean_word_length': 2.8289655172413792, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '701125', 'n_tokens_mistral': 952, 'n_tokens_neox': 925, 'n_words': 211}