<commit_before>function Initialize()

  dictionary = {

    ru = {

      months = {

        ['January'] = '/=20@L',

        ['February'] = '$52@0;L',

        ['March'] = '0@B',

        ['April'] = '?@5;L',

        ['May'] = '09',

        ['June'] = 'N=L',

        ['July'] = 'N;L',

        ['August'] = '23CAB',

        ['September'] = '!5=BO1@L',

        ['October'] = ':BO1@L',

        ['November'] = '>O1@L',

        ['December'] = '5:01@L'

      },

      monthsInDate = {

        ['January'] = '/=20@O',

        ['February'] = '$52@0;O',

        ['March'] = '0@B0',

        ['April'] = '?@5;O',

        ['May'] = '0O',

        ['June'] = 'N=O',

        ['July'] = 'N;O',

        ['August'] = '23CAB0',

        ['September'] = '!5=BO1@O',

        ['October'] = ':BO1@O',

        ['November'] = '>O1@O',

        ['December'] = '5:01@O'

      },

      days = {

        ['Monday'] = '>=545;L=8:',

        ['Tuesday'] = 'B>@=8:',

        ['Wednesday'] = '!@540',

        ['Thursday'] = ''5B25@3',

        ['Friday'] = 'OB=8F0',

        ['Saturday'] = '!C11>B0',

        ['Sunday'] = '>A:@5A5=L5'

      },

      daysShort = {

        ['Mon'] = '',

        ['Tue'] = '"',

        ['Wed'] = '! ',

        ['Thu'] = ''"',

        ['Fri'] = '"',

        ['Sat'] = '!',

        ['Sun'] = '!'

      },

      misc = {

        ['Now'] =  '!59G0A',

        ['Today'] = '!53>4=O',

        ['Tonight'] = '>GLN',

        ['Tomorrow'] = '02B@0',

        ['like'] = ':0:',

        ['cores'] = 'O4@0'

      }

    }

  }

end



function Translate(date, lang)

  if lang == 'en' then return date end



  for k, v in pairs(dictionary[lang]['months']) do

    if date == k then return v end

  end



  for k, v in pairs(dictionary[lang]['daysShort']) do

    if date == k then return v end

  end



  for k, v in pairs(dictionary[lang]['monthsInDate']) do

    date = string.gsub(date, k, v)

  end



  for k, v in pairs(dictionary[lang]['days']) do

    date = string.gsub(date, k, v)

  end



  for k, v in pairs(dictionary[lang]['misc']) do

    date = string.gsub(date, k, v)

  end



  return date

end<commit_msg>Add checking of language<commit_after>function Initialize()

  dictionary = {

    ru = {

      months = {

        ['January'] = '/=20@L',

        ['February'] = '$52@0;L',

        ['March'] = '0@B',

        ['April'] = '?@5;L',

        ['May'] = '09',

        ['June'] = 'N=L',

        ['July'] = 'N;L',

        ['August'] = '23CAB',

        ['September'] = '!5=BO1@L',

        ['October'] = ':BO1@L',

        ['November'] = '>O1@L',

        ['December'] = '5:01@L'

      },

      monthsInDate = {

        ['January'] = '/=20@O',

        ['February'] = '$52@0;O',

        ['March'] = '0@B0',

        ['April'] = '?@5;O',

        ['May'] = '0O',

        ['June'] = 'N=O',

        ['July'] = 'N;O',

        ['August'] = '23CAB0',

        ['September'] = '!5=BO1@O',

        ['October'] = ':BO1@O',

        ['November'] = '>O1@O',

        ['December'] = '5:01@O'

      },

      days = {

        ['Monday'] = '>=545;L=8:',

        ['Tuesday'] = 'B>@=8:',

        ['Wednesday'] = '!@540',

        ['Thursday'] = ''5B25@3',

        ['Friday'] = 'OB=8F0',

        ['Saturday'] = '!C11>B0',

        ['Sunday'] = '>A:@5A5=L5'

      },

      daysShort = {

        ['Mon'] = '',

        ['Tue'] = '"',

        ['Wed'] = '! ',

        ['Thu'] = ''"',

        ['Fri'] = '"',

        ['Sat'] = '!',

        ['Sun'] = '!'

      },

      misc = {

        ['Now'] =  '!59G0A',

        ['Today'] = '!53>4=O',

        ['Tonight'] = '>GLN',

        ['Tomorrow'] = '02B@0',

        ['like'] = ':0:',

        ['cores'] = 'O4@0'

      }

    }

  }

end



function Translate(date, lang)

  if dictionary[lang] == nil then return date end



  for k, v in pairs(dictionary[lang]['months']) do

    if date == k then return v end

  end



  for k, v in pairs(dictionary[lang]['daysShort']) do

    if date == k then return v end

  end



  for k, v in pairs(dictionary[lang]['monthsInDate']) do

    date = string.gsub(date, k, v)

  end



  for k, v in pairs(dictionary[lang]['days']) do

    date = string.gsub(date, k, v)

  end



  for k, v in pairs(dictionary[lang]['misc']) do

    date = string.gsub(date, k, v)

  end



  return date

end
{'fraction_non_alphanumeric': 0.6210092687950567, 'fraction_numerical': 0.01579128046687264, 'mean_word_length': 4.296969696969697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '7639254', 'n_tokens_mistral': 8694, 'n_tokens_neox': 8693, 'n_words': 332}