daidai 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +65 -0
- data/lib/daidai/deinflector.rb +21 -1
- data/lib/daidai/resources/japanese-transforms.json +3308 -0
- data/lib/daidai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6bb2777a6c22327a37198ea5ebb74da633638127869539c6cd507eba1b7d24e7
|
|
4
|
+
data.tar.gz: ab0172739b26f143c985cef073b7d4c4ec7f4950e7170c508ca8a2f2a2bf5928
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24ab765f86ce736e70bccb89c602238344a81357123ca4d05f5bda15841346fd6271c2534361c810d914163ecfb6a727764a4eb9f6755629fcce307833c4f734
|
|
7
|
+
data.tar.gz: 866e4f2fdc072c88bad204e28a83c0bc40bbbe720e2d3ce32787f44122dbe26f0a2ca1ff8c907c82c79fa40136b8cb208d1a5c1f8a3c0738fad349133d45459e
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,71 @@ follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.2.4] - 2026-08-03
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- The rest of the must / must not / may / need not set: `permission` (〜てもいい,
|
|
14
|
+
〜てもかまわない) and `exemption` (〜なくてもいい). Learners meet the four together,
|
|
15
|
+
so they now deinflect alike.
|
|
16
|
+
- The remaining て-auxiliaries beside `-おく` and `-しまう`: `-てみる`, `-てある`,
|
|
17
|
+
`-ていく`, `-てくる`. `conditionsIn` is the auxiliary's own verb class, so it may
|
|
18
|
+
conjugate and the verb is still reached (読んでみた, 読んでみたい).
|
|
19
|
+
- `-べき`, and the 連用形 suffixes `-ながら`, `-つつ`, `-やすい`, `-にくい`. The last two
|
|
20
|
+
are i-adjectives, so 読みやすかった resolves too.
|
|
21
|
+
- Aspectual compound verbs `-はじめる`/`-始める`, `-つづける`/`-続ける`,
|
|
22
|
+
`-おわる`/`-終わる`, in both spellings.
|
|
23
|
+
- The benefactives, who the action is done for: `-てあげる`, `-てやる`,
|
|
24
|
+
`-てさしあげる`, `-てくれる`, `-てくださる`, `-てもらう`, `-ていただく`.
|
|
25
|
+
- `-てください` (and 〜てちょうだい). ください is くださる's irregular imperative and does
|
|
26
|
+
not conjugate further, so `-てくださる` never matched the commonest polite request
|
|
27
|
+
in the language.
|
|
28
|
+
- Further 連用形 suffixes: `-がち`, `-っぱなし`, `-気味`, `-かねる`.
|
|
29
|
+
|
|
30
|
+
〜かける is excluded for the same reason as 〜だす: the substring にかける strips to
|
|
31
|
+
にる (煮る), a real word, so it would mis-read 気にかける.
|
|
32
|
+
|
|
33
|
+
〜だす, 〜なおす and 〜きる are deliberately absent: they lexicalise, and the
|
|
34
|
+
dictionary already carries them. 見直す is "to review", not "to see again", and
|
|
35
|
+
every 〜だす compound checked (泣き出す, 降り出す, 言い出す, 走り出す, 笑い出す,
|
|
36
|
+
動き出す) is a JMdict entry already. A rule wins nothing there, while 出す as a
|
|
37
|
+
main verb is everywhere: it read 外に出す as に出す ("煮出す") and 声に出して as にる.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- A shorter construction no longer shadows a longer one. 〜てはいけない matches inside
|
|
42
|
+
〜なくてはいけない and 〜てもいい inside 〜なくてもいい, so both readings were reachable
|
|
43
|
+
and a consumer picking by chain length could get `prohibition` for an obligation.
|
|
44
|
+
The negated forms now land straight on ない, which is both shorter and faithful
|
|
45
|
+
(〜なくて is ない's te-form), so the right label wins deterministically.
|
|
46
|
+
- The obligation and prohibition constructions resolve when their helper is itself
|
|
47
|
+
inflected (行かなければならなかった, 食べてはいけなかった). They were gated to the
|
|
48
|
+
outermost layer; gating on `adj-i` instead lets ならない/いけない deinflect first.
|
|
49
|
+
This removes the limitation recorded under 0.2.3.
|
|
50
|
+
|
|
51
|
+
## [0.2.3] - 2026-08-03
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
|
|
55
|
+
- Deinflection of the obligation and prohibition constructions, which no rule
|
|
56
|
+
reached before: 行かなければならない, 行かなくてはいけない, 行かないといけない,
|
|
57
|
+
行かねばならない, 行かなきゃならない, 行かなくちゃ (and the ~ません/~だめ variants)
|
|
58
|
+
now resolve to 行く, and 食べてはいけない, 読んではいけない, 遊んじゃだめ to their
|
|
59
|
+
base. Each rule strips only its helper and hands the rest back to a rule that
|
|
60
|
+
already existed, so the chain shows the whole derivation
|
|
61
|
+
(`["obligation", "-ば", "negative"]`) instead of one opaque step, and the
|
|
62
|
+
irregulars come along for free.
|
|
63
|
+
|
|
64
|
+
They are labelled as the opposites they are: `obligation (must)` negates the
|
|
65
|
+
verb and then the helper (行かなければならない, "there is no not-going"), while
|
|
66
|
+
`prohibition (must not)` leaves the verb plain (食べてはいけない, "eating won't
|
|
67
|
+
do"). Yomitan's rule set has neither, treating both as multi-word grammar
|
|
68
|
+
rather than inflection.
|
|
69
|
+
|
|
70
|
+
The helper's own inflection is not covered yet: 行かなければならなかった (past) and
|
|
71
|
+
行かなければならなくて still fall through, because the rules match the construction
|
|
72
|
+
only as the outermost layer.
|
|
73
|
+
|
|
9
74
|
## [0.2.2] - 2026-07-25
|
|
10
75
|
|
|
11
76
|
### Added
|
data/lib/daidai/deinflector.rb
CHANGED
|
@@ -70,7 +70,27 @@ module Daidai
|
|
|
70
70
|
"-んばかり" => "on the verge (-nbakari)", "-んとする" => "intentive (-ntosuru)",
|
|
71
71
|
"-え" => "slang (-e)", "n-slang" => "n-slang",
|
|
72
72
|
"imperative negative slang" => "imperative negative (slang)",
|
|
73
|
-
"kansai-ben" => "kansai dialect"
|
|
73
|
+
"kansai-ben" => "kansai dialect",
|
|
74
|
+
# Opposites, despite looking alike: obligation negates the verb and then
|
|
75
|
+
# negates the helper (行かなければならない, "there is no not-going"), while
|
|
76
|
+
# prohibition leaves the verb plain (食べてはいけない, "eating won't do").
|
|
77
|
+
"obligation" => "obligation (must)", "prohibition" => "prohibition (must not)",
|
|
78
|
+
"permission" => "permission (may)", "exemption" => "exemption (need not)",
|
|
79
|
+
"-てみる" => "attempt (-temiru)", "-てある" => "resultant state (-tearu)",
|
|
80
|
+
"-ていく" => "progression away (-teiku)", "-てくる" => "progression toward (-tekuru)",
|
|
81
|
+
"-べき" => "obligation (-beki)",
|
|
82
|
+
"-ながら" => "simultaneous (-nagara)", "-つつ" => "simultaneous (-tsutsu)",
|
|
83
|
+
"-やすい" => "easy to (-yasui)", "-にくい" => "hard to (-nikui)",
|
|
84
|
+
"-はじめる" => "begin (-hajimeru)", "-始める" => "begin (-hajimeru)",
|
|
85
|
+
"-つづける" => "continue (-tsuzukeru)", "-続ける" => "continue (-tsuzukeru)",
|
|
86
|
+
"-おわる" => "finish (-owaru)", "-終わる" => "finish (-owaru)",
|
|
87
|
+
"-てあげる" => "doing for someone (-teageru)", "-てやる" => "doing for someone, plain (-teyaru)",
|
|
88
|
+
"-てさしあげる" => "doing for someone, humble (-tesashiageru)",
|
|
89
|
+
"-てくれる" => "done for me (-tekureru)", "-てくださる" => "done for me, honorific (-tekudasaru)",
|
|
90
|
+
"-てもらう" => "having someone do (-temorau)", "-ていただく" => "having someone do, humble (-teitadaku)",
|
|
91
|
+
"-てください" => "polite request (-tekudasai)",
|
|
92
|
+
"-がち" => "tends to (-gachi)", "-っぱなし" => "left as it is (-ppanashi)",
|
|
93
|
+
"-気味" => "a touch of (-gimi)", "-かねる" => "cannot (-kaneru)"
|
|
74
94
|
}.freeze
|
|
75
95
|
|
|
76
96
|
# One deinflection rule: a test for the inflected form and how to undo it.
|