Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ja] add ~ておく conjugation #1399

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions benches/japanese-language-transformer.bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ describe('japanese language transformer', () => {
'食べよう',
'食べるまい',
'食べまい',
'食べておく',
'食べとく',
'食べないでおく',
'食べないどく',
'食べている',
'食べておる',
'食べてる',
Expand All @@ -103,6 +106,7 @@ describe('japanese language transformer', () => {
'打ち込んでいませんでした',
'食べさせられたくなかった',
'食べんとしませんかった',
'食べないどきたくありません',
];

const kuruInflections = [
Expand Down Expand Up @@ -148,7 +152,10 @@ describe('japanese language transformer', () => {
'こよう',
'くるまい',
'こまい',
'きておく',
'きとく',
'こないでおく',
'こないどく',
'きている',
'きておる',
'きてる',
Expand Down Expand Up @@ -212,7 +219,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 @@ -1372,35 +1372,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
Loading