daidai 0.1.0
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 +7 -0
- data/CHANGELOG.md +31 -0
- data/LICENSE +674 -0
- data/NOTICE +42 -0
- data/README.md +267 -0
- data/lib/daidai/conjugator.rb +122 -0
- data/lib/daidai/deinflector.rb +211 -0
- data/lib/daidai/kabosu.rb +134 -0
- data/lib/daidai/resources/conj.csv +14 -0
- data/lib/daidai/resources/conjo.csv +1138 -0
- data/lib/daidai/resources/conotes.csv +18 -0
- data/lib/daidai/resources/japanese-transforms.json +8847 -0
- data/lib/daidai/resources/kwpos.csv +93 -0
- data/lib/daidai/tables.rb +55 -0
- data/lib/daidai/version.rb +5 -0
- data/lib/daidai/word.rb +134 -0
- data/lib/daidai.rb +75 -0
- metadata +121 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 815ed137deb6d37740054bc04852cebd9e8a3c4a09461a8b22298ab893efbf43
|
|
4
|
+
data.tar.gz: 16d075fcf316c88b1c7f780f7a82330bf9ba9531b8eb1bd9a6028a9ec76651bb
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b5d8f519e01e37243b5e5a1ff434148d1d399b2a4c32e1547d1541a0006cc6ca89414e51d1402c847c2b2f0b703b61d0c3630f3076548d6898b2afe93ec084d3
|
|
7
|
+
data.tar.gz: 137188ce2e1ef0b837de4397e01af289381de4c4647109745741898bc787696b35f00b30ff04ba20cb2d6469ad9db40b65c5737b8539d5ba11eeaa63463e802f
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project aims to
|
|
5
|
+
follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0] - 2026-06-27
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `Daidai.conjugate(word, pos)` — forward conjugation of Japanese verbs and
|
|
14
|
+
adjectives, table-driven from the JMdictDB conjugation tables.
|
|
15
|
+
- `Daidai::Word` interface: forms by name (`#past`, `#te`, `#potential`, …) with
|
|
16
|
+
`negative:`/`polite:` keyword modifiers and chainable fluent views
|
|
17
|
+
(`word.polite.negative.past`); `#[]`, `#variants`, `#conjugations`, and
|
|
18
|
+
`Enumerable`.
|
|
19
|
+
- Optional reading: pass `reading:` to get each form's kana; kanji-only forms
|
|
20
|
+
need none.
|
|
21
|
+
- `Daidai.conjugatable?(pos)` for a code or array of codes.
|
|
22
|
+
- Optional `Daidai.conjugate(word)` (POS omitted): resolves the dictionary form,
|
|
23
|
+
POS and reading via the optional `kabosu` gem (Sudachi), even from inflected
|
|
24
|
+
input — see `Daidai::Kabosu`. Kept lazy and out of the default dependency set.
|
|
25
|
+
- `Daidai.deinflect(word)` — pure-Ruby, offline deinflection: turns an inflected
|
|
26
|
+
surface form back into its dictionary form(s) and names each inflection (the
|
|
27
|
+
inverse of `#conjugate`). Ported from Yomitan's Japanese language transforms;
|
|
28
|
+
also covers colloquial contractions (てる, ちゃう, …). See `Daidai::Deinflector`.
|
|
29
|
+
|
|
30
|
+
[Unreleased]: https://github.com/davafons/daidai/compare/v0.1.0...HEAD
|
|
31
|
+
[0.1.0]: https://github.com/davafons/daidai/releases/tag/v0.1.0
|