6 saved 5 bytes
source | link

Javascript (ES6), 466 456 451451 446 bytes

(v,p,w,t)=>(R=g=>g.exec(s),T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.search(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(R(/^(gi|ta|di|gü)t$/.exec(s)||(R(/et$/.exec(s)&&(k=1)))&&T`d`,((E=E=R(/[aıoueiöü]$/.exec(s))&&t==2?(l=L,T``):s)+Z([(E?'':k<2&!R(/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s))+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))
// Parameters:
//   - 'v' = verb
//   - 'p' = plural flag
//   - 'w' = person
//   - 't' = tense
(v, p, w, t) => (
  // R() - Helper function to execute a regular expression on the stem.
  R = g => g.exec(s),

  // T() - Helper function to replace the last character of 's'the stem with 'r'.
  T = r => s = s.slice(0, -1) + r,

  // Z() - Helper functionFunction tothat applyapplies vowel harmony to the substringstring 's', assuming
  //       assuming '0' = 'i' and '1' = 'e' and using the last encountered
  //       vowel 'l'.
  Z = s => s.replace(
    /\d/g,
    c => l = [
      'ıuiü' [(n = 'aıoueiöü'.search(l)) >> 1],
      'ae' [n >> 2]
    ][c]
  ),

  // Computes:
  //   - 's' = stem
  //   - 'k' = number of vowels in stem
  //   - 'l' = last vowel in stem
  //   - 'L' = penultimate vowel in stem
  (s = v.slice(k = l = 0, -3)).replace(/[aıoueiöü]/g, c => (L = l, l = c, k++)),

  // Applies ending 't' => 'd' for irregular verbs and those ending in -et(mek).
  (R(/^(gi|ta|di|gü)t$/.exec(s) || (R(/et$/.exec(s) && (k = 1))) && T `d`,

  // Computes 'E' = truthy value if the stem ends in a vowel.
  // If 'E' is settruthy and the tense is the continuing present, drops this vowel.
  ((E = R(/[aıoueiöü]$/.exec(s)) && t == 2 ? (l = L, T ``) : s) +

  // Appends sign of tense with vowel harmony.
  Z([
    // simple present (t = 1): simple present -> either '-er', '-ir' or '-r'
    (E ? '' : k < 2 & !R(/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)) + 'r',

    // continuing present (t = 2): continuing present -> always '-iyor'
    '0yor',

    // future (t = 3): future -> either '-yecek', '-ecek', '-yeceğ' or '-eceğ'
    (E ? 'y1c1' : '1c1') + 'ğkk' [--w]
  ][t - 1]) +

  // Appends personal suffix with vowel harmony,
  // forcing last vowel to 'o' for continuing present.
  Z(
    '0m|0z|s0n|s0n0z||l1r'.split `|` [w + w + p],
    t - 2 || (l = 'o')
  )
)
let f =
(v,p,w,t)=>(R=g=>g.exec(s),T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.search(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(R(/^(gi|ta|di|gü)t$/.exec(s)||(R(/et$/.exec(s)&&(k=1)))&&T`d`,((E=E=R(/[aıoueiöü]$/.exec(s))&&t==2?(l=L,T``):s)+Z([(E?'':k<2&!R(/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s))+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))

console.log(f("gütmek", false, 1, 2));    // -> güdüyorum
console.log(f("almak", true, 3, 3));      // -> alacaklar
console.log(f("boğmak", true, 2, 1));     // -> boğarsınız
console.log(f("ölmek", false, 3, 1));     // -> ölür
console.log(f("boyamak", true, 1, 2));    // -> boyuyoruz
console.log(f("affetmek", false, 2, 1));  // -> affedersin
console.log(f("söylemek", true, 3, 1));   // -> söylerler
console.log(f("söylemek", false, 3, 2));  // -> söylüyor
console.log(f("söylemek", false, 1, 3));  // -> söyleyeceğim

Javascript (ES6), 466 456 451 bytes

(v,p,w,t)=>(T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.search(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(/^(gi|ta|di|gü)t$/.exec(s)||(/et$/.exec(s)&&(k=1)))&&T`d`,((E=/[aıoueiöü]$/.exec(s))&&t==2?(l=L,T``):s)+Z([(E?'':k<2&!/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s))+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))
// Parameters:
//   - 'v' = verb
//   - 'p' = plural flag
//   - 'w' = person
//   - 't' = tense
(v, p, w, t) => (
  // T() - Helper function to replace the last character of 's' with 'r'.
  T = r => s = s.slice(0, -1) + r,

  // Z() - Helper function to apply vowel harmony to the substring 's',
  //       assuming '0' = 'i' and '1' = 'e' and using the last encountered
  //       vowel 'l'.
  Z = s => s.replace(
    /\d/g,
    c => l = [
      'ıuiü' [(n = 'aıoueiöü'.search(l)) >> 1],
      'ae' [n >> 2]
    ][c]
  ),

  // Computes:
  //   - 's' = stem
  //   - 'k' = number of vowels in stem
  //   - 'l' = last vowel in stem
  //   - 'L' = penultimate vowel in stem
  (s = v.slice(k = l = 0, -3)).replace(/[aıoueiöü]/g, c => (L = l, l = c, k++)),

  // Applies 't' => 'd' for irregular verbs and those ending in -et(mek).
  (/^(gi|ta|di|gü)t$/.exec(s) || (/et$/.exec(s) && (k = 1))) && T `d`,

  // Computes 'E' = truthy if the stem ends in a vowel.
  // If 'E' is set and the tense is the continuing present, drops this vowel.
  ((E = /[aıoueiöü]$/.exec(s)) && t == 2 ? (l = L, T ``) : s) +

  // Appends sign of tense with vowel harmony.
  Z([
    // simple present (t = 1): either '-er', '-ir' or '-r'
    (E ? '' : k < 2 & !/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)) + 'r',

    // continuing present (t = 2): always '-iyor'
    '0yor',

    // future (t = 3): either '-yecek', '-ecek', '-yeceğ' or '-eceğ'
    (E ? 'y1c1' : '1c1') + 'ğkk' [--w]
  ][t - 1]) +

  // Appends personal suffix with vowel harmony,
  // forcing last vowel to 'o' for continuing present.
  Z(
    '0m|0z|s0n|s0n0z||l1r'.split `|` [w + w + p],
    t - 2 || (l = 'o')
  )
)
let f =
(v,p,w,t)=>(T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.search(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(/^(gi|ta|di|gü)t$/.exec(s)||(/et$/.exec(s)&&(k=1)))&&T`d`,((E=/[aıoueiöü]$/.exec(s))&&t==2?(l=L,T``):s)+Z([(E?'':k<2&!/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s))+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))

console.log(f("gütmek", false, 1, 2));    // -> güdüyorum
console.log(f("almak", true, 3, 3));      // -> alacaklar
console.log(f("boğmak", true, 2, 1));     // -> boğarsınız
console.log(f("ölmek", false, 3, 1));     // -> ölür
console.log(f("boyamak", true, 1, 2));    // -> boyuyoruz
console.log(f("affetmek", false, 2, 1));  // -> affedersin
console.log(f("söylemek", true, 3, 1));   // -> söylerler
console.log(f("söylemek", false, 3, 2));  // -> söylüyor
console.log(f("söylemek", false, 1, 3));  // -> söyleyeceğim

Javascript (ES6), 466 456 451 446 bytes

(v,p,w,t)=>(R=g=>g.exec(s),T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.search(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(R(/^(gi|ta|di|gü)t$/)||(R(/et$/)&&(k=1)))&&T`d`,((E=R(/[aıoueiöü]$/))&&t==2?(l=L,T``):s)+Z([(E?'':k<2&!R(/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/))+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))
// Parameters:
//   - 'v' = verb
//   - 'p' = plural flag
//   - 'w' = person
//   - 't' = tense
(v, p, w, t) => (
  // R() - Helper function to execute a regular expression on the stem.
  R = g => g.exec(s),

  // T() - Helper function to replace the last character of the stem with 'r'.
  T = r => s = s.slice(0, -1) + r,

  // Z() - Function that applies vowel harmony to the string 's', assuming
  //       '0' = 'i' and '1' = 'e' and using the last encountered vowel 'l'.
  Z = s => s.replace(
    /\d/g,
    c => l = [
      'ıuiü' [(n = 'aıoueiöü'.search(l)) >> 1],
      'ae' [n >> 2]
    ][c]
  ),

  // Computes:
  //   - 's' = stem
  //   - 'k' = number of vowels in stem
  //   - 'l' = last vowel in stem
  //   - 'L' = penultimate vowel in stem
  (s = v.slice(k = l = 0, -3)).replace(/[aıoueiöü]/g, c => (L = l, l = c, k++)),

  // Applies ending 't' => 'd' for irregular verbs and those ending in -et(mek).
  (R(/^(gi|ta|di|gü)t$/) || (R(/et$/) && (k = 1))) && T `d`,

  // Computes 'E' = truthy value if the stem ends in a vowel.
  // If 'E' is truthy and the tense is the continuing present, drops this vowel.
  ((E = R(/[aıoueiöü]$/)) && t == 2 ? (l = L, T ``) : s) +

  // Appends sign of tense with vowel harmony.
  Z([
    // t = 1: simple present -> either '-er', '-ir' or '-r'
    (E ? '' : k < 2 & !R(/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/) + 'r',

    // t = 2: continuing present -> always '-iyor'
    '0yor',

    // t = 3: future -> either '-yecek', '-ecek', '-yeceğ' or '-eceğ'
    (E ? 'y1c1' : '1c1') + 'ğkk' [--w]
  ][t - 1]) +

  // Appends personal suffix with vowel harmony,
  // forcing last vowel to 'o' for continuing present.
  Z(
    '0m|0z|s0n|s0n0z||l1r'.split `|` [w + w + p],
    t - 2 || (l = 'o')
  )
)
let f =
(v,p,w,t)=>(R=g=>g.exec(s),T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.search(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(R(/^(gi|ta|di|gü)t$/)||(R(/et$/)&&(k=1)))&&T`d`,((E=R(/[aıoueiöü]$/))&&t==2?(l=L,T``):s)+Z([(E?'':k<2&!R(/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/))+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))

console.log(f("gütmek", false, 1, 2));    // -> güdüyorum
console.log(f("almak", true, 3, 3));      // -> alacaklar
console.log(f("boğmak", true, 2, 1));     // -> boğarsınız
console.log(f("ölmek", false, 3, 1));     // -> ölür
console.log(f("boyamak", true, 1, 2));    // -> boyuyoruz
console.log(f("affetmek", false, 2, 1));  // -> affedersin
console.log(f("söylemek", true, 3, 1));   // -> söylerler
console.log(f("söylemek", false, 3, 2));  // -> söylüyor
console.log(f("söylemek", false, 1, 3));  // -> söyleyeceğim
5 minor update
source | link
// Parameters:
//   - 'v' = verb
//   - 'p' = plural flag
//   - 'w' = person
//   - 't' = tense
(v, p, w, t) => (
  // T() - Helper function to replace the last character of 's' with 'r'.
  T = r => s = s.slice(0, -1) + r,

  // Z() - Helper function to apply vowel harmony to the substring 's',
  //       assuming '0' = 'i' and '1' = 'e' and using the last encountered
  //       vowel 'l'.
  Z = s => s.replace(
    /\d/g,
    c => l = [
      'iuiü''ıuiü' [(n = 'aioueiöü''aıoueiöü'.search(l)) >> 1],
      'ae' [n >> 2]
    ][c]
  ),

  // Computes:
  //   - 's' = stem
  //   - 'k' = number of vowels in stem
  //   - 'l' = last vowel in stem
  //   - 'L' = penultimate vowel in stem
  (s = v.slice(k = l = 0, -3)).replace(/[aioueiöü][aıoueiöü]/g, c => (L = l, l = c, k++)),

  // Applies 't' => 'd' for irregular verbs and those ending in -et(mek).
  (/^(gi|ta|di|gü)t$/.exec(s) || (/et$/.exec(s) && (k = 1))) && T `d`,

  // Computes 'E' = truthy if the stem ends in a vowel.
  // If 'E' is set and the tense is the continuing present, drops this vowel.
  ((E = /[aioueiöü]$[aıoueiöü]$/.exec(s)) && t == 2 ? (l = L, T ``) : s) +

  // Appends sign of tense with vowel harmony.
  Z([
    // simple present (t = 1): either '-er', '-ir' or '-r'
    (E ? '' : k < 2 & !/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)) + 'r',

    // continuing present (t = 2): always '-iyor'
    '0yor',

    // future (t = 3): either '-yecek', '-ecek', '-yeceğ' or '-eceğ'
    (E ? 'y1c1' : '1c1') + 'gkk''ğkk' [--w]
  ][t - 1]) +

  // Appends personal suffix with vowel harmony,
  // forcing last vowel to 'o' for continuing present.
  Z(
    '0m|0z|s0n|s0n0z||l1r'.split `|` [w + w + p],
    t - 2 || (l = 'o')
  )
)
// Parameters:
//   - 'v' = verb
//   - 'p' = plural flag
//   - 'w' = person
//   - 't' = tense
(v, p, w, t) => (
  // T() - Helper function to replace the last character of 's' with 'r'.
  T = r => s = s.slice(0, -1) + r,

  // Z() - Helper function to apply vowel harmony to the substring 's',
  //       assuming '0' = 'i' and '1' = 'e' and using the last encountered
  //       vowel 'l'.
  Z = s => s.replace(
    /\d/g,
    c => l = [
      'iuiü' [(n = 'aioueiöü'.search(l)) >> 1],
      'ae' [n >> 2]
    ][c]
  ),

  // Computes:
  //   - 's' = stem
  //   - 'k' = number of vowels in stem
  //   - 'l' = last vowel in stem
  //   - 'L' = penultimate vowel in stem
  (s = v.slice(k = l = 0, -3)).replace(/[aioueiöü]/g, c => (L = l, l = c, k++)),

  // Applies 't' => 'd' for irregular verbs and those ending in -et(mek).
  (/^(gi|ta|di|gü)t$/.exec(s) || (/et$/.exec(s) && (k = 1))) && T `d`,

  // Computes 'E' = truthy if the stem ends in a vowel.
  // If 'E' is set and the tense is the continuing present, drops this vowel.
  ((E = /[aioueiöü]$/.exec(s)) && t == 2 ? (l = L, T ``) : s) +

  // Appends sign of tense with vowel harmony.
  Z([
    // simple present
    (E ? '' : k < 2 & !/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)) + 'r',

    // continuing present
    '0yor',

    // future
    (E ? 'y1c1' : '1c1') + 'gkk' [--w]
  ][t - 1]) +

  // Appends personal suffix with vowel harmony.
  Z(
    '0m|0z|s0n|s0n0z||l1r'.split `|` [w + w + p], t - 2 || (l = 'o')
  )
)
// Parameters:
//   - 'v' = verb
//   - 'p' = plural flag
//   - 'w' = person
//   - 't' = tense
(v, p, w, t) => (
  // T() - Helper function to replace the last character of 's' with 'r'.
  T = r => s = s.slice(0, -1) + r,

  // Z() - Helper function to apply vowel harmony to the substring 's',
  //       assuming '0' = 'i' and '1' = 'e' and using the last encountered
  //       vowel 'l'.
  Z = s => s.replace(
    /\d/g,
    c => l = [
      'ıuiü' [(n = 'aıoueiöü'.search(l)) >> 1],
      'ae' [n >> 2]
    ][c]
  ),

  // Computes:
  //   - 's' = stem
  //   - 'k' = number of vowels in stem
  //   - 'l' = last vowel in stem
  //   - 'L' = penultimate vowel in stem
  (s = v.slice(k = l = 0, -3)).replace(/[aıoueiöü]/g, c => (L = l, l = c, k++)),

  // Applies 't' => 'd' for irregular verbs and those ending in -et(mek).
  (/^(gi|ta|di|gü)t$/.exec(s) || (/et$/.exec(s) && (k = 1))) && T `d`,

  // Computes 'E' = truthy if the stem ends in a vowel.
  // If 'E' is set and the tense is the continuing present, drops this vowel.
  ((E = /[aıoueiöü]$/.exec(s)) && t == 2 ? (l = L, T ``) : s) +

  // Appends sign of tense with vowel harmony.
  Z([
    // simple present (t = 1): either '-er', '-ir' or '-r'
    (E ? '' : k < 2 & !/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)) + 'r',

    // continuing present (t = 2): always '-iyor'
    '0yor',

    // future (t = 3): either '-yecek', '-ecek', '-yeceğ' or '-eceğ'
    (E ? 'y1c1' : '1c1') + 'ğkk' [--w]
  ][t - 1]) +

  // Appends personal suffix with vowel harmony,
  // forcing last vowel to 'o' for continuing present.
  Z(
    '0m|0z|s0n|s0n0z||l1r'.split `|` [w + w + p],
    t - 2 || (l = 'o')
  )
)
4 saved 5 bytes + added ungolfed version
source | link

Javascript (ES6), 466 456456 451 bytes

It can definitely be golfed more, but here is a first second attempt.

(v,p,w,t)=>(T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.indexOfsearch(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(/^(gi|ta|di|gü)t$/.exec(s)||(/et$/.exec(s)&&(k=1)))&&T`d`,((E=/[aıoueiöü]$/.exec(s))&&t==2?(l=L,T``):s)+Z([(E?'':k>1||k<2&!/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)?0:1)+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))

Ungofled and commented

// Parameters:
//   - 'v' = verb
//   - 'p' = plural flag
//   - 'w' = person
//   - 't' = tense
(v, p, w, t) => (
  // T() - Helper function to replace the last character of 's' with 'r'.
  T = r => s = s.slice(0, -1) + r,

  // Z() - Helper function to apply vowel harmony to the substring 's',
  //       assuming '0' = 'i' and '1' = 'e' and using the last encountered
  //       vowel 'l'.
  Z = s => s.replace(
    /\d/g,
    c => l = [
      'iuiü' [(n = 'aioueiöü'.search(l)) >> 1],
      'ae' [n >> 2]
    ][c]
  ),

  // Computes:
  //   - 's' = stem
  //   - 'k' = number of vowels in stem
  //   - 'l' = last vowel in stem
  //   - 'L' = penultimate vowel in stem
  (s = v.slice(k = l = 0, -3)).replace(/[aioueiöü]/g, c => (L = l, l = c, k++)),

  // Applies 't' => 'd' for irregular verbs and those ending in -et(mek).
  (/^(gi|ta|di|gü)t$/.exec(s) || (/et$/.exec(s) && (k = 1))) && T `d`,

  // Computes 'E' = truthy if the stem ends in a vowel.
  // If 'E' is set and the tense is the continuing present, drops this vowel.
  ((E = /[aioueiöü]$/.exec(s)) && t == 2 ? (l = L, T ``) : s) +

  // Appends sign of tense with vowel harmony.
  Z([
    // simple present
    (E ? '' : k < 2 & !/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)) + 'r',

    // continuing present
    '0yor',

    // future
    (E ? 'y1c1' : '1c1') + 'gkk' [--w]
  ][t - 1]) +

  // Appends personal suffix with vowel harmony.
  Z(
    '0m|0z|s0n|s0n0z||l1r'.split `|` [w + w + p], t - 2 || (l = 'o')
  )
)
let f =
(v,p,w,t)=>(T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.indexOfsearch(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(/^(gi|ta|di|gü)t$/.exec(s)||(/et$/.exec(s)&&(k=1)))&&T`d`,((E=/[aıoueiöü]$/.exec(s))&&t==2?(l=L,T``):s)+Z([(E?'':k>1||k<2&!/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)?0:1)+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))

console.log(f("gütmek", false, 1, 2));    // -> güdüyorum
console.log(f("almak", true, 3, 3));      // -> alacaklar
console.log(f("boğmak", true, 2, 1));     // -> boğarsınız
console.log(f("ölmek", false, 3, 1));     // -> ölür
console.log(f("boyamak", true, 1, 2));    // -> boyuyoruz
console.log(f("affetmek", false, 2, 1));  // -> affedersin
console.log(f("söylemek", true, 3, 1));   // -> söylerler
console.log(f("söylemek", false, 3, 2));  // -> söylüyor
console.log(f("söylemek", false, 1, 3));  // -> söyleyeceğim

Javascript (ES6), 466 456 bytes

It can definitely be golfed more, but here is a first second attempt.

(v,p,w,t)=>(T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.indexOf(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(/^(gi|ta|di|gü)t$/.exec(s)||(/et$/.exec(s)&&(k=1)))&&T`d`,((E=/[aıoueiöü]$/.exec(s))&&t==2?(l=L,T``):s)+Z([(E?'':k>1||/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)?0:1)+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))
let f =
(v,p,w,t)=>(T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.indexOf(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(/^(gi|ta|di|gü)t$/.exec(s)||(/et$/.exec(s)&&(k=1)))&&T`d`,((E=/[aıoueiöü]$/.exec(s))&&t==2?(l=L,T``):s)+Z([(E?'':k>1||/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)?0:1)+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))

console.log(f("gütmek", false, 1, 2));    // -> güdüyorum
console.log(f("almak", true, 3, 3));      // -> alacaklar
console.log(f("boğmak", true, 2, 1));     // -> boğarsınız
console.log(f("ölmek", false, 3, 1));     // -> ölür
console.log(f("boyamak", true, 1, 2));    // -> boyuyoruz
console.log(f("affetmek", false, 2, 1));  // -> affedersin
console.log(f("söylemek", true, 3, 1));   // -> söylerler
console.log(f("söylemek", false, 3, 2));  // -> söylüyor
console.log(f("söylemek", false, 1, 3));  // -> söyleyeceğim

Javascript (ES6), 466 456 451 bytes

(v,p,w,t)=>(T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.search(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(/^(gi|ta|di|gü)t$/.exec(s)||(/et$/.exec(s)&&(k=1)))&&T`d`,((E=/[aıoueiöü]$/.exec(s))&&t==2?(l=L,T``):s)+Z([(E?'':k<2&!/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s))+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))

Ungofled and commented

// Parameters:
//   - 'v' = verb
//   - 'p' = plural flag
//   - 'w' = person
//   - 't' = tense
(v, p, w, t) => (
  // T() - Helper function to replace the last character of 's' with 'r'.
  T = r => s = s.slice(0, -1) + r,

  // Z() - Helper function to apply vowel harmony to the substring 's',
  //       assuming '0' = 'i' and '1' = 'e' and using the last encountered
  //       vowel 'l'.
  Z = s => s.replace(
    /\d/g,
    c => l = [
      'iuiü' [(n = 'aioueiöü'.search(l)) >> 1],
      'ae' [n >> 2]
    ][c]
  ),

  // Computes:
  //   - 's' = stem
  //   - 'k' = number of vowels in stem
  //   - 'l' = last vowel in stem
  //   - 'L' = penultimate vowel in stem
  (s = v.slice(k = l = 0, -3)).replace(/[aioueiöü]/g, c => (L = l, l = c, k++)),

  // Applies 't' => 'd' for irregular verbs and those ending in -et(mek).
  (/^(gi|ta|di|gü)t$/.exec(s) || (/et$/.exec(s) && (k = 1))) && T `d`,

  // Computes 'E' = truthy if the stem ends in a vowel.
  // If 'E' is set and the tense is the continuing present, drops this vowel.
  ((E = /[aioueiöü]$/.exec(s)) && t == 2 ? (l = L, T ``) : s) +

  // Appends sign of tense with vowel harmony.
  Z([
    // simple present
    (E ? '' : k < 2 & !/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s)) + 'r',

    // continuing present
    '0yor',

    // future
    (E ? 'y1c1' : '1c1') + 'gkk' [--w]
  ][t - 1]) +

  // Appends personal suffix with vowel harmony.
  Z(
    '0m|0z|s0n|s0n0z||l1r'.split `|` [w + w + p], t - 2 || (l = 'o')
  )
)
let f =
(v,p,w,t)=>(T=r=>s=s.slice(0,-1)+r,Z=s=>s.replace(/\d/g,c=>l=['ıuiü'[(n='aıoueiöü'.search(l))>>1],'ae'[n>>2]][c]),(s=v.slice(k=l=0,-3)).replace(/[aıoueiöü]/g,c=>(L=l,l=c,k++)),(/^(gi|ta|di|gü)t$/.exec(s)||(/et$/.exec(s)&&(k=1)))&&T`d`,((E=/[aıoueiöü]$/.exec(s))&&t==2?(l=L,T``):s)+Z([(E?'':k<2&!/^((k?a|bi|bu|ge|o|ö)l)|dur|gör|san|v[aeu]r$/.exec(s))+'r','0yor',(E?'y1c1':'1c1')+'ğkk'[--w]][t-1])+Z('0m|0z|s0n|s0n0z||l1r'.split`|`[w+w+p],t-2||(l='o')))

console.log(f("gütmek", false, 1, 2));    // -> güdüyorum
console.log(f("almak", true, 3, 3));      // -> alacaklar
console.log(f("boğmak", true, 2, 1));     // -> boğarsınız
console.log(f("ölmek", false, 3, 1));     // -> ölür
console.log(f("boyamak", true, 1, 2));    // -> boyuyoruz
console.log(f("affetmek", false, 2, 1));  // -> affedersin
console.log(f("söylemek", true, 3, 1));   // -> söylerler
console.log(f("söylemek", false, 3, 2));  // -> söylüyor
console.log(f("söylemek", false, 1, 3));  // -> söyleyeceğim
3 fixed for -etmek + saved 10 bytes
source | link
2 Accounting for error I made in the question
source | link
1
source | link