aboutsummaryrefslogtreecommitdiff
path: root/test/deinflection/cases.ts
blob: df8d8930e84c728ab9f71a077e4b359a1a6c0017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import { TokenTags, Tag } from "../../search/tags.ts";
const { Inflection } = Tag;

interface Test {
	input: string;
	mustHave: TokenTags;
	mustNotHave: TokenTags;
	force?: { reading: string, writing: string };
};

export default [
	// jisho.org generated conjugations for 取る (u-verb)
	{ input: "取る", mustHave: [ Inflection.Affirmative ], mustNotHave: [], },
	{ input: "取らない", mustHave: [ Inflection.Negative ], mustNotHave: [], },
	{ input: "取ります", mustHave: [ Inflection.Polite.Masu ], mustNotHave: [], },
	{ input: "取りません", mustHave: [ Inflection.Negative, Inflection.Polite.Masu ], mustNotHave: [], },
	{ input: "取った", mustHave: [ Inflection.Tense.Past ], mustNotHave: [], },
	{ input: "取らなかった", mustHave: [ Inflection.Negative, Inflection.Tense.Past ], mustNotHave: [], },
	{ input: "取りました", mustHave: [ Inflection.Polite.Masu, Inflection.Tense.Past ], mustNotHave: [], },
	{ input: "取りませんでした", mustHave: [ Inflection.Negative, Inflection.Polite.Masu, Inflection.Tense.Past ], mustNotHave: [], },
	{ input: "取って", mustHave: [ Inflection.Suffix.Te ], mustNotHave: [], },
	{ input: "取らなくて", mustHave: [ Inflection.Negative, Inflection.Suffix.Te ], mustNotHave: [], },
	{ input: "取れる", mustHave: [ Inflection.Potential ], mustNotHave: [], },
	{ input: "取れない", mustHave: [ Inflection.Negative, Inflection.Potential ], mustNotHave: [], },
	{ input: "取られる", mustHave: [ Inflection.Passive ], mustNotHave: [], },
	{ input: "取られない", mustHave: [ Inflection.Negative, Inflection.Passive ], mustNotHave: [], },
	{ input: "取らせる", mustHave: [ Inflection.Causative ], mustNotHave: [], },
	{ input: "取らせない", mustHave: [ Inflection.Negative, Inflection.Causative ], mustNotHave: [], },
	{ input: "取らせられる", mustHave: [ Inflection.Causative, Inflection.Passive ], mustNotHave: [], },
	{ input: "取らせられない", mustHave: [ Inflection.Negative, Inflection.Causative, Inflection.Passive ], mustNotHave: [], },
	{ input: "取れ", mustHave: [ Inflection.Command ], mustNotHave: [], },
	{ input: "取るな", mustHave: [ Inflection.Negative, Inflection.Command ], mustNotHave: [], },
	// other tests
	{ input: "取ったり", mustHave: [ Inflection.Suffix.Tari ], mustNotHave: [ Inflection.Tense.Past ], },
	{ input: "早く", force: { reading: "はやい", writing: "早い" }, mustHave: [ Inflection.Adverb ], mustNotHave: [], },
	{ input: "遊んだり", mustHave: [ Inflection.Suffix.Tari ], mustNotHave: [ Inflection.Tense.Past ], },
	{ input: "聞け", mustHave: [ Inflection.Command ], mustNotHave: [], },
	{ input: "食べさせる", mustHave: [ Inflection.Causative ], mustNotHave: [], },
	{ input: "落ちられる", mustHave: [ Inflection.Potential ], mustNotHave: [], },
	{ input: "言われる", mustHave: [ Inflection.Passive ], mustNotHave: [], },
	{ input: "喋っている", mustHave: [ Inflection.Tense.Continuous ], mustNotHave: [ Inflection.Suffix.Te, Inflection.Tense.Past ], },
	{ input: "泳げれば", mustHave: [ Inflection.Conditional.Ba ], mustNotHave: [], },
	{ input: "取らなければ", mustHave: [ Inflection.Conditional.Ba, Inflection.Negative ], mustNotHave: [], },
	{ input: "入ってはいけない", mustHave: [ Inflection.Obligatory, Inflection.Negative ], mustNotHave: [ Inflection.Affirmative ], }, // obliged + negative = must not ~
	{ input: "行かなくてはなりません", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Negative ], }, // obliged + affirmative = must ~
	{ input: "しなくちゃ", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Negative, Inflection.Suffix.Te ], },
	{ input: "食べなきゃ", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Negative, Inflection.Conditional.Ba ], },
	{ input: "行かないと", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Negative ], },
	{ input: "入っちゃだめ", mustHave: [ Inflection.Obligatory, Inflection.Negative ], mustNotHave: [ Inflection.Affirmative ], },
	{ input: "死んじゃだめ", mustHave: [ Inflection.Obligatory, Inflection.Negative ], mustNotHave: [ Inflection.Affirmative ], },
	{ input: "しなくてはいけなかった", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Negative ], },
	{ input: "行かないとだめ", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Negative ], },
	{ input: "しないといけない", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Negative ], },
	{ input: "行かなければいけません", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Negative, Inflection.Conditional.Ba ], },
	{ input: "しなければだめ", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Negative, Inflection.Conditional.Ba ], },
	{ input: "行かないと", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Negative ], },
	{ input: "買いたい", mustHave: [ Inflection.Desirable.Itai ], mustNotHave: [], },
	{ input: "寝よう", mustHave: [ Inflection.Desirable.Volitional ], mustNotHave: [], },
	{ input: "しましょう", force: { reading: "する", writing: "為る" }, mustHave: [ Inflection.Desirable.Volitional, Inflection.Polite.Masu ], mustNotHave: [], },
	{ input: "きましょう", mustHave: [ Inflection.Desirable.Volitional, Inflection.Polite.Masu ], mustNotHave: [], },
	{ input: "寝ましょう", mustHave: [ Inflection.Desirable.Volitional, Inflection.Polite.Masu ], mustNotHave: [], },
	{ input: "行きましょう", mustHave: [ Inflection.Desirable.Volitional, Inflection.Polite.Masu ], mustNotHave: [], },
	{ input: "遊びましょう", mustHave: [ Inflection.Desirable.Volitional, Inflection.Polite.Masu ], mustNotHave: [], },
	{ input: "食べてみた", mustHave: [ Inflection.Attempt.Miru, Inflection.Tense.Past ], mustNotHave: [ Inflection.Suffix.Te ], },
	{ input: "飲んでみました", mustHave: [ Inflection.Attempt.Miru, Inflection.Tense.Past, Inflection.Polite.Masu ], mustNotHave: [ Inflection.Suffix.Te ], },
	{ input: "食べてみたい", mustHave: [ Inflection.Attempt.Miru, Inflection.Desirable.Itai ], mustNotHave: [ Inflection.Suffix.Te ], },
	{ input: "切ってみなかった", mustHave: [ Inflection.Attempt.Miru, Inflection.Negative, Inflection.Tense.Past ], mustNotHave: [ Inflection.Suffix.Te ] },
	{ input: "見ようとする", mustHave: [ Inflection.Attempt.ToSuru ], mustNotHave: [ Inflection.Desirable.Volitional ], },
	{ input: "行こうとする", mustHave: [ Inflection.Attempt.ToSuru ], mustNotHave: [ Inflection.Desirable.Volitional ], },
	{ input: "避けようとする", force: { writing: "避ける", reading: "さける" }, mustHave: [ Inflection.Attempt.ToSuru ], mustNotHave: [ Inflection.Desirable.Volitional, Inflection.Potential ], },
	{ input: "入ろうとしている", mustHave: [ Inflection.Attempt.ToSuru, Inflection.Tense.Continuous ], mustNotHave: [ Inflection.Desirable.Volitional ], },
	{ input: "食べなさい", mustHave: [ Inflection.Polite.Nasai ], mustNotHave: [], },
	{ input: "飲みなさい", mustHave: [ Inflection.Polite.Nasai ], mustNotHave: [], },
	{ input: "しなさい", mustHave: [ Inflection.Polite.Nasai ], mustNotHave: [], },
	{ input: "聞きなさい", mustHave: [ Inflection.Polite.Nasai ], mustNotHave: [], },
	{ input: "座りなさい", mustHave: [ Inflection.Polite.Nasai ], mustNotHave: [], },
	{ input: "食べさせられる", mustHave: [ Inflection.Passive, Inflection.Causative ], mustNotHave: [], },
	{ input: "見極めなければならない", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Conditional.Ba, Inflection.Negative ] },
	{ input: "ならなきゃいけない", mustHave: [ Inflection.Obligatory, Inflection.Affirmative ], mustNotHave: [ Inflection.Conditional.Ba, Inflection.Negative ] },
	// TODO: りゃ for いることは
	// TODO: じゃ for では
	// and more!
] satisfies Test[] as Test[];