dsh-cait 1.0.3 → 1.0.5

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/LICENSE CHANGED
@@ -1,201 +1,201 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright 2026 Jovi Lecca
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Jovi Lecca
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.ja.md CHANGED
@@ -15,9 +15,9 @@
15
15
 
16
16
 
17
17
  <p align="center">
18
- <img alt="バージョン 1.0.3" src="https://img.shields.io/badge/version-1.0.3-blue.svg" />
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="テスト 13 スイート" src="https://img.shields.io/badge/tests-13%20suites-brightgreen.svg" />
20
+ <img alt="テスト 15 スイート" src="https://img.shields.io/badge/tests-15%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
 
@@ -37,7 +37,7 @@ CAIT は DSH Web UI と DSH デスクトップに CAT ワークベンチを追
37
37
  | **説明できる翻訳メモリ** | 複数の TM ライブラリ、マウント済みライブラリのみの検索、完全一致 / ほぼ完全一致 / 高・中・低ファジーの段階、確定時の自動書き戻し。 |
38
38
  | **用語を意識した編集** | 複数の用語集、ソース言語による絞り込み、インライン強調、用語のクリック挿入、用語ごとの大文字小文字の区別。 |
39
39
  | **文書ワークフロー** | タブ、閉じる / 開き直し、最近の文書の整理、同一内容の再インポート再利用、文書ごとの進捗。 |
40
- | **実用的な形式対応** | TXT、Markdown、DOCX、TMX、CSV、SRT/VTT、PO、XLIFF 1.2/2.0/SDLXLIFF、HTML、JSON、XLSX、PPTX、RTF。 |
40
+ | **実用的な形式対応** | TXT、Markdown、DOCX、EPUB、TMX、CSV、SRT/VTT、PO、XLIFF 1.2/2.0/SDLXLIFF、HTML、JSON、XLSX、PPTX、RTF。 |
41
41
  | **エージェント対応** | 7 つのツールが開いている文書とストアを共有するので、エージェントと並行して翻訳できます。 |
42
42
 
43
43
  ## クイックスタート
@@ -100,6 +100,17 @@ Host のリビジョンをポーリングするため、エージェントによ
100
100
  1×–1.8× で適用します。1600×900 のパネルは約 1.32×、2560×1440 は 1.8×。
101
101
  高さの低いウィンドウでは縮小せず 1× のままです。
102
102
 
103
+ ### 前処理
104
+
105
+ インポートした原文は、分割の前に前処理ステージを通ります:
106
+
107
+ - 連続する空白とタブを畳み、行頭のインデントを除き、連続する空行をまとめます。
108
+ - ゼロ幅文字と余分な制御文字を除去します。
109
+ - プレースホルダートークン(`{1}`、`{2}`…)、句読点、大文字小文字、段落順は
110
+ 変更しません。XLIFF/HTML/EPUB のインラインマークアップはそのまま往復できます。
111
+ - 3 つの手順は **設定 → 前処理** で個別に切り替えられ、他の設定と一緒に保存されます。
112
+ 新しいインポートと `createDocument` 呼び出しに適用され、既存の文書は書き換えません。
113
+
103
114
  ### MT 支援
104
115
 
105
116
  CAIT はエンドポイントもキーも持ちません。セレクタは DSH から組み立てます:
@@ -120,15 +131,16 @@ CAIT はエンドポイントもキーも持ちません。セレクタは DSH
120
131
  | 形式 | インポート | エクスポート | 備考 |
121
132
  | --- | :---: | :---: | --- |
122
133
  | TXT / Markdown | ✅ | ✅ | 段落と文のセグメンテーション |
123
- | CSV | ✅ | ✅ | ヘッダー名または 1 始まりの番号でソース / ターゲット列を指定可能。既存の対訳エクスポートにも対応 |
134
+ | CSV | ✅ | ✅ | カンマ、セミコロン、タブ、パイプの区切りを自動判定。ヘッダー名または 1 始まりの番号でソース / ターゲット列を指定可能。既存の対訳エクスポートにも対応 |
124
135
  | DOCX | ✅ | ✅ | 本文段落。表ブロックはインポート対象外。エクスポートは元のパッケージにパッチを当て、スタイル、番号付け、画像、ヘッダー、表、レイアウトを保つ |
136
+ | EPUB | ✅ | ✅ | EPUB 3 の spine 順に XHTML テキストブロックを読み、インライン要素をトークンとして保持し、保持したソースパッケージに書き戻す。DRM、固定レイアウト、スクリプト化された EPUB は非対応 |
125
137
  | TMX 1.4 | ✅ | ✅ | 一般的な `<tu>/<tuv>/<seg>` サブセット。インライン要素は警告付きで平坦化 |
