<commit_before>'use strict';

const findLastKey = require('lodash.findlastkey');
const filter = require('lodash.filter');
const weatherKatisms = require('../WeatherKatisms');
const weatherConfig = require('../WeatherConfig');
const helpers = {
  /**
   * Tries to return a weather Katism that is as close to possible to the
   * given weather matric
   * @returns {String} A clever/witty katism about the weather
   */
  findKatism(weatherMatrix) {
    // Get the order of importance for weather components
    let reduceList = weatherKatisms.katisms;
    weatherConfig.componentOrder.forEach((component) => {
      reduceList = filter(reduceList, (katismObject) => {
        return katismObject[component] === weatherMatrix[component] || katismObject[component] === '*';
      });
    });
    return reduceList.length ? reduceList[0].katism : null;
  },
   /**
  * Returns a string which represents the atmospheric weather (rain/clouds/clear/thunderstorm etc)
  * if an exact match it found
  * @return {String} Text ready for the katification matrix
  */
  getExactWeatherMatch(weatherCode) {
    return findLastKey(weatherConfig.weatherCodes, (weatherCodeKeys) => {
      return weatherCode === weatherCodeKeys;
    });
  },
  /**
  * Returns a string which represents the atmospheric weather (rain/clouds/clear.thunderstorm etc)
  * if an general match is found.
  * @return {String} Text ready for the katification matrix
  */
  getWeatherText(weatherCode) {
    let weatherText = helpers.getExactWeatherMatch(weatherCode);
    if (!weatherText) {<commit_msg>Fix another typo<commit_after>'use strict';

const findLastKey = require('lodash.findlastkey');
const filter = require('lodash.filter');
const weatherKatisms = require('../WeatherKatisms');
const weatherConfig = require('../WeatherConfig');
const helpers = {
  /**
   * Tries to return a weather Katism that is as close to possible to the
   * given weather matric
   * @returns {String} A clever/witty katism about the weather
   */
  findKatism(weatherMatrix) {
    // Get the order of importance for weather components
    let reduceList = weatherKatisms.katisms;
    weatherConfig.componentOrder.forEach((component) => {
      reduceList = filter(reduceList, (katismObject) => {
        return katismObject[component] === weatherMatrix[component] || katismObject[component] === '*';
      });
    });
    return reduceList.length ? reduceList[0].katism : null;
  },
   /**
  * Returns a string which represents the atmospheric weather (rain/clouds/clear/thunderstorm etc)
  * if an exact match it found
  * @return {String} Text ready for the katification matrix
  */
  getExactWeatherMatch(weatherCode) {
    return findLastKey(weatherConfig.weatherCodes, (weatherCodeKeys) => {
      return weatherCode === weatherCodeKeys;
    });
  },
  /**
  * Returns a string which represents the atmospheric weather (rain/clouds/clear/thunderstorm etc)
  * if an general match is found.
  * @return {String} Text ready for the katification matrix
  */
  getWeatherText(weatherCode) {
    let weatherText = helpers.getExactWeatherMatch(weatherCode);
    if (!weatherText) {
{'fraction_non_alphanumeric': 0.11114659853082082, 'fraction_numerical': 0.0006387735547748323, 'mean_word_length': 4.0112, 'pattern_counts': {'":': 0, '<': 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': '4637744', 'n_tokens_mistral': 912, 'n_tokens_neox': 871, 'n_words': 254}