Skip to content

Commit

Permalink
[ja] add ~ておく conjugation (#1399)
Browse files Browse the repository at this point in the history
add teoku form
  • Loading branch information
khaitruong922 authored Sep 9, 2024
1 parent 411f8d2 commit 5ebe212
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 50 deletions.
10 changes: 10 additions & 0 deletions benches/japanese-language-transformer.bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ describe('japanese language transformer', () => {
'食べよっか',
'食べるまい',
'食べまい',
'食べておく',
'食べとく',
'食べないでおく',
'食べないどく',
'食べている',
'食べておる',
'食べてる',
Expand All @@ -105,6 +108,7 @@ describe('japanese language transformer', () => {
'打ち込んでいませんでした',
'食べさせられたくなかった',
'食べんとしませんかった',
'食べないどきたくありません',
];

const kuruInflections = [
Expand Down Expand Up @@ -152,7 +156,10 @@ describe('japanese language transformer', () => {
'こよっか',
'くるまい',
'こまい',
'きておく',
'きとく',
'こないでおく',
'こないどく',
'きている',
'きておる',
'きてる',
Expand Down Expand Up @@ -218,7 +225,10 @@ describe('japanese language transformer', () => {
'しよっか',
'するまい',
'しまい',
'しておく',
'しとく',
'しないでおく',
'しないどく',
'している',
'しておる',
'してる',
Expand Down
35 changes: 12 additions & 23 deletions ext/js/language/ja/japanese-transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -1360,35 +1360,24 @@ export const japaneseTransforms = {
suffixInflection('わされる', 'う', ['v1'], ['v5']),
],
},
'-toku': {
name: '-toku',
description: 'Contraction of -teoku.\n' +
'To do certain things in advance in preparation (or in anticipation) of latter needs.\n' +
'Usage: Attach おく to the te-form of verbs, then contract ておく into とく.',
'-teoku': {
name: '-teoku',
description: 'To do certain things in advance in preparation (or in anticipation) of latter needs.\n' +
'Usage: Attach おく to the te-form of verbs.\n' +
'Contraction: ておく → とく, でおく → どく',
i18n: [
{
language: 'ja',
name: '~とく',
description: '「~テオク」の縮約系',
name: '~ておく',
},
],
rules: [
suffixInflection('とく', 'る', ['v5'], ['v1']),
suffixInflection('いとく', 'く', ['v5'], ['v5']),
suffixInflection('いどく', 'ぐ', ['v5'], ['v5']),
suffixInflection('しとく', 'す', ['v5'], ['v5']),
suffixInflection('っとく', 'う', ['v5'], ['v5']),
suffixInflection('っとく', 'つ', ['v5'], ['v5']),
suffixInflection('っとく', 'る', ['v5'], ['v5']),
suffixInflection('んどく', 'ぬ', ['v5'], ['v5']),
suffixInflection('んどく', 'ぶ', ['v5'], ['v5']),
suffixInflection('んどく', 'む', ['v5'], ['v5']),
suffixInflection('じとく', 'ずる', ['v5'], ['vz']),
suffixInflection('しとく', 'する', ['v5'], ['vs']),
suffixInflection('為とく', '為る', ['v5'], ['vs']),
suffixInflection('きとく', 'くる', ['v5'], ['vk']),
suffixInflection('来とく', '来る', ['v5'], ['vk']),
suffixInflection('來とく', '來る', ['v5'], ['vk']),
suffixInflection('ておく', 'て', ['v5'], ['-te']),
suffixInflection('でおく', 'で', ['v5'], ['-te']),
suffixInflection('とく', 'て', ['v5'], ['-te']),
suffixInflection('どく', 'で', ['v5'], ['-te']),
suffixInflection('ないでおく', 'ない', ['v5'], ['adj-i']),
suffixInflection('ないどく', 'ない', ['v5'], ['adj-i']),
],
},
'-teiru': {
Expand Down
Loading

0 comments on commit 5ebe212

Please sign in to comment.