126
138
  | SRT / WebVTT | ✅ | ✅ | 1 キュー = 1 セグメント。タイミング / 設定 / 識別子を保持し、セマンティックタグも維持。不正な範囲は拒否 |
127
139
  | PO | ✅ | ✅ | コンテキスト、複数形、翻訳者コメント、廃止された `#~` エントリ |
128
140
  | XLIFF 1.2 | ✅ | ✅ | インラインタグは `{n}` トークンになり、欠落していると確定できない |
129
141
  | XLIFF 2.0 | ✅ | ✅ | `<unit><segment><source>/<target>` の基本サブセット |
130
142
  | SDLXLIFF | ✅ | ✅ | XLIFF 1.2 の基本パス。SDL 固有の拡張はラウンドトリップしない |
131
- | HTML | ✅ | ✅ | テキストブロックのみ。元のマークアップ / CSS は保持しない |
143
+ | HTML | ✅ | ✅ | テキストブロックとインラインタグを保持。文書全体の CSS / レイアウトは再構築しない |
132
144
  | JSON | ✅ | ✅ | 文字列パスのサブセット。オブジェクト / 配列構造はテンプレートで保持。キーと数値は翻訳しない |
133
145
  | XLSX | ✅ | ✅ | 最初のワークシート。`Source`/`Target` ヘッダーまたは A/B 列。エクスポートは 2 列の新しいワークブック |
134
146
  | PPTX | ✅ | ✅* | ソース保持エクスポート。インポートした `.pptx` パッケージが必要。本文テキストのみで、ノート / グラフ / SmartArt はインポートしない |
@@ -139,7 +151,26 @@ CAIT はエンドポイントもキーも持ちません。セレクタは DSH
139
151
 
140
152
  交換メタデータ(字幕のタイミング、PO のコンテキスト / 複数形 / コメント、XLIFF の id と
141
153
  インライントークンマップ、JSON のパス / テンプレート、XLSX の行、PPTX のスライド /
142
- 段落位置)は文書とセグメントに保持され、スナップショットに永続化されます。
154
+ 段落位置、EPUB の spine href とブロック番号)は文書とセグメントに保持され、
155
+ スナップショットに永続化されます。
156
+
157
+ ### PDF はサポートされません
158
+
159
+ CAIT は PDF をインポートせず、今後のリリースでも PDF 対応を追加しません。PDF は
160
+ 固定レイアウトの印刷形式で、論理的な段落、読み順、インラインマークアップを持ちません。
161
+ 抽出したテキストは描画命令の間に断片化し、見出し、表、インライン強調が失われるため、
162
+ 翻訳メモリや MT にとって質の低い入力になります。つまり PDF は AI 関連の作業に
163
+ 極めて不向きです。
164
+
165
+ PDF の内容を翻訳する場合は、先にサポート形式へ変換してください。例えば:
166
+
167
+ ```sh
168
+ pandoc input.pdf -t docx -o output.docx # または -t html、-t markdown
169
+ ```
170
+
171
+ Adobe Acrobat の **Word/HTML へエクスポート**、LibreOffice、その他 DOCX、HTML、
172
+ EPUB、プレーンテキストを生成できるツールでも構いません。スキャン PDF は変換前に
173
+ OCR が必要です。CAIT に画像 OCR ステージはありません。
143
174
 
144
175
  ## インストール
145
176
 
