dsh-cait 1.0.4 → 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 +202 -0
- package/README.ja.md +147 -25
- package/README.md +176 -27
- package/README.zh-CN.md +137 -26
- package/client/components.js +2047 -340
- package/client/entry.js +13 -0
- package/client/helpers.js +110 -7
- package/client/locales.js +435 -6
- package/client/rpc.js +1 -1
- package/client/styles.js +137 -3
- package/client.js +2742 -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/docx.js +12 -9
- package/lib/epub.js +355 -0
- package/lib/formats.js +88 -33
- package/lib/glossary.js +4 -4
- package/lib/html.js +271 -0
- package/lib/import-export.js +208 -95
- 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 +92 -7
- package/lib/pre-translate.js +263 -0
- package/lib/preprocess.js +65 -0
- package/lib/propagate.js +133 -0
- package/lib/qa.js +167 -0
- package/lib/store-utils.js +48 -6
- package/lib/store.js +143 -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 +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,207 @@ 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
|
+
|
|
166
|
+
## [1.0.5] - 2026-11-06
|
|
167
|
+
|
|
168
|
+
EPUB support, an import preprocessing stage, and format hardening.
|
|
169
|
+
|
|
170
|
+
### Added
|
|
171
|
+
|
|
172
|
+
- EPUB 3 import and export. Import walks the OPF spine, turns XHTML text blocks
|
|
173
|
+
into segments, and keeps inline tags as placeholder tokens; export patches the
|
|
174
|
+
translations back into the retained source package, preserving chapters,
|
|
175
|
+
styles, images, and navigation. Documents created from plain text export as a
|
|
176
|
+
fresh EPUB 3 package. DRM, fixed-layout, and scripted EPUBs are out of scope.
|
|
177
|
+
- Import preprocessing: whitespace normalization, invisible/control character
|
|
178
|
+
stripping, and blank-line collapsing before segmentation. Each step has a
|
|
179
|
+
settings toggle, applies to file imports and `createDocument`, and is stored
|
|
180
|
+
with the other settings.
|
|
181
|
+
- A shared HTML/XHTML run scanner (`lib/html.js`) used by both HTML and EPUB, so
|
|
182
|
+
headings and inline markup survive import and are patched back on export.
|
|
183
|
+
- CSV delimiter detection (comma, semicolon, tab, pipe) and richer RTF escapes
|
|
184
|
+
(`\cell`, `\row`, `\page`, `\sect`, symbol characters).
|
|
185
|
+
|
|
186
|
+
### Changed
|
|
187
|
+
|
|
188
|
+
- PDF import is explicitly out of scope. All three READMEs explain why PDF is a
|
|
189
|
+
poor fit for AI-assisted translation and recommend converting it with pandoc,
|
|
190
|
+
Acrobat, or LibreOffice first.
|
|
191
|
+
- The supported-formats table, project layout, roadmap, and “Known limits”
|
|
192
|
+
sections now describe EPUB, preprocessing, and the PDF policy.
|
|
193
|
+
|
|
194
|
+
### Fixed
|
|
195
|
+
|
|
196
|
+
- Settings persistence now stores `uiLang` and the preprocessing flags instead of
|
|
197
|
+
falling back to defaults on reload.
|
|
198
|
+
- The EPUB `mimetype` entry is written uncompressed, as the OCF specification
|
|
199
|
+
requires, and every other entry stays deflated.
|
|
200
|
+
- HTML import no longer flattens headings and inline markup into blank-line
|
|
201
|
+
paragraphs.
|
|
202
|
+
|
|
203
|
+
### Development
|
|
204
|
+
|
|
205
|
+
- New `_dev/test-epub.mjs` and `_dev/test-preprocess.mjs` suites; the full suite
|
|
206
|
+
count is 15.
|
|
207
|
+
|
|
7
208
|
## [1.0.4] - 2026-11-05
|
|
8
209
|
|
|
9
210
|
Provenance publishing.
|
|
@@ -365,3 +566,4 @@ directory (`$DSH_HOME/cait`), and API route (`/cait/api`) keep the CAIT name.
|
|
|
365
566
|
| 2026-11-04 | First-tier exchange formats: CSV mapping, SRT, WebVTT, PO, XLIFF 1.2, metadata persistence, timeline fixes. |
|
|
366
567
|
| 2026-11-04 | Second-tier formats: HTML, JSON, XLSX, PPTX, RTF; binary upload/export; source-preserving PPTX. |
|
|
367
568
|
| 2026-11-04 | Responsive UI density 1×–1.8×; button contrast fix; v1.0.0 release. |
|
|
569
|
+
| 2026-11-06 | EPUB 3 import/export with source-package patching, shared HTML/XHTML scanner, import preprocessing stage, CSV/RTF hardening, PDF out of scope; v1.0.5 release. |
|
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
|
-
| **実用的な形式対応** | TXT、Markdown、DOCX、TMX、CSV、SRT/VTT、PO、XLIFF 1.2/2.0/SDLXLIFF、HTML、JSON、XLSX、PPTX、RTF。 |
|
|
41
|
-
| **エージェント対応** |
|
|
40
|
+
| **実用的な形式対応** | TXT、Markdown、DOCX、EPUB、TMX、CSV、SRT/VTT、PO、XLIFF 1.2/2.0/SDLXLIFF、HTML、JSON、XLSX、PPTX、RTF。 |
|
|
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,22 @@ 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`)も含めてセレクト、チェックボックス、スクロールバーが揃います。
|
|
162
|
+
|
|
163
|
+
### 前処理
|
|
164
|
+
|
|
165
|
+
インポートした原文は、分割の前に前処理ステージを通ります:
|
|
166
|
+
|
|
167
|
+
- 連続する空白とタブを畳み、行頭のインデントを除き、連続する空行をまとめます。
|
|
168
|
+
- ゼロ幅文字と余分な制御文字を除去します。
|
|
169
|
+
- プレースホルダートークン(`{1}`、`{2}`…)、句読点、大文字小文字、段落順は
|
|
170
|
+
変更しません。XLIFF/HTML/EPUB のインラインマークアップはそのまま往復できます。
|
|
171
|
+
- 3 つの手順は **設定 → 前処理** で個別に切り替えられ、他の設定と一緒に保存されます。
|
|
172
|
+
新しいインポートと `createDocument` 呼び出しに適用され、既存の文書は書き換えません。
|
|
102
173
|
|
|
103
174
|
### MT 支援
|
|
104
175
|
|
|
@@ -120,15 +191,16 @@ CAIT はエンドポイントもキーも持ちません。セレクタは DSH
|
|
|
120
191
|
| 形式 | インポート | エクスポート | 備考 |
|
|
121
192
|
| --- | :---: | :---: | --- |
|
|
122
193
|
| TXT / Markdown | ✅ | ✅ | 段落と文のセグメンテーション |
|
|
123
|
-
| CSV | ✅ | ✅ |
|
|
194
|
+
| CSV | ✅ | ✅ | カンマ、セミコロン、タブ、パイプの区切りを自動判定。ヘッダー名または 1 始まりの番号でソース / ターゲット列を指定可能。既存の対訳エクスポートにも対応 |
|
|
124
195
|
| DOCX | ✅ | ✅ | 本文段落。表ブロックはインポート対象外。エクスポートは元のパッケージにパッチを当て、スタイル、番号付け、画像、ヘッダー、表、レイアウトを保つ |
|
|
125
|
-
|
|
|
196
|
+
| EPUB | ✅ | ✅ | EPUB 3 の spine 順に XHTML テキストブロックを読み、インライン要素をトークンとして保持し、保持したソースパッケージに書き戻す。DRM、固定レイアウト、スクリプト化された EPUB は非対応 |
|
|
197
|
+
| TMX 1.4 | ✅ | ✅ | 一般的な `<tu>/<tuv>/<seg>` サブセット。インライン要素は警告付きで平坦化し、コンテキストは `<prop type="x-context">` で往復 |
|
|
126
198
|
| SRT / WebVTT | ✅ | ✅ | 1 キュー = 1 セグメント。タイミング / 設定 / 識別子を保持し、セマンティックタグも維持。不正な範囲は拒否 |
|
|
127
199
|
| PO | ✅ | ✅ | コンテキスト、複数形、翻訳者コメント、廃止された `#~` エントリ |
|
|
128
200
|
| XLIFF 1.2 | ✅ | ✅ | インラインタグは `{n}` トークンになり、欠落していると確定できない |
|
|
129
201
|
| XLIFF 2.0 | ✅ | ✅ | `<unit><segment><source>/<target>` の基本サブセット |
|
|
130
202
|
| SDLXLIFF | ✅ | ✅ | XLIFF 1.2 の基本パス。SDL 固有の拡張はラウンドトリップしない |
|
|
131
|
-
| HTML | ✅ | ✅ |
|
|
203
|
+
| HTML | ✅ | ✅ | テキストブロックとインラインタグを保持。文書全体の CSS / レイアウトは再構築しない |
|
|
132
204
|
| JSON | ✅ | ✅ | 文字列パスのサブセット。オブジェクト / 配列構造はテンプレートで保持。キーと数値は翻訳しない |
|
|
133
205
|
| XLSX | ✅ | ✅ | 最初のワークシート。`Source`/`Target` ヘッダーまたは A/B 列。エクスポートは 2 列の新しいワークブック |
|
|
134
206
|
| PPTX | ✅ | ✅* | ソース保持エクスポート。インポートした `.pptx` パッケージが必要。本文テキストのみで、ノート / グラフ / SmartArt はインポートしない |
|
|
@@ -139,7 +211,26 @@ CAIT はエンドポイントもキーも持ちません。セレクタは DSH
|
|
|
139
211
|
|
|
140
212
|
交換メタデータ(字幕のタイミング、PO のコンテキスト / 複数形 / コメント、XLIFF の id と
|
|
141
213
|
インライントークンマップ、JSON のパス / テンプレート、XLSX の行、PPTX のスライド /
|
|
142
|
-
|
|
214
|
+
段落位置、EPUB の spine href とブロック番号)は文書とセグメントに保持され、
|
|
215
|
+
スナップショットに永続化されます。
|
|
216
|
+
|
|
217
|
+
### PDF はサポートされません
|
|
218
|
+
|
|
219
|
+
CAIT は PDF をインポートせず、今後のリリースでも PDF 対応を追加しません。PDF は
|
|
220
|
+
固定レイアウトの印刷形式で、論理的な段落、読み順、インラインマークアップを持ちません。
|
|
221
|
+
抽出したテキストは描画命令の間に断片化し、見出し、表、インライン強調が失われるため、
|
|
222
|
+
翻訳メモリや MT にとって質の低い入力になります。つまり PDF は AI 関連の作業に
|
|
223
|
+
極めて不向きです。
|
|
224
|
+
|
|
225
|
+
PDF の内容を翻訳する場合は、先にサポート形式へ変換してください。例えば:
|
|
226
|
+
|
|
227
|
+
```sh
|
|
228
|
+
pandoc input.pdf -t docx -o output.docx # または -t html、-t markdown
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Adobe Acrobat の **Word/HTML へエクスポート**、LibreOffice、その他 DOCX、HTML、
|
|
232
|
+
EPUB、プレーンテキストを生成できるツールでも構いません。スキャン PDF は変換前に
|
|
233
|
+
OCR が必要です。CAIT に画像 OCR ステージはありません。
|
|
143
234
|
|
|
144
235
|
## インストール
|
|
145
236
|
|
|
@@ -156,7 +247,7 @@ DSH デスクトップ(または `plugin_manager` ツールがある任意の
|
|
|
156
247
|
plugin_manager install_bundle target: dsh-cait
|
|
157
248
|
```
|
|
158
249
|
|
|
159
|
-
バージョンを固定するときは `dsh-cait@1.
|
|
250
|
+
バージョンを固定するときは `dsh-cait@1.1.3`、最新版は `dsh-cait@latest` を指定します。
|
|
160
251
|
マネージャが registry のパッケージを解決し、bundle patch を適用してプラグインを有効化します。
|
|
161
252
|
|
|
162
253
|
CLI 管理のプロファイル:
|
|
@@ -222,7 +313,7 @@ dsh web --patch C:\absolute\path\to\dsh-CAIT\_dev\cait.patch.yml
|
|
|
222
313
|
```
|
|
223
314
|
|
|
224
315
|
スナップショットには文書、開いているタブ、TM、用語集、ライブラリ、マウント、そして
|
|
225
|
-
秘密でない設定が保存されます。インポートした DOCX/PPTX のソースパッケージは `sources/`
|
|
316
|
+
秘密でない設定が保存されます。インポートした DOCX/PPTX/EPUB のソースパッケージは `sources/`
|
|
226
317
|
に置かれます。
|
|
227
318
|
|
|
228
319
|
アプリ内設定(**設定**)は上記の YAML ではなくスナップショットに保存されます: ソース /
|
|
@@ -235,8 +326,9 @@ dsh web --patch C:\absolute\path\to\dsh-CAIT\_dev\cait.patch.yml
|
|
|
235
326
|
|
|
236
327
|
スナップショットが破損している、または未知のバージョンの場合、CAIT は警告をログに残し、
|
|
237
328
|
`store.json.corrupt-<timestamp>` に退避してから空の状態で起動します(有効化は失敗しません)。
|
|
238
|
-
バージョン 1 のスナップショットは、既定の TM と用語集ライブラリを付けてバージョン
|
|
239
|
-
|
|
329
|
+
バージョン 1・2 のスナップショットは、既定の TM と用語集ライブラリを付けてバージョン 3 へ
|
|
330
|
+
移行されます。バージョン 2 で「訳文はあるが未確定」のドラフトは `translated` になり、
|
|
331
|
+
由来は `manual` として記録されます。
|
|
240
332
|
|
|
241
333
|
## エージェントツール
|
|
242
334
|
|
|
@@ -249,6 +341,19 @@ dsh web --patch C:\absolute\path\to\dsh-CAIT\_dev\cait.patch.yml
|
|
|
249
341
|
| `cat_list_documents` | 文書と進捗の一覧 |
|
|
250
342
|
| `cat_switch_document` | アクティブな文書を切り替え |
|
|
251
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` で書き込みます。
|
|
252
357
|
|
|
253
358
|
ワークベンチとツールは 1 つの `CatStore` を共有するため、エージェントはユーザーが開いて
|
|
254
359
|
いるのと同じ文書を翻訳できます。
|
|
@@ -259,7 +364,7 @@ dsh web --patch C:\absolute\path\to\dsh-CAIT\_dev\cait.patch.yml
|
|
|
259
364
|
flowchart LR
|
|
260
365
|
UI["DSH Web UI<br/>(sidebar + workbench)"] --> Client["client.js<br/>generated Web bundle"]
|
|
261
366
|
Client --> API["/cait/api/rpc<br/>same-origin JSON"]
|
|
262
|
-
Tools["
|
|
367
|
+
Tools["15 agent tools"] --> Store["CatStore"]
|
|
263
368
|
API --> Store
|
|
264
369
|
Store --> Snapshot[("store.json<br/>+ sources/")]
|
|
265
370
|
```
|
|
@@ -300,6 +405,9 @@ cait/
|
|
|
300
405
|
│ ├─ persistence.js
|
|
301
406
|
│ ├─ import-export.js
|
|
302
407
|
│ ├─ formats.js # CSV/SRT/VTT/PO/XLIFF/HTML/JSON/RTF
|
|
408
|
+
│ ├─ html.js # HTML/XHTML テキストラン走査と書き戻し
|
|
409
|
+
│ ├─ epub.js # EPUB パッケージ読み込み / spine インポート / パッチ書き出し
|
|
410
|
+
│ ├─ preprocess.js # インポート時の原文前処理ステージ
|
|
303
411
|
│ ├─ xlsx.js
|
|
304
412
|
│ ├─ pptx.js
|
|
305
413
|
│ ├─ segmenter.js
|
|
@@ -327,6 +435,8 @@ node --check client.js
|
|
|
327
435
|
node _dev/test-core.mjs
|
|
328
436
|
node _dev/test-imports.mjs
|
|
329
437
|
node _dev/test-formats.mjs
|
|
438
|
+
node _dev/test-epub.mjs
|
|
439
|
+
node _dev/test-preprocess.mjs
|
|
330
440
|
node _dev/test-second-tier.mjs
|
|
331
441
|
node _dev/test-docx-export.mjs
|
|
332
442
|
node _dev/test-api.mjs
|
|
@@ -341,7 +451,7 @@ node _dev/test-mt.mjs
|
|
|
341
451
|
|
|
342
452
|
インポート / エクスポートのフィクスチャは `_dev/sample.docx`、`_dev/sample-table.docx`、
|
|
343
453
|
`_dev/sample-format.docx` です。対応する `python _dev/make-*.py` スクリプトで再生成
|
|
344
|
-
できます。
|
|
454
|
+
できます。29 スイートすべてが通るはずです。
|
|
345
455
|
|
|
346
456
|
### リリース
|
|
347
457
|
|
|
@@ -383,7 +493,10 @@ npm publish
|
|
|
383
493
|
|
|
384
494
|
## 既知の制限とロードマップ
|
|
385
495
|
|
|
386
|
-
- PDF
|
|
496
|
+
- PDF のインポートは非対応で、今後も対象外です([PDF はサポートされません](#pdf-はサポートされません))。
|
|
497
|
+
画像 OCR も未対応です。
|
|
498
|
+
- EPUB インポートは spine 内の本文 XHTML テキストブロックのみを対象とします。
|
|
499
|
+
DRM、固定レイアウト、スクリプト化、MathML を多用する書籍は非対応です。
|
|
387
500
|
- DOCX インポートは表、ヘッダー、脚注、フィールド、代替テキスト、変更履歴の削除を
|
|
388
501
|
スキップします。DOCX エクスポートではそれらの領域はソース言語のまま残ります。
|
|
389
502
|
- 複数の run が混在する DOCX/PPTX の段落は、先頭 run の書式を継承します。
|
|
@@ -393,20 +506,29 @@ npm publish
|
|
|
393
506
|
- HTML/RTF のエクスポートは元のスタイルをラウンドトリップしません。JSON は文字列値だけを
|
|
394
507
|
翻訳します。
|
|
395
508
|
- TM のマッチングは意味ではなく字句に基づきます。ステミング、同義語、埋め込みはありません。
|
|
396
|
-
-
|
|
509
|
+
- コンテキストごとに 1 つの原文へ 1 つの訳文を保存します。同じ文でも隣接文の組み合わせが
|
|
510
|
+
違えば別の変種として保持し(キーごとに最大 8 件)、隣接文が一致しない場合は
|
|
511
|
+
コンテキストなしの汎用エントリに戻ります。
|
|
512
|
+
- コンテキストは前後の原文 2 文だけで、文書・顧客・プロジェクトのメタデータは含みません。
|
|
513
|
+
- TBX と JSON の用語集書き出しは一方向です。読み戻せるのは TMX と CSV だけです。
|
|
397
514
|
- ワークベンチ UI は中国語・英語・日本語の 3 言語で、設定から切り替えられます。
|
|
398
515
|
README も英語・簡体字中国語・日本語の 3 版があり、英語版が正本です。
|
|
399
516
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
`<alt-trans>` / ノート対応です。
|
|
517
|
+
次に予定しているのは、マルチモーダルな DSH ルート経由の画像 / ビジョン入力、
|
|
518
|
+
スタイルを保つ XLSX 出力、XLIFF の `<alt-trans>` / ノート対応です。
|
|
403
519
|
|
|
404
520
|
## 変更履歴とバージョン
|
|
405
521
|
|
|
406
522
|
[CHANGELOG.md](CHANGELOG.md) を参照してください。`v1.0.0` が最初の公開リリースで、
|
|
407
523
|
`v1.0.1` が日本語 UI とアプリ内の UI 言語切り替えを追加し、`v1.0.2` で
|
|
408
524
|
*DSH の言語に従う* が DSH のロケールに従うようになり、`v1.0.3` で npm に公開、
|
|
409
|
-
`v1.0.4` から以降のリリースは provenance
|
|
525
|
+
`v1.0.4` から以降のリリースは provenance 付きの公開ワークフローで行われ、
|
|
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
|
+
自動同期、用語の抽出、エージェントがサジェストを書くためのプリミティブを追加しました。
|
|
410
532
|
プロジェクトは `0.1.0` として開発され、GitHub リリースに向けて採番し直されました。
|
|
411
533
|
|
|
412
534
|
> **ライセンス:** Apache License 2.0 — [LICENSE](LICENSE) を参照してください。
|