<commit_before>class Korean {

  conjugate (word, info) {
    // Format for rulesObject: { tense: 'present', formal: 'true/false', wordType: 'adjective/verb'}
    // TODO: test if word is verb, return to avoid switch
   switch (info.tense) {
     case 'present':
       return this.doPresent(word);
       break;
      // case 'past':
      //   return this.doPast(word);
     default:
     return 'Could not find any rules for conjugation';
   }
 }

 doPresent(word) {
    let wordLength = word.length;
    let conjugate = '';
    // if the ending is 'ha' then convert to 'hey'
    if (word[wordLength - 2] === '하') {
        conjugate = word.slice(0, wordLength - 2);
        return conjugate.concat('해');
    } else {
      /** breakdown the word to find out the 2nd to last character's letter **/
      let brokeWord = breakdown(word[wordLength - 2]);
      let brokeLength = brokeWord.length;
      let syllableEnd = brokeWord[brokeLength - 1];
      let stemWord = word.slice(0, wordLength - 2);
      let newSyllable = brokeWord.slice(0, brokeLength - 1);
      switch(syllableEnd) {
        case 0: 
          // if last letter is ㅏ leave alone
          return word.slice(0, wordLength - 1);
        case 8: 
          // replace with: ㅘ (9)
            // concat back to word
            newSyllable.push(9);
            newSyllable = combineSymbols(newSyllable);
            return stemWord + newSyllable;
        case 18:
        // vowel ㅡ replace with ㅓ (4)
              newSyllable.push(4);
              newSyllable = combineSymbols(newSyllable);
            if(wordLength <= 2) {
              return newSyllable;
            } else {
              return stemWord + newSyllable;
            }
       case 13:
        // 13 (ㅜ) convert to 14 (ㅝ)
          newSyllable.push(14);
          newSyllable = combineSymbols(newSyllable);
          if(wordLength <= 2) {<commit_msg>fix the Korean conjugator rule#1<commit_after>class Korean {

  conjugate (word, info) {
    // Format for rulesObject: { tense: 'present', formal: 'true/false', wordType: 'adjective/verb'}
    // TODO: test if word is verb, return to avoid switch
   switch (info.tense) {
     case 'present':
       return this.doPresent(word);
       break;
      // case 'past':
      //   return this.doPast(word);
     default:
     return 'Could not find any rules for conjugation';
   }
 }

 doPresent(word) {
    let wordLength = word.length;
    let conjugate = '';
    // if the ending is 'ha' then convert to 'hey'
    if (word[wordLength - 2] === '하') {
        conjugate = word.slice(0, wordLength - 2);
        return conjugate.concat('해');
    } else {
      /** breakdown the word to find out the 2nd to last character's letter **/
      let brokeWord = breakdown(word[wordLength - 2]);
      let brokeLength = brokeWord.length;
      let syllableEnd = brokeWord[brokeLength - 1];
      let stemWord = word.slice(0, wordLength - 2);
      let newSyllable = brokeWord.slice(0, brokeLength - 1);
      switch(syllableEnd) {
        case 0: 
        case 1:
        case 4:
          // if last letter is ㅏ leave alone
          return word.slice(0, wordLength - 1);
        case 8: 
          // replace with: ㅘ (9)
            // concat back to word
            newSyllable.push(9);
            newSyllable = combineSymbols(newSyllable);
            return stemWord + newSyllable;
        case 18:
        // vowel ㅡ replace with ㅓ (4)
              newSyllable.push(4);
              newSyllable = combineSymbols(newSyllable);
            if(wordLength <= 2) {
              return newSyllable;
            } else {
              return stemWord + newSyllable;
            }
       case 13:
        // 13 (ㅜ) convert to 14 (ㅝ)
          newSyllable.push(14);
          newSyllable = combineSymbols(newSyllable);
          if(wordLength <= 2) {
{'fraction_non_alphanumeric': 0.11082138200782268, 'fraction_numerical': 0.016427640156453715, 'mean_word_length': 1.8950943396226414, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '5235359', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1159, 'n_words': 338}