Skip to content

Commit

Permalink
rename past to -ta
Browse files Browse the repository at this point in the history
  • Loading branch information
khaitruong922 committed Sep 12, 2024
1 parent 8b0fb3d commit a527460
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 47 deletions.
82 changes: 41 additions & 41 deletions ext/js/language/ja/japanese-transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ const conditions = {
name: 'Intermediate -ku endings for adverbs',
isDictionaryForm: false,
},
'past': {
name: '-ta past form ending',
'-ta': {
name: '-ta form ending',
isDictionaryForm: false,
},
'-n': {
Expand Down Expand Up @@ -1142,7 +1142,7 @@ export const japaneseTransforms = {
'2. Indicates the completion of an action.\n' +
'3. Indicates the confirmation of a matter.\n' +
'4. Indicates the speaker\'s confidence that the action will definitely be fulfilled.\n' +
'5. Indicates the events that occur before the main clause are represented as relative past.\n' +
'5. Indicates the events that occur before the main clause are represented as relative -ta.\n' +
'6. Indicates a mild imperative/command.\n' +
'Usage: Attach た to the continuative form (renyoukei) of verbs after euphonic change form, かった to the stem of i-adjectives.',
i18n: [
Expand All @@ -1152,27 +1152,27 @@ export const japaneseTransforms = {
},
],
rules: [
suffixInflection('かった', 'い', ['past'], ['adj-i']),
suffixInflection('た', 'る', ['past'], ['v1']),
suffixInflection('いた', 'く', ['past'], ['v5']),
suffixInflection('いだ', 'ぐ', ['past'], ['v5']),
suffixInflection('した', 'す', ['past'], ['v5']),
suffixInflection('った', 'う', ['past'], ['v5']),
suffixInflection('った', 'つ', ['past'], ['v5']),
suffixInflection('った', 'る', ['past'], ['v5']),
suffixInflection('んだ', 'ぬ', ['past'], ['v5']),
suffixInflection('んだ', 'ぶ', ['past'], ['v5']),
suffixInflection('んだ', 'む', ['past'], ['v5']),
suffixInflection('じた', 'ずる', ['past'], ['vz']),
suffixInflection('した', 'する', ['past'], ['vs']),
suffixInflection('為た', '為る', ['past'], ['vs']),
suffixInflection('きた', 'くる', ['past'], ['vk']),
suffixInflection('来た', '来る', ['past'], ['vk']),
suffixInflection('來た', '來る', ['past'], ['vk']),
...irregularVerbSuffixInflections('た', ['past'], ['v5']),
suffixInflection('ました', 'ます', ['past'], ['-masu']),
suffixInflection('でした', '', ['past'], ['-masen']),
suffixInflection('かった', '', ['past'], ['-masen', '-n']),
suffixInflection('かった', 'い', ['-ta'], ['adj-i']),
suffixInflection('た', 'る', ['-ta'], ['v1']),
suffixInflection('いた', 'く', ['-ta'], ['v5']),
suffixInflection('いだ', 'ぐ', ['-ta'], ['v5']),
suffixInflection('した', 'す', ['-ta'], ['v5']),
suffixInflection('った', 'う', ['-ta'], ['v5']),
suffixInflection('った', 'つ', ['-ta'], ['v5']),
suffixInflection('った', 'る', ['-ta'], ['v5']),
suffixInflection('んだ', 'ぬ', ['-ta'], ['v5']),
suffixInflection('んだ', 'ぶ', ['-ta'], ['v5']),
suffixInflection('んだ', 'む', ['-ta'], ['v5']),
suffixInflection('じた', 'ずる', ['-ta'], ['vz']),
suffixInflection('した', 'する', ['-ta'], ['vs']),
suffixInflection('為た', '為る', ['-ta'], ['vs']),
suffixInflection('きた', 'くる', ['-ta'], ['vk']),
suffixInflection('来た', '来る', ['-ta'], ['vk']),
suffixInflection('來た', '來る', ['-ta'], ['vk']),
...irregularVerbSuffixInflections('た', ['-ta'], ['v5']),
suffixInflection('ました', 'ます', ['-ta'], ['-masu']),
suffixInflection('でした', '', ['-ta'], ['-masen']),
suffixInflection('かった', '', ['-ta'], ['-masen', '-n']),
],
},
'-masu': {
Expand Down Expand Up @@ -1582,8 +1582,8 @@ export const japaneseTransforms = {
suffixInflection('へん', 'ない', [], ['adj-i']),
suffixInflection('ひん', 'ない', [], ['adj-i']),
suffixInflection('せえへん', 'しない', [], ['adj-i']),
suffixInflection('へんかった', 'なかった', ['past'], ['past']),
suffixInflection('ひんかった', 'なかった', ['past'], ['past']),
suffixInflection('へんかった', 'なかった', ['-ta'], ['-ta']),
suffixInflection('ひんかった', 'なかった', ['-ta'], ['-ta']),
suffixInflection('うてへん', 'ってない', [], ['adj-i']),
],
},
Expand Down Expand Up @@ -1626,21 +1626,21 @@ export const japaneseTransforms = {
},
],
rules: [
suffixInflection('うた', 'った', ['past'], ['past']),
suffixInflection('おうた', 'あった', ['past'], ['past']),
suffixInflection('こうた', 'かった', ['past'], ['past']),
suffixInflection('ごうた', 'がった', ['past'], ['past']),
suffixInflection('そうた', 'さった', ['past'], ['past']),
suffixInflection('ぞうた', 'ざった', ['past'], ['past']),
suffixInflection('とうた', 'たった', ['past'], ['past']),
suffixInflection('どうた', 'だった', ['past'], ['past']),
suffixInflection('のうた', 'なった', ['past'], ['past']),
suffixInflection('ほうた', 'はった', ['past'], ['past']),
suffixInflection('ぼうた', 'ばった', ['past'], ['past']),
suffixInflection('もうた', 'まった', ['past'], ['past']),
suffixInflection('ろうた', 'らった', ['past'], ['past']),
suffixInflection('ようた', 'やった', ['past'], ['past']),
suffixInflection('ゆうた', 'いった', ['past'], ['past']),
suffixInflection('うた', 'った', ['-ta'], ['-ta']),
suffixInflection('おうた', 'あった', ['-ta'], ['-ta']),
suffixInflection('こうた', 'かった', ['-ta'], ['-ta']),
suffixInflection('ごうた', 'がった', ['-ta'], ['-ta']),
suffixInflection('そうた', 'さった', ['-ta'], ['-ta']),
suffixInflection('ぞうた', 'ざった', ['-ta'], ['-ta']),
suffixInflection('とうた', 'たった', ['-ta'], ['-ta']),
suffixInflection('どうた', 'だった', ['-ta'], ['-ta']),
suffixInflection('のうた', 'なった', ['-ta'], ['-ta']),
suffixInflection('ほうた', 'はった', ['-ta'], ['-ta']),
suffixInflection('ぼうた', 'ばった', ['-ta'], ['-ta']),
suffixInflection('もうた', 'まった', ['-ta'], ['-ta']),
suffixInflection('ろうた', 'らった', ['-ta'], ['-ta']),
suffixInflection('ようた', 'やった', ['-ta'], ['-ta']),
suffixInflection('ゆうた', 'いった', ['-ta'], ['-ta']),
],
},
'kansai-ben -tara': {
Expand Down
2 changes: 1 addition & 1 deletion test/data/translator-test-results-note-data1.json
Original file line number Diff line number Diff line change
Expand Up @@ -31889,7 +31889,7 @@
},
{
"name": "kansai-ben",
"description": "past form of kansai-ben terms"
"description": "-ta form of kansai-ben terms"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion test/data/translator-test-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -18321,7 +18321,7 @@
},
{
"name": "kansai-ben",
"description": "past form of kansai-ben terms"
"description": "-ta form of kansai-ben terms"
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions test/language/japanese-transforms.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import { japaneseTransforms } from '../../ext/js/language/ja/japanese-transforms.js';
import { LanguageTransformer } from '../../ext/js/language/language-transformer.js';
import { testLanguageTransformer } from '../fixtures/language-transformer-test.js';
import {japaneseTransforms} from '../../ext/js/language/ja/japanese-transforms.js';
import {LanguageTransformer} from '../../ext/js/language/language-transformer.js';
import {testLanguageTransformer} from '../fixtures/language-transformer-test.js';

/* eslint-disable @stylistic/no-multi-spaces */
const tests = [
Expand Down Expand Up @@ -1491,7 +1491,7 @@ const tests = [
],
},
{
category: 'past form of kansai-ben terms',
category: '-ta form of kansai-ben terms',
valid: true,
tests: [
{term: '買う', source: '買うた', rule: null, reasons: ['-ta', 'kansai-ben -ta']},
Expand Down

0 comments on commit a527460

Please sign in to comment.