dsh-cait 1.0.5 → 1.1.3
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.
- package/CHANGELOG.md +159 -0
- package/README.ja.md +100 -18
- package/README.md +126 -19
- package/README.zh-CN.md +90 -17
- package/client/components.js +2023 -347
- package/client/entry.js +13 -0
- package/client/helpers.js +110 -7
- package/client/locales.js +408 -0
- package/client/styles.js +137 -3
- package/client.js +2690 -356
- package/index.js +3 -0
- package/lib/aligner.js +411 -0
- package/lib/api.js +31 -0
- package/lib/context.js +71 -0
- package/lib/glossary.js +4 -4
- package/lib/import-export.js +72 -4
- package/lib/libraries.js +55 -0
- package/lib/library-export.js +75 -0
- package/lib/library-view.js +215 -0
- package/lib/mt.js +17 -7
- package/lib/persistence.js +72 -7
- package/lib/pre-translate.js +263 -0
- package/lib/propagate.js +133 -0
- package/lib/qa.js +167 -0
- package/lib/store-utils.js +43 -4
- package/lib/store.js +131 -12
- package/lib/term-extract.js +190 -0
- package/lib/terms.js +102 -0
- package/lib/tm.js +123 -11
- package/lib/tmx.js +47 -2
- package/lib/tools.js +472 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,165 @@ All notable changes to CAIT are documented here. The project follows
|
|
|
4
4
|
[Semantic Versioning](https://semver.org/) and the format is based on
|
|
5
5
|
[Keep a Changelog](https://keepachangelog.com/).
|
|
6
6
|
|
|
7
|
+
## [1.1.3] - 2026-11-07
|
|
8
|
+
|
|
9
|
+
Alignment, repetition and terminology: CAIT can now build a translation memory
|
|
10
|
+
out of two finished files, fill repeated sentences by itself, and propose
|
|
11
|
+
terminology with evidence instead of guessing.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Aligner.** Give it the source file and the translated file — two independent
|
|
16
|
+
documents, different languages allowed — and it pairs them segment by segment.
|
|
17
|
+
Scoring is cross-language: anchors (numbers, `{0}` placeholders, URLs,
|
|
18
|
+
capitalised names), length normalised per language, and paragraph structure.
|
|
19
|
+
Word-level similarity is deliberately not used, because it cannot compare two
|
|
20
|
+
languages. Blocked dynamic programming admits 1:1, 1:0, 0:1, 2:1 and 1:2 pairs;
|
|
21
|
+
rows are graded high / to-review / doubtful, and each row can be merged,
|
|
22
|
+
split or removed before writing to a library.
|
|
23
|
+
- **`readUploadText`** reads text out of any supported upload (docx, epub, xlsx,
|
|
24
|
+
pptx, html, csv, srt, vtt, po, json, rtf, xliff, markdown, plain text) without
|
|
25
|
+
creating a document.
|
|
26
|
+
- **Automatic propagation.** Confirming a segment copies its translation into
|
|
27
|
+
every other unconfirmed segment with the same source (`origin: auto`); editing
|
|
28
|
+
a draft keeps those copies in sync. "Fill repeated segments" does the same for
|
|
29
|
+
the whole document, and the rail only offers it when something would change.
|
|
30
|
+
- **Terminology mining.** `lib/term-extract.js` counts candidates — Latin word
|
|
31
|
+
n-grams and repeated CJK substrings filtered by boundary entropy — and ranks
|
|
32
|
+
them C-value style. The library workspace lists them with occurrence counts,
|
|
33
|
+
existing glossary hits and any wording translation memory already contains.
|
|
34
|
+
- **Agent tools** `cat_propose_translation`, `cat_align`,
|
|
35
|
+
`cat_consistency_report`, `cat_term_candidates` and `cat_add_terms`.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- QA gained two checks: `UNTRANSLATED_RESIDUE` (the target is still the source)
|
|
40
|
+
and `INCONSISTENT_TARGET` (one source, several translations). Both are advisory
|
|
41
|
+
and never block confirming or exporting.
|
|
42
|
+
- `proposeTranslation` writes only a `suggestion` plus its reason, never the
|
|
43
|
+
target: an agent can propose, the user keeps the last word.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- Editing one copy of a repeated sentence no longer leaves its siblings stale.
|
|
48
|
+
|
|
49
|
+
## [1.1.2] - 2026-11-07
|
|
50
|
+
|
|
51
|
+
Context-aware translation memory: the same sentence can now keep one
|
|
52
|
+
translation per surrounding text, and an exact context match scores 101%.
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- **Context matches (ICE).** Every confirmation stores the two neighbouring
|
|
57
|
+
source segments with the entry, hashed into `contextHash`. When a segment is
|
|
58
|
+
looked up with the same neighbours, it scores **101%** and is graded
|
|
59
|
+
`context`; a text match with different neighbours stays at 100%. Covered in
|
|
60
|
+
the review panel by a 101% badge and a `previous · next` line under the source.
|
|
61
|
+
- **Pre-translation uses context.** The block loop resolves ICE first, falls back
|
|
62
|
+
to the generic entry, then to machine translation, and each filled segment
|
|
63
|
+
reports `ice: true`, which `cat_pre_translate` summarises.
|
|
64
|
+
- **Library context column.** The library workspace shows each TM entry's
|
|
65
|
+
neighbouring text, so variants of one source can be told apart.
|
|
66
|
+
|
|
67
|
+
### Changed
|
|
68
|
+
|
|
69
|
+
- Translation memory is keyed by `(library, language pair, normalised source,
|
|
70
|
+
contextHash)` instead of the source alone. `addTM` / `importTM` without a
|
|
71
|
+
context write the generic variant; confirming a segment writes its variant.
|
|
72
|
+
- Each key keeps at most 8 context variants; the oldest is evicted (the
|
|
73
|
+
generic entry never is).
|
|
74
|
+
- TMX export writes `<prop type="x-context">` and import reads it back, so
|
|
75
|
+
context survives a round-trip; TMX import now dedupes by key **and** context.
|
|
76
|
+
- Store version 4. Version 1–3 stores load unchanged: entries get a null
|
|
77
|
+
context, which behaves exactly like before.
|
|
78
|
+
|
|
79
|
+
## [1.1.1] - 2026-11-07
|
|
80
|
+
|
|
81
|
+
A library workspace that works without a document open.
|
|
82
|
+
|
|
83
|
+
### Added
|
|
84
|
+
|
|
85
|
+
- **Library workspace.** A new top-level view (topbar `Documents` / `Libraries`)
|
|
86
|
+
browses every translation-memory entry and glossary term, whether or not a
|
|
87
|
+
document is open and whether or not the library is mounted. It pages through
|
|
88
|
+
entries, filters by language, scopes the search to any combination of
|
|
89
|
+
libraries, and edits entries in a side panel without leaving the table.
|
|
90
|
+
- **Library exports.** A translation-memory library exports to TMX and a
|
|
91
|
+
glossary exports to TBX, CSV, or JSON, straight from the workspace.
|
|
92
|
+
- **Segment pagination.** The segment rail pages through filtered segments with a
|
|
93
|
+
20/50/100/200 page size (remembered in `localStorage`) and accepts a typed
|
|
94
|
+
segment number to jump to, clearing the filter when the target is hidden.
|
|
95
|
+
- **Panel-to-library jump.** The right panel's library button opens the workspace
|
|
96
|
+
with the panel's current search text (and the glossary tab) applied, so looking
|
|
97
|
+
something up in the panel continues in the full list.
|
|
98
|
+
|
|
99
|
+
### Changed
|
|
100
|
+
|
|
101
|
+
- The glossary tab no longer dumps the mounted glossary into the side panel with
|
|
102
|
+
a hard 200-term cut-off. It lists only the terms that match the current
|
|
103
|
+
segment and links to the workspace for everything else.
|
|
104
|
+
- Glossary entries can be edited or deleted in libraries that are not mounted;
|
|
105
|
+
mounting a library is still the explicit toggle it was.
|
|
106
|
+
|
|
107
|
+
## [1.1.0] - 2026-11-07
|
|
108
|
+
|
|
109
|
+
Agent-assisted pre-translation and a stacked review workbench.
|
|
110
|
+
|
|
111
|
+
### Added
|
|
112
|
+
|
|
113
|
+
- **Pre-translation.** `cat_pre_translate` (and the `preTranslate` RPC) fills a
|
|
114
|
+
block of segments from exact translation-memory matches first, then machine
|
|
115
|
+
translation, in small concurrent batches. Confirmed segments and segments that
|
|
116
|
+
already carry a target are skipped, so repeated or interrupted runs never
|
|
117
|
+
overwrite human work. The workbench adds a topbar button that walks the
|
|
118
|
+
document block by block, shows `done/total`, and can be stopped between blocks.
|
|
119
|
+
- **Stacked review.** The editor lays source, the machine/agent baseline, and the
|
|
120
|
+
editable target out top to bottom, so each block gets the full pane width. The
|
|
121
|
+
baseline is stored on `suggestion`, so editing the target always has the
|
|
122
|
+
original to compare against.
|
|
123
|
+
- **Suggestion adoption.** `adoptSuggestion` copies a suggestion into the target
|
|
124
|
+
while keeping its origin and the suggestion itself for later comparison.
|
|
125
|
+
- **Batch reading and confirmation for agents.** `cat_get_segments` lists a
|
|
126
|
+
bounded window with status, origin, and suggestions; `cat_confirm_segments`
|
|
127
|
+
confirms a list of indices or every segment awaiting review, reporting what it
|
|
128
|
+
skipped instead of guessing.
|
|
129
|
+
- **Advisory QA.** A derived report flags missing placeholders/tags, mismatched
|
|
130
|
+
numbers, unused glossary terms, and segments marked as translated but empty.
|
|
131
|
+
Issues appear as a marker in the segment rail and as a banner in the export
|
|
132
|
+
dialog; they never block an export and nothing is written to disk.
|
|
133
|
+
- **Translation memory and library maintenance.** Single TM entries can be
|
|
134
|
+
edited or deleted from the match cards, and TM/glossary libraries can be
|
|
135
|
+
renamed or deleted (the last library of a kind stays protected).
|
|
136
|
+
- **Theme adaptation.** The workbench follows the host light/dark theme: the
|
|
137
|
+
root sets `color-scheme` (so native selects, checkboxes, and scrollbars match),
|
|
138
|
+
primary button labels use the inverted label token, and the segment rail search
|
|
139
|
+
now also matches suggestions.
|
|
140
|
+
|
|
141
|
+
### Changed
|
|
142
|
+
|
|
143
|
+
- Segments move through three states — `pending`, `translated`, `confirmed` —
|
|
144
|
+
with `origin` (`tm`/`mt`/`agent`/`manual`) recording who produced the text.
|
|
145
|
+
Progress now separates "awaiting review" from "pending" instead of counting
|
|
146
|
+
both as unfinished.
|
|
147
|
+
- The store format is version 3. Versions 1 and 2 still load and migrate in
|
|
148
|
+
place; a version-2 draft with text but no confirmation becomes `translated`
|
|
149
|
+
with `origin: manual`.
|
|
150
|
+
- UI scaling is damped above the design size (`1 + (fit - 1) × 0.6`, capped at
|
|
151
|
+
1.45×) so a maximized window no longer grows the interface far beyond the host
|
|
152
|
+
UI.
|
|
153
|
+
- MT route discovery no longer filters providers by what the loader configuration
|
|
154
|
+
happens to mention: every registered provider is listed, configured ones first,
|
|
155
|
+
and providers without models stay visible but disabled.
|
|
156
|
+
|
|
157
|
+
### Fixed
|
|
158
|
+
|
|
159
|
+
- Adding a custom model provider no longer hides the built-in DeepSeek route from
|
|
160
|
+
the model-route list.
|
|
161
|
+
- The selected segment and an unsaved draft are now persisted (debounced, plus a
|
|
162
|
+
flush on unload) instead of only travelling along with unrelated writes.
|
|
163
|
+
- The primary button label no longer uses a surface token, which produced
|
|
164
|
+
unreadable text in the dark theme.
|
|
165
|
+
|
|
7
166
|
## [1.0.5] - 2026-11-06
|
|
8
167
|
|
|
9
168
|
EPUB support, an import preprocessing stage, and format hardening.
|
package/README.ja.md
CHANGED
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
<p align="center">
|
|
18
18
|
<a href="https://www.npmjs.com/package/dsh-cait"><img alt="npm バージョン" src="https://img.shields.io/npm/v/dsh-cait.svg" /></a>
|
|
19
19
|
<img alt="DSH 0.2.x" src="https://img.shields.io/badge/DSH-0.2.x-4d6bfe.svg" />
|
|
20
|
-
<img alt="テスト
|
|
20
|
+
<img alt="テスト 29 スイート" src="https://img.shields.io/badge/tests-29%20suites-brightgreen.svg" />
|
|
21
21
|
<img alt="API キー不要" src="https://img.shields.io/badge/API%20key-not%20required-6b7280.svg" />
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
CAIT は DSH Web UI と DSH デスクトップに CAT ワークベンチを追加します。左サイドバーの
|
|
25
|
-
エントリから開き、ワークベンチと
|
|
25
|
+
エントリから開き、ワークベンチと 15 のエージェントツールが 1 つのストアを共有するため、
|
|
26
26
|
ソースファイルのインポートから訳文のエクスポートまでを一通りこなせます。
|
|
27
27
|
|
|
28
28
|
> **DSH `0.2.2-rc.1` で動作確認済み。** CAIT は DSH 自身のモデルルートと認証情報を
|
|
@@ -34,11 +34,11 @@ CAIT は DSH Web UI と DSH デスクトップに CAT ワークベンチを追
|
|
|
34
34
|
| | |
|
|
35
35
|
|---|---|
|
|
36
36
|
| **DSH ネイティブ** | 本物のサイドバーパネル、メインワークベンチ、DSH のテーマトークン、そして人とエージェントが同じストアを共有。iframe でも別アプリでもありません。 |
|
|
37
|
-
| **説明できる翻訳メモリ** | 複数の TM
|
|
37
|
+
| **説明できる翻訳メモリ** | 複数の TM ライブラリ、マウント済みライブラリのみの検索、101% のコンテキスト(ICE)一致、完全一致 / ほぼ完全一致 / 高・中・低ファジーの段階、確定時の自動書き戻し。 |
|
|
38
38
|
| **用語を意識した編集** | 複数の用語集、ソース言語による絞り込み、インライン強調、用語のクリック挿入、用語ごとの大文字小文字の区別。 |
|
|
39
39
|
| **文書ワークフロー** | タブ、閉じる / 開き直し、最近の文書の整理、同一内容の再インポート再利用、文書ごとの進捗。 |
|
|
40
40
|
| **実用的な形式対応** | TXT、Markdown、DOCX、EPUB、TMX、CSV、SRT/VTT、PO、XLIFF 1.2/2.0/SDLXLIFF、HTML、JSON、XLSX、PPTX、RTF。 |
|
|
41
|
-
| **エージェント対応** |
|
|
41
|
+
| **エージェント対応** | 10 のツールが開いている文書とストアを共有するので、エージェントと並行して翻訳できます。 |
|
|
42
42
|
|
|
43
43
|
## クイックスタート
|
|
44
44
|
|
|
@@ -59,6 +59,10 @@ Host のリビジョンをポーリングするため、エージェントによ
|
|
|
59
59
|
### 翻訳メモリ
|
|
60
60
|
|
|
61
61
|
- id、名前、マウント状態、既定の書き込みライブラリを持つ複数の TM ライブラリ。
|
|
62
|
+
- **コンテキスト一致(ICE)は 101%。** 確定のたびに前後の原文 2 文を記録し、同じ
|
|
63
|
+
隣接文を持つセグメントは 101%・`context` 段階になります(テキストが同じでも
|
|
64
|
+
隣接文が違えば 100% のまま)。1 つのキーにつき最大 8 件のコンテキスト変種を保持し、
|
|
65
|
+
コンテキストなしの汎用エントリは常に残します。
|
|
62
66
|
- 完全一致、ほぼ完全一致、そして 3 つのファジー帯:
|
|
63
67
|
- `near_exact` は数字・句読点・空白を無視したキーで比較し、スコアのしきい値には
|
|
64
68
|
依存しません。
|
|
@@ -74,6 +78,8 @@ Host のリビジョンをポーリングするため、エージェントによ
|
|
|
74
78
|
件数です。全データが必要な場合は `cat_lookup_tm` かライブラリモーダルを使ってください。
|
|
75
79
|
- TMX 1.4 の `<tu>/<tuv>/<seg>` インポート / エクスポート。TMX のインライン
|
|
76
80
|
プレースホルダは、明示的な警告とともにプレーンテキストへ平坦化されます。
|
|
81
|
+
コンテキストは `<prop type="x-context">` として往復するため、CAIT が出力した
|
|
82
|
+
ファイルを再インポートしても 101% 一致が保たれます。
|
|
77
83
|
|
|
78
84
|
### 用語集
|
|
79
85
|
|
|
@@ -82,11 +88,63 @@ Host のリビジョンをポーリングするため、エージェントによ
|
|
|
82
88
|
- CSV/TSV インポート、用語ごとのメモ、ソース言語による絞り込み、そしてワークベンチと
|
|
83
89
|
`cat_lookup_glossary` の両方が尊重する `caseSensitive` フラグ。
|
|
84
90
|
- 言語コードは正規化されます(`EN` → `en`、`ZH_cn` → `zh-CN`)。
|
|
91
|
+
- 用語はマウントされていないライブラリでも編集・削除できます。マウント状態は
|
|
92
|
+
ワークベンチが検索・書き込みする対象を決めるだけです。
|
|
93
|
+
- **用語の抽出**: 用語集ツールバーの「文書から用語を抽出」は、出現回数、
|
|
94
|
+
メモリにある既存の訳語、「登録済み」の印が付いた候補を一覧します。統計が候補を
|
|
95
|
+
見つけて並べ(ラテン語の n-gram、CJK の繰り返し部分文字列は左右の隣接エントロピーで
|
|
96
|
+
絞り込み)、モデルは短い候補リストを判定するだけです。
|
|
97
|
+
|
|
98
|
+
### ライブラリワークスペース
|
|
99
|
+
|
|
100
|
+
トップバーの「文書 / ライブラリ / 整列」で翻訳者向けビューとライブラリ管理を切り替えます。
|
|
101
|
+
ライブラリ側は文書を開いている必要がありません。
|
|
102
|
+
|
|
103
|
+
- TM と用語集がそれぞれ 1 つの表になり、ページ送り(20/50/100/200、記憶されます)、
|
|
104
|
+
言語フィルタ、任意のライブラリ組み合わせに絞った検索ができます。
|
|
105
|
+
- 右側のパネルで選択中の項目をその場で編集し、項目を追加し、未保存の変更を表示します。
|
|
106
|
+
- TM は **TMX**、用語集は **TBX**・**CSV**・**JSON** に書き出せます。インポートと
|
|
107
|
+
クリアも同じツールバーにあります。
|
|
108
|
+
- 右サイドパネルのライブラリボタンは、その検索語を引き継いでワークスペースを開きます。
|
|
109
|
+
パネルでの調べものが一覧でそのまま続けられます。
|
|
110
|
+
|
|
111
|
+
### 整列
|
|
112
|
+
|
|
113
|
+
トップバーの「文書 / ライブラリ / 整列」の 3 つ目のビューは、完成した 2 つの
|
|
114
|
+
ファイルから翻訳メモリを作ります。原文とその訳文を別々のファイルとして、
|
|
115
|
+
対応形式なら何でも、言語の組み合わせも自由に使えます。
|
|
116
|
+
|
|
117
|
+
- 言語をまたぐ採点: 共通のアンカー(数字、`{0}` プレースホルダー、URL、大文字で
|
|
118
|
+
始まる固有名)、言語ごとに正規化した長さの比、段落構造。2 言語を比べられない
|
|
119
|
+
字面の類似度は意図的に使いません。
|
|
120
|
+
- ブロック化した動的計画法が 1:1、1:0、0:1、2:1、1:2 を対応づけます。各行は
|
|
121
|
+
高信頼 / 要確認 / 疑わしいの 3 段階で、既定で選ばれるのは高信頼だけです。
|
|
122
|
+
- 書き込み前に、各行を次の行と結合、改行で分割、削除できます。書き込み先の
|
|
123
|
+
ライブラリはツールバーで選び、まったく同じ項目は重複させずに飛ばします。
|
|
85
124
|
|
|
86
125
|
### ワークベンチ
|
|
87
126
|
|
|
88
127
|
- 段落 / 文単位のセグメンテーションと、セグメントごとのターゲットエディタ。
|
|
89
|
-
-
|
|
128
|
+
- セグメントは **未翻訳** → **翻訳済み** → **確定済み** の 3 状態を持ち、訳文の由来
|
|
129
|
+
(`tm`、`mt`、`agent`、`manual`)も記録します。レールは状態で絞り込め、検索は
|
|
130
|
+
原文・訳文・サジェストを対象にします。
|
|
131
|
+
- **セグメントのページ送り**: レールは絞り込み後のセグメントを 20/50/100/200 の
|
|
132
|
+
ページ単位で表示し、番号を直接入力して移動できます。移動先が絞り込みで隠れて
|
|
133
|
+
いるときは、先に絞り込みを解除します。
|
|
134
|
+
- **事前翻訳**: TM の完全一致と機械翻訳で文書全体を小さなブロック単位で埋め、
|
|
135
|
+
`完了/総数` を表示し、ブロックの間で停止できます。確定済み・訳文のあるセグメントは
|
|
136
|
+
上書きしません。
|
|
137
|
+
- **縦積みレビュー**: 原文・機械/agent のベースライン・編集可能な訳文を上から下へ
|
|
138
|
+
並べ、各ブロックがパネルの幅いっぱいを使います。**すべて確定** は確認ダイアログ
|
|
139
|
+
1 回でレビュー待ちをまとめて受け入れます。
|
|
140
|
+
- ドラフト保存、確定して次へ、前後移動、進捗表示。選択中のセグメントとドラフトは
|
|
141
|
+
デバウンスして保存されるため、再起動後も続きから再開できます。
|
|
142
|
+
- **繰り返しセグメントの自動同期**: 1 文を確定すると、同じ原文を持つ未確定の
|
|
143
|
+
セグメントに同じ訳文が入り(由来は `auto`)、ドラフトの編集も同期します。
|
|
144
|
+
「繰り返しを埋める」で文書全体を一度に処理できます。確定済みには触れません。
|
|
145
|
+
- レールの QA マーカーと書き出し前の集計: プレースホルダー / タグの欠落、数字の
|
|
146
|
+
不一致、用語の未使用、空の訳文、原文のままの訳文、同じ原文に複数の訳文。
|
|
147
|
+
注意のみで、書き出しは妨げず、保存もしません。
|
|
90
148
|
- 文書タブ。タブを閉じても文書は削除されません。
|
|
91
149
|
- **既存の文書を開く** で、閉じた文書を開き直せます。
|
|
92
150
|
- **設定 → インターフェース** の UI 言語切り替え: *DSH の言語に従う*(既定)、
|
|
@@ -96,9 +154,11 @@ Host のリビジョンをポーリングするため、エージェントによ
|
|
|
96
154
|
元に戻せず、TM・用語集・その他の文書には触れません。
|
|
97
155
|
- 同じ形式で同一内容を再インポートすると、重複を作らず既存の文書を再利用します。
|
|
98
156
|
フィンガープリントは言語、ソース、形式、交換メタデータを対象にします。
|
|
99
|
-
- レスポンシブな密度: ワークベンチは自身の DSH
|
|
100
|
-
1×–1.
|
|
101
|
-
|
|
157
|
+
- レスポンシブな密度: ワークベンチは自身の DSH パネルを測り、減衰させた `--cait-u`
|
|
158
|
+
倍率を 1×–1.45× で適用します。1600×900 のパネルは約 1.17×、最大化した 4K でも
|
|
159
|
+
1.45× で止まり、ホスト UI に近い大きさを保ちます。
|
|
160
|
+
- ワークベンチは DSH のライト / ダークテーマに追従し、ネイティブコントロール
|
|
161
|
+
(`color-scheme`)も含めてセレクト、チェックボックス、スクロールバーが揃います。
|
|
102
162
|
|
|
103
163
|
### 前処理
|
|
104
164
|
|
|
@@ -134,7 +194,7 @@ CAIT はエンドポイントもキーも持ちません。セレクタは DSH
|
|
|
134
194
|
| CSV | ✅ | ✅ | カンマ、セミコロン、タブ、パイプの区切りを自動判定。ヘッダー名または 1 始まりの番号でソース / ターゲット列を指定可能。既存の対訳エクスポートにも対応 |
|
|
135
195
|
| DOCX | ✅ | ✅ | 本文段落。表ブロックはインポート対象外。エクスポートは元のパッケージにパッチを当て、スタイル、番号付け、画像、ヘッダー、表、レイアウトを保つ |
|
|
136
196
|
| EPUB | ✅ | ✅ | EPUB 3 の spine 順に XHTML テキストブロックを読み、インライン要素をトークンとして保持し、保持したソースパッケージに書き戻す。DRM、固定レイアウト、スクリプト化された EPUB は非対応 |
|
|
137
|
-
| TMX 1.4 | ✅ | ✅ | 一般的な `<tu>/<tuv>/<seg>`
|
|
197
|
+
| TMX 1.4 | ✅ | ✅ | 一般的な `<tu>/<tuv>/<seg>` サブセット。インライン要素は警告付きで平坦化し、コンテキストは `<prop type="x-context">` で往復 |
|
|
138
198
|
| SRT / WebVTT | ✅ | ✅ | 1 キュー = 1 セグメント。タイミング / 設定 / 識別子を保持し、セマンティックタグも維持。不正な範囲は拒否 |
|
|
139
199
|
| PO | ✅ | ✅ | コンテキスト、複数形、翻訳者コメント、廃止された `#~` エントリ |
|
|
140
200
|
| XLIFF 1.2 | ✅ | ✅ | インラインタグは `{n}` トークンになり、欠落していると確定できない |
|
|
@@ -187,7 +247,7 @@ DSH デスクトップ(または `plugin_manager` ツールがある任意の
|
|
|
187
247
|
plugin_manager install_bundle target: dsh-cait
|
|
188
248
|
```
|
|
189
249
|
|
|
190
|
-
バージョンを固定するときは `dsh-cait@1.
|
|
250
|
+
バージョンを固定するときは `dsh-cait@1.1.3`、最新版は `dsh-cait@latest` を指定します。
|
|
191
251
|
マネージャが registry のパッケージを解決し、bundle patch を適用してプラグインを有効化します。
|
|
192
252
|
|
|
193
253
|
CLI 管理のプロファイル:
|
|
@@ -266,8 +326,9 @@ dsh web --patch C:\absolute\path\to\dsh-CAIT\_dev\cait.patch.yml
|
|
|
266
326
|
|
|
267
327
|
スナップショットが破損している、または未知のバージョンの場合、CAIT は警告をログに残し、
|
|
268
328
|
`store.json.corrupt-<timestamp>` に退避してから空の状態で起動します(有効化は失敗しません)。
|
|
269
|
-
バージョン 1 のスナップショットは、既定の TM と用語集ライブラリを付けてバージョン
|
|
270
|
-
|
|
329
|
+
バージョン 1・2 のスナップショットは、既定の TM と用語集ライブラリを付けてバージョン 3 へ
|
|
330
|
+
移行されます。バージョン 2 で「訳文はあるが未確定」のドラフトは `translated` になり、
|
|
331
|
+
由来は `manual` として記録されます。
|
|
271
332
|
|
|
272
333
|
## エージェントツール
|
|
273
334
|
|
|
@@ -280,6 +341,19 @@ dsh web --patch C:\absolute\path\to\dsh-CAIT\_dev\cait.patch.yml
|
|
|
280
341
|
| `cat_list_documents` | 文書と進捗の一覧 |
|
|
281
342
|
| `cat_switch_document` | アクティブな文書を切り替え |
|
|
282
343
|
| `cat_suggest_mt` | 選択した DSH ルート経由の MT、または明示的なオフラインフォールバック |
|
|
344
|
+
| `cat_pre_translate` | TM + MT で 1 ブロックを埋め、確定済み・訳文ありは飛ばし `next` を返す |
|
|
345
|
+
| `cat_get_segments` | 状態・由来・サジェスト付きで、範囲を限ったセグメント一覧 |
|
|
346
|
+
| `cat_confirm_segments` | インデックス一覧、範囲、またはレビュー待ち全体を確定 |
|
|
347
|
+
| `cat_propose_translation` | 確定済みの訳文に触れず、サジェストと理由だけを残す |
|
|
348
|
+
| `cat_align` | 2 つのテキストを整列し、高信頼 / 要確認 / 疑わしい組を報告 |
|
|
349
|
+
| `cat_consistency_report` | 訳文が揺れている同一原文をグループ化して一覧 |
|
|
350
|
+
| `cat_term_candidates` | 用語候補の短いリスト: 頻度、例文、メモリにある既存の訳語 |
|
|
351
|
+
| `cat_add_terms` | 選んだ用語を用語集へまとめて登録 |
|
|
352
|
+
|
|
353
|
+
そのためエージェントは UI を操作せずに文書全体を下書きできます: `cat_pre_translate` を
|
|
354
|
+
`from: next` で `next` が `null` になるまで繰り返し、`cat_get_segments` で確認し、
|
|
355
|
+
`cat_confirm_segments` でまとめて受け入れます。用語は `cat_term_candidates` で候補を読み、
|
|
356
|
+
リストを判断して `cat_add_terms` で書き込みます。
|
|
283
357
|
|
|
284
358
|
ワークベンチとツールは 1 つの `CatStore` を共有するため、エージェントはユーザーが開いて
|
|
285
359
|
いるのと同じ文書を翻訳できます。
|
|
@@ -290,7 +364,7 @@ dsh web --patch C:\absolute\path\to\dsh-CAIT\_dev\cait.patch.yml
|
|
|
290
364
|
flowchart LR
|
|
291
365
|
UI["DSH Web UI<br/>(sidebar + workbench)"] --> Client["client.js<br/>generated Web bundle"]
|
|
292
366
|
Client --> API["/cait/api/rpc<br/>same-origin JSON"]
|
|
293
|
-
Tools["
|
|
367
|
+
Tools["15 agent tools"] --> Store["CatStore"]
|
|
294
368
|
API --> Store
|
|
295
369
|
Store --> Snapshot[("store.json<br/>+ sources/")]
|
|
296
370
|
```
|
|
@@ -377,7 +451,7 @@ node _dev/test-mt.mjs
|
|
|
377
451
|
|
|
378
452
|
インポート / エクスポートのフィクスチャは `_dev/sample.docx`、`_dev/sample-table.docx`、
|
|
379
453
|
`_dev/sample-format.docx` です。対応する `python _dev/make-*.py` スクリプトで再生成
|
|
380
|
-
できます。
|
|
454
|
+
できます。29 スイートすべてが通るはずです。
|
|
381
455
|
|
|
382
456
|
### リリース
|
|
383
457
|
|
|
@@ -432,13 +506,16 @@ npm publish
|
|
|
432
506
|
- HTML/RTF のエクスポートは元のスタイルをラウンドトリップしません。JSON は文字列値だけを
|
|
433
507
|
翻訳します。
|
|
434
508
|
- TM のマッチングは意味ではなく字句に基づきます。ステミング、同義語、埋め込みはありません。
|
|
435
|
-
-
|
|
509
|
+
- コンテキストごとに 1 つの原文へ 1 つの訳文を保存します。同じ文でも隣接文の組み合わせが
|
|
510
|
+
違えば別の変種として保持し(キーごとに最大 8 件)、隣接文が一致しない場合は
|
|
511
|
+
コンテキストなしの汎用エントリに戻ります。
|
|
512
|
+
- コンテキストは前後の原文 2 文だけで、文書・顧客・プロジェクトのメタデータは含みません。
|
|
513
|
+
- TBX と JSON の用語集書き出しは一方向です。読み戻せるのは TMX と CSV だけです。
|
|
436
514
|
- ワークベンチ UI は中国語・英語・日本語の 3 言語で、設定から切り替えられます。
|
|
437
515
|
README も英語・簡体字中国語・日本語の 3 版があり、英語版が正本です。
|
|
438
516
|
|
|
439
517
|
次に予定しているのは、マルチモーダルな DSH ルート経由の画像 / ビジョン入力、
|
|
440
|
-
|
|
441
|
-
`<alt-trans>` / ノート対応です。
|
|
518
|
+
スタイルを保つ XLSX 出力、XLIFF の `<alt-trans>` / ノート対応です。
|
|
442
519
|
|
|
443
520
|
## 変更履歴とバージョン
|
|
444
521
|
|
|
@@ -446,7 +523,12 @@ npm publish
|
|
|
446
523
|
`v1.0.1` が日本語 UI とアプリ内の UI 言語切り替えを追加し、`v1.0.2` で
|
|
447
524
|
*DSH の言語に従う* が DSH のロケールに従うようになり、`v1.0.3` で npm に公開、
|
|
448
525
|
`v1.0.4` から以降のリリースは provenance 付きの公開ワークフローで行われ、
|
|
449
|
-
`v1.0.5` で EPUB、インポート前処理、PDF
|
|
526
|
+
`v1.0.5` で EPUB、インポート前処理、PDF ポリシーを、`v1.1.0` でエージェントによる
|
|
527
|
+
事前翻訳、セグメントの 3 状態、縦積みレビュー、軽量 QA を、`v1.1.1` で
|
|
528
|
+
TMX/TBX/CSV/JSON 書き出し付きのライブラリ画面、セグメントのページ送り、
|
|
529
|
+
サイドパネルからライブラリ画面への移動を、`v1.1.2` で 101%(ICE)一致を含む
|
|
530
|
+
コンテキスト対応メモリを、`v1.1.3` で 2 ファイルの整列、繰り返しセグメントの
|
|
531
|
+
自動同期、用語の抽出、エージェントがサジェストを書くためのプリミティブを追加しました。
|
|
450
532
|
プロジェクトは `0.1.0` として開発され、GitHub リリースに向けて採番し直されました。
|
|
451
533
|
|
|
452
534
|
> **ライセンス:** Apache License 2.0 — [LICENSE](LICENSE) を参照してください。
|