@@ -156,7 +187,7 @@ DSH デスクトップ(または `plugin_manager` ツールがある任意の
156
187
  plugin_manager install_bundle target: dsh-cait
157
188
  ```
158
189
 
159
- バージョンを固定するときは `dsh-cait@1.0.3`、最新版は `dsh-cait@latest` を指定します。
190
+ バージョンを固定するときは `dsh-cait@1.0.5`、最新版は `dsh-cait@latest` を指定します。
160
191
  マネージャが registry のパッケージを解決し、bundle patch を適用してプラグインを有効化します。
161
192
 
162
193
  CLI 管理のプロファイル:
@@ -222,7 +253,7 @@ dsh web --patch C:\absolute\path\to\dsh-CAIT\_dev\cait.patch.yml
222
253
  ```
223
254
 
224
255
  スナップショットには文書、開いているタブ、TM、用語集、ライブラリ、マウント、そして
225
- 秘密でない設定が保存されます。インポートした DOCX/PPTX のソースパッケージは `sources/`
256
+ 秘密でない設定が保存されます。インポートした DOCX/PPTX/EPUB のソースパッケージは `sources/`
226
257
  に置かれます。
227
258
 
228
259
  アプリ内設定(**設定**)は上記の YAML ではなくスナップショットに保存されます: ソース /
@@ -300,6 +331,9 @@ cait/
300
331
  │ ├─ persistence.js
301
332
  │ ├─ import-export.js
302
333
  │ ├─ formats.js # CSV/SRT/VTT/PO/XLIFF/HTML/JSON/RTF
334
+ │ ├─ html.js # HTML/XHTML テキストラン走査と書き戻し
335
+ │ ├─ epub.js # EPUB パッケージ読み込み / spine インポート / パッチ書き出し
336
+ │ ├─ preprocess.js # インポート時の原文前処理ステージ
303
337
  │ ├─ xlsx.js
304
338
  │ ├─ pptx.js
305
339
  │ ├─ segmenter.js
@@ -327,6 +361,8 @@ node --check client.js
327
361
  node _dev/test-core.mjs
328
362
  node _dev/test-imports.mjs
329
363
  node _dev/test-formats.mjs
364
+ node _dev/test-epub.mjs
365
+ node _dev/test-preprocess.mjs
330
366
  node _dev/test-second-tier.mjs
331
367
  node _dev/test-docx-export.mjs
332
368
  node _dev/test-api.mjs
@@ -341,7 +377,7 @@ node _dev/test-mt.mjs
341
377
 
342
378
  インポート / エクスポートのフィクスチャは `_dev/sample.docx`、`_dev/sample-table.docx`、
343
379
  `_dev/sample-format.docx` です。対応する `python _dev/make-*.py` スクリプトで再生成
344
- できます。13 スイートすべてが通るはずです。
380
+ できます。15 スイートすべてが通るはずです。
345
381
 
346
382
  ### リリース
347
383
 
@@ -383,7 +419,10 @@ npm publish
383
419
 
384
420
  ## 既知の制限とロードマップ
385
421
 
386
- - PDF、EPUB、画像 OCR のインポートはまだありません。
422
+ - PDF のインポートは非対応で、今後も対象外です([PDF はサポートされません](#pdf-はサポートされません))。
423
+ 画像 OCR も未対応です。
424
+ - EPUB インポートは spine 内の本文 XHTML テキストブロックのみを対象とします。
425
+ DRM、固定レイアウト、スクリプト化、MathML を多用する書籍は非対応です。
387
426
  - DOCX インポートは表、ヘッダー、脚注、フィールド、代替テキスト、変更履歴の削除を
388
427
  スキップします。DOCX エクスポートではそれらの領域はソース言語のまま残ります。
389
428
  - 複数の run が混在する DOCX/PPTX の段落は、先頭 run の書式を継承します。
@@ -393,19 +432,21 @@ npm publish
393
432
  - HTML/RTF のエクスポートは元のスタイルをラウンドトリップしません。JSON は文字列値だけを
394
433
  翻訳します。
395
434
  - TM のマッチングは意味ではなく字句に基づきます。ステミング、同義語、埋め込みはありません。
396
- - ライブラリの名前変更 / 削除と、タブごとのマウント状態は v1.0.0 の対象外です。
435
+ - ライブラリの名前変更 / 削除と、タブごとのマウント状態は未実装です。
397
436
  - ワークベンチ UI は中国語・英語・日本語の 3 言語で、設定から切り替えられます。
398
437
  README も英語・簡体字中国語・日本語の 3 版があり、英語版が正本です。
399
438
 
400
- 次に予定しているのは、PDF と EPUB のアダプタ、マルチモーダルな DSH ルート経由の画像 /
401
- ビジョン入力、より充実したライブラリ管理、スタイルを保つ XLSX 出力、XLIFF の
439
+ 次に予定しているのは、マルチモーダルな DSH ルート経由の画像 / ビジョン入力、
440
+ より充実したライブラリ管理、スタイルを保つ XLSX 出力、XLIFF の
402
441
  `<alt-trans>` / ノート対応です。
403
442
 
404
443
  ## 変更履歴とバージョン
405
444
 
406
445
  [CHANGELOG.md](CHANGELOG.md) を参照してください。`v1.0.0` が最初の公開リリースで、
407
446
  `v1.0.1` が日本語 UI とアプリ内の UI 言語切り替えを追加し、`v1.0.2` で
408
- *DSH の言語に従う* が DSH のロケールに従うようになり、`v1.0.3` で npm に公開しました。
447
+ *DSH の言語に従う* が DSH のロケールに従うようになり、`v1.0.3` で npm に公開、
448
+ `v1.0.4` から以降のリリースは provenance 付きの公開ワークフローで行われ、
449
+ `v1.0.5` で EPUB、インポート前処理、PDF ポリシーを追加しました。
409
450
  プロジェクトは `0.1.0` として開発され、GitHub リリースに向けて採番し直されました。
410
451
 
411
452
  > **ライセンス:** Apache License 2.0 — [LICENSE](LICENSE) を参照してください。