Skip to content

Commit d2518aa

Browse files
authored
[docs] add pir doc in Chinese (#317)
* [docs] add pir doc in Chinese * fix: translation errors
1 parent c9a7eac commit d2518aa

File tree

1 file changed

+78
-65
lines changed
  • docs/locale/zh_CN/LC_MESSAGES/user_guide

1 file changed

+78
-65
lines changed

docs/locale/zh_CN/LC_MESSAGES/user_guide/pir.po

Lines changed: 78 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -23,51 +23,51 @@ msgstr "PIR 快速入门"
2323

2424
#: ../../user_guide/pir.rst:4
2525
msgid "Quick start with SPU Private Information Retrival (PIR)."
26-
msgstr "PIR 快速入门"
26+
msgstr "SPU(密文运算单元)匿踪查询(PIR快速入门"
2727

2828
#: ../../user_guide/pir.rst:7
2929
msgid "Supported Protocols"
3030
msgstr "支持的协议"
3131

3232
#: ../../user_guide/pir.rst:10
3333
msgid "PIR protocols"
34-
msgstr ""
34+
msgstr "PIR 协议"
3535

3636
#: ../../user_guide/pir.rst:10
3737
msgid "Type"
38-
msgstr ""
38+
msgstr "类型"
3939

4040
#: ../../user_guide/pir.rst:10
4141
msgid "Server Number"
42-
msgstr ""
42+
msgstr "服务器数量"
4343

4444
#: ../../user_guide/pir.rst:12
4545
msgid "SealPIR(later)"
46-
msgstr ""
46+
msgstr "SealPIR(后续更新)"
4747

4848
#: ../../user_guide/pir.rst:12
4949
msgid "Index PIR"
50-
msgstr ""
50+
msgstr "Index PIR"
5151

5252
#: ../../user_guide/pir.rst:12 ../../user_guide/pir.rst:14
5353
msgid "Single Server"
54-
msgstr ""
54+
msgstr "单服务器"
5555

5656
#: ../../user_guide/pir.rst:14
5757
msgid "APSI"
58-
msgstr ""
58+
msgstr "APSI"
5959

6060
#: ../../user_guide/pir.rst:14
6161
msgid "Keyword PIR"
62-
msgstr ""
62+
msgstr "Keyword PIR"
6363

6464
#: ../../user_guide/pir.rst:17
6565
msgid "At this moment, SealPIR is under development."
6666
msgstr "SealPIR 正在开发中。"
6767

6868
#: ../../user_guide/pir.rst:21
6969
msgid "Release Docker"
70-
msgstr ""
70+
msgstr "发布 Docker 镜像"
7171

7272
#: ../../user_guide/pir.rst:23
7373
msgid ""
@@ -76,17 +76,17 @@ msgid ""
7676
" at Alibaba Cloud: `secretflow-registry.cn-"
7777
"hangzhou.cr.aliyuncs.com/secretflow/psi-anolis8`."
7878
msgstr ""
79-
"我们有Docker镜像 `dockerhub <https://hub.docker.com/r/secretflow/psi-"
80-
"anolis8>`_ , 也有阿里云镜像: `secretflow-registry.cn-"
81-
"hangzhou.cr.aliyuncs.com/secretflow/psi-anolis8`."
79+
"请在 `dockerhub <https://hub.docker.com/r/secretflow/psi-anolis8>`_ 上查看"
80+
"官方发布版 docker 镜像。我们在阿里云也设有镜像源:secretflow-registry.cn-"
81+
"hangzhou.cr.aliyuncs.com/secretflow/psi-anolis8"
8282

8383
#: ../../user_guide/pir.rst:27
8484
msgid "Keyword PIR (APSI)"
85-
msgstr ""
85+
msgstr "Keyword PIR (APSI)"
8686

8787
#: ../../user_guide/pir.rst:30
8888
msgid "Before Start"
89-
msgstr "开始准备"
89+
msgstr "开始前准备"
9090

9191
#: ../../user_guide/pir.rst:32
9292
msgid ""
@@ -96,9 +96,9 @@ msgid ""
9696
"the repo carefully. We are not going to discuss any content related to "
9797
"APSI further."
9898
msgstr ""
99-
"我们对 `APSI <https://github.com/microsoft/APSI>`_ 库提供了一个简单的封装. 请仔细阅读APSI仓的 "
99+
"我们对 `APSI <https://github.com/microsoft/APSI>`_ 库提供了一个简单的封装。请仔细阅读 APSI 仓库的 "
100100
"`README <https://github.com/microsoft/APSI?tab=readme-ov-"
101-
"file#introduction>`_ 。 我们这里不再重复描述APSI文档中描述的东西。"
101+
"file#introduction>`_ 。我们这里不再重复描述 APSI 文档中描述的内容。"
102102

103103
#: ../../user_guide/pir.rst:36
104104
msgid ""
@@ -108,35 +108,36 @@ msgid ""
108108
"<https://github.com/microsoft/APSI?tab=readme-ov-file#command-line-"
109109
"interface-cli>`_ as well."
110110
msgstr ""
111-
"配置细节可以参考 :doc:`/reference/pir_config`。基本上我们和APSI的命令行参数保持一致。所以你可以阅读 `APSI "
111+
"配置细节可以参考 :doc:`/reference/pir_config`。我们和 APSI 的命令行参数基本保持一致,所以你可以阅读 `APSI "
112112
"CLI arguments <https://github.com/microsoft/APSI?tab=readme-ov-file"
113113
"#command-line-interface-cli>`_ 来作为参考。"
114114

115115
#: ../../user_guide/pir.rst:39
116116
msgid "The extra features brought are:"
117-
msgstr "额外加的功能是:"
117+
msgstr "新增功能如下:"
118118

119119
#: ../../user_guide/pir.rst:41
120120
msgid "Use Yacl Link as communication layer."
121-
msgstr "使用Yacl Link作为通信层。"
121+
msgstr "使用 Yacl Link 作为通信层。"
122122

123123
#: ../../user_guide/pir.rst:42
124124
msgid "Experimental bucketized PIR."
125-
msgstr "试验性的分桶PIR"
125+
msgstr "试验性的分桶 PIR。"
126126

127127
#: ../../user_guide/pir.rst:43
128128
msgid "Provide APIs for further integration."
129-
msgstr "提供了额外用来集成的API。"
129+
msgstr "提供了用来进一步集成的 API。"
130130

131131
#: ../../user_guide/pir.rst:45
132132
msgid ""
133133
"If you want to try a similar CLI like APSI, you could compile the source "
134134
"code by"
135-
msgstr "如果你想要尝试一个类似APSI的CLI,你可以通过如下编译:"
135+
msgstr ""
136+
"如果你想要尝试一个类似 APSI 的 CLI,可以通过如下方式编译源代码:"
136137

137138
#: ../../user_guide/pir.rst:54
138139
msgid "And get CLI parameters like this:"
139-
msgstr "获取命令行参数如下:"
140+
msgstr "然后通过如下方式获取命令行参数:"
140141

141142
#: ../../user_guide/pir.rst:65
142143
msgid "Prepare data and config"
@@ -146,48 +147,50 @@ msgstr "准备数据和配置:"
146147
msgid ""
147148
"For Senders (Servers), you must provide a input csv or a sender db file. "
148149
"An input csv file could be turned into a sender db file after setup."
149-
msgstr "对于 Senders (Servers), 需要提供一个CSV文件或者一个sender db文件. CSV文件会被转换成sender db文件。"
150+
msgstr ""
151+
"对于 Senders (Servers),你必须提供一个作为输入的 CSV 文件或者一个 sender db 文件。"
152+
"输入的 CSV 文件在完成设置后会被转换成 sender db 文件。"
150153

151154
#: ../../user_guide/pir.rst:71
152155
msgid "CSV File"
153-
msgstr "CSV文件"
156+
msgstr "CSV 文件"
154157

155158
#: ../../user_guide/pir.rst:73
156159
msgid "The csv file should looks like"
157-
msgstr "CSV文件格式如下:"
160+
msgstr "CSV 文件格式如下:"
158161

159162
#: ../../user_guide/pir.rst:88
160163
msgid "Please make sure:"
161-
msgstr "要确保:"
164+
msgstr "请确保:"
162165

163166
#: ../../user_guide/pir.rst:90
164167
msgid "Since version **0.4.0b0**, headers line is required."
165-
msgstr "版本0.4.0b0开始,CSV文件必须有headers行。"
168+
msgstr "从版本 **0.4.0b0** 开始,CSV 文件必须包含表头。"
166169

167170
#: ../../user_guide/pir.rst:91
168171
msgid "The first row must be headers, only **key** and **value** are allowed."
169-
msgstr "列名只允许 key 和 value 两列。"
172+
msgstr "首行必须为表头,且只允许包含 **key****value** 两列。"
170173

171174
#: ../../user_guide/pir.rst:92
172175
msgid "The **key** column must be items(keys)"
173-
msgstr "**key** 列必须是ID列"
176+
msgstr "**key** 列必须是数据项(即键)。"
174177

175178
#: ../../user_guide/pir.rst:93
176179
msgid "The **value** column must be labels(values), this column is optional."
177-
msgstr "**value** 列可选,是label列。"
180+
msgstr "**value** 必须是标签(即值),此列为可选列。"
178181

179182
#: ../../user_guide/pir.rst:97
180183
msgid "APSI Params File"
181-
msgstr "APSI参数文件"
184+
msgstr "APSI 参数文件"
182185

183186
#: ../../user_guide/pir.rst:99
184187
msgid ""
185188
"We use the original APSI params. For details, please check `APSI "
186189
"PSIParams <https://github.com/microsoft/APSI?tab=readme-ov-"
187190
"file#psiparams>`_ ."
188191
msgstr ""
189-
"我们使用了大多 `APSI PSIParams <https://github.com/microsoft/APSI?tab=readme-ov-"
190-
"file#psiparams>`_ 的参数。"
192+
"我们使用了 APSI 的原生参数。详情请查阅 `APSI PSIParams "
193+
"<https://github.com/microsoft/APSI?tab=readme-ov-file#psiparams>`_ 文档。"
191194

192195
#: ../../user_guide/pir.rst:101
193196
msgid ""
@@ -198,9 +201,10 @@ msgid ""
198201
"receivers and senders share the same APSI params file, otherwise error "
199202
"occurred."
200203
msgstr ""
201-
"对 senders 而言: APSI 参数文件需要提供。如果是已经生成的DB文件, APSI参数文件会被忽略。对 receivers 而言: "
202-
"APSI参数文件是可选的。如果没有提供, receivers 会从 senders 处请求. 如果提供了,请确保receivers 和 "
203-
"senders 的 APSI参数文件一致。"
204+
"对 senders 而言:当提供 CSV 文件时,必须同时提供一个 APSI 参数文件。"
205+
"如果提供的是 sender db 文件,则无需提供 APSI 参数文件,即使提供也会会被忽略。"
206+
"对 receivers 而言:APSI 参数文件是可选的。如果没有提供, receivers 会向 senders"
207+
" 请求该文件。如果选择提供该文件,请确保 receivers 和 senders 的 APSI 参数文件一致。"
204208

205209
#: ../../user_guide/pir.rst:105
206210
msgid ""
@@ -211,20 +215,20 @@ msgid ""
211215
"You can refer to `here <https://github.com/microsoft/APSI?tab=readme-ov-"
212216
"file#loading-from-json>`_ to choose the appropriate parameter file."
213217
msgstr ""
214-
"APSI的参数是不好定的。APSI预先调试好了一些参数 `APSI parameters "
215-
"<https://github.com/microsoft/APSI/tree/main/parameter>`_ . 我们的代码仓也拷贝了一份 "
216-
"`APSI parameters <blob/main/examples/pir/apsi/parameters>`_"
217-
" 。参考 `这里 <https://github.com/microsoft/APSI?tab=readme-ov-file#loading-"
218-
"from-json>`_ 选择合适的参数文件。 "
218+
"要找到一个合适的 APSI 参数文件并不容易。因此 APSI 官方在 `APSI parameters "
219+
"<https://github.com/microsoft/APSI/tree/main/parameter>`_ 中提供了一些示例。"
220+
"我们也在代码仓库中准备了一份 `APSI parameters <blob/main/examples/pir/apsi/parameters>`_"
221+
" 副本。请参考 `这里 <https://github.com/microsoft/APSI?tab=readme-ov-file#loading-"
222+
"from-json>`_ 选择合适的参数文件。"
219223

220224
#: ../../user_guide/pir.rst:110
221225
msgid ""
222226
"To launch PIR, please check LaunchConfig at "
223227
":doc:`/reference/launch_config`, and specific config: :ref:`sender config"
224228
" <ApsiSenderConfig>` and :ref:`receiver config <ApsiReceiverConfig>`."
225229
msgstr ""
226-
"要启动PIR,可以查看启动配置 :doc:`/reference/launch_config`, APSI配置: :ref:`sender "
227-
"config <ApsiSenderConfig>` 和 :ref:`receiver config <ApsiReceiverConfig>`."
230+
"要启动PIR,请在 :doc:`/reference/launch_config` 中查阅启动配置,以及相关具体配置: "
231+
":ref:`sender config <ApsiSenderConfig>` 和 :ref:`receiver config <ApsiReceiverConfig>`."
228232

229233
#: ../../user_guide/pir.rst:115
230234
msgid "PIR Config"
@@ -237,41 +241,46 @@ msgid ""
237241
"csv file for db generating should be specified as **source_file**, and "
238242
"**db_file** is used to specify the generated db file."
239243
msgstr ""
240-
"Sender: 准备阶段,使用CSV输入生成DB文件。这个阶段是离线的。自 **0.4.0b0** 版本起, 用来生成DB文件的CSV文件使用 "
241-
"**source_file** 指定, 并且 **db_file** 用来指定生成DB文件的文件夹。"
244+
"Sender: 设置阶段。此阶段中,sender 根据输入的 CSV 文件生成 db 文件。"
245+
"此阶段为离线操作。自 **0.4.0b0** 版本起,用来生成 db 文件的 CSV 源文件通过 "
246+
"**source_file** 指定,而 **db_file** 用于指定生成 db 文件路径。"
242247

243248
#: ../../user_guide/pir.rst:121
244249
msgid "apsi_sender_setup.json"
245-
msgstr ""
250+
msgstr "apsi_sender_setup.json"
246251

247252
#: ../../user_guide/pir.rst:133
248253
msgid ""
249254
"Sender: Online stage. In this stage, sender generates responses to "
250255
"receivers' queries. This stage is online."
251-
msgstr "Sender: 在线阶段。Sender接收Reciver的Query请求生成回复。"
256+
msgstr ""
257+
"Sender: 在线阶段。此阶段中,sender 接收 recivers 的查询并生成相应,"
258+
"需要保持在线。"
252259

253260
#: ../../user_guide/pir.rst:135
254261
msgid "apsi_sender_online.json"
255-
msgstr ""
262+
msgstr "apsi_sender_online.json"
256263

257264
#: ../../user_guide/pir.rst:158
258265
msgid "Receiver: Online stage."
259266
msgstr "Receiver: 在线阶段"
260267

261268
#: ../../user_guide/pir.rst:160
262269
msgid "apsi_receiver.json"
263-
msgstr ""
270+
msgstr "apsi_receiver.json"
264271

265272
#: ../../user_guide/pir.rst:184
266273
msgid ""
267274
"params_file field is optional. If not provided, receiver will ask sender "
268275
"for params. If provided, please make sure you provide the same one to "
269276
"sender's."
270-
msgstr "params_file 字段是可选的。如果没提供,Receiver会向Sender请求参数。如果提供了,请确保和Sender使用的一致。"
277+
msgstr ""
278+
"params_file 字段是可选的。如果未提供,receiver 会向 sender 请求该参数。"
279+
"如果提供了该文件,请确保其与 sender 使用的文件一致。"
271280

272281
#: ../../user_guide/pir.rst:188
273282
msgid "Full Examples"
274-
msgstr "完整的例子"
283+
msgstr "完整示例"
275284

276285
#: ../../user_guide/pir.rst:190
277286
msgid ""
@@ -280,10 +289,10 @@ msgid ""
280289
"For more demo configs, you can check `here "
281290
"<https://github.com/secretflow/psi/tree/main/examples/pir/config>`_."
282291
msgstr ""
283-
"请查看 `examples "
284-
"<https://github.com/secretflow/psi/tree/main/examples/pir/README.md>`_. "
285-
"示例配置,可以查看 `here "
286-
"<https://github.com/secretflow/psi/tree/main/examples/pir/config>`_."
292+
"请查阅 `相关示例 "
293+
"<https://github.com/secretflow/psi/tree/main/examples/pir/README.md>`_"
294+
"如需更多演示配置,你可以查看 `这里 "
295+
"<https://github.com/secretflow/psi/tree/main/examples/pir/config>`_"
287296

288297
#: ../../user_guide/pir.rst:195
289298
msgid "Bucketized Mode"
@@ -294,28 +303,32 @@ msgid ""
294303
"Searching in a large sender db is costly. So we can split data into "
295304
"buckets. The server knows which bucket the client is querying, but does "
296305
"not know which specific element:"
297-
msgstr "搜索一个很大的Sender DB是很耗时的。所以我们可以将数据分桶。Server知道client查询的是哪个桶,但是不知道具体元素:"
306+
msgstr ""
307+
"对一个大型的的 sender db 进行搜索的开销很大。所以我们可以将数据分桶。"
308+
" Server 虽然知道 client 查询的是哪个桶,但是不知道具体元素:"
298309

299310
#: ../../user_guide/pir.rst:200
300311
msgid ""
301312
"In the setup stage, sender split data into buckets. Each bucket will "
302313
"generate a sender db."
303-
msgstr "在准备阶段,Sender将数据分桶。每个桶会生成一个Sender DB。"
314+
msgstr ""
315+
"在设置阶段,sender 会对数据进行分桶。每个桶会生成一个对应的 sender db。"
304316

305317
#: ../../user_guide/pir.rst:202
306318
msgid ""
307319
"In the online stage, receiver split query into subqueries. Each subquery "
308320
"only contains items residing in the same bucket. When receivers sends a "
309321
"subquery to the sender, bucket idx is also provided."
310322
msgstr ""
311-
"在在线阶段,Receiver将Query分拆成子Query。每个子Query只包含在同一个桶里的元素。当Receiver发送一个子Query给Sender时,也会提供bucket"
312-
" idx。"
323+
"在线阶段中,receiver 会将其查询分拆成子查询。每个子查询仅包含属于同一个桶的数据项。"
324+
"当 receivers 向 sender 发送子查询时,也会提供对应的 bucket idx。"
313325

314326
#: ../../user_guide/pir.rst:205
315327
msgid ""
316328
"For each subquery, sender only search in the corresponding sender db for "
317329
"specific bucket."
318-
msgstr "对每个子Query,Sender只在对应的Sender DB的桶里里搜索。"
330+
msgstr ""
331+
"针对每个子查询,sender 仅在特定桶对应的 sender db 中进行搜索。"
319332

320333
#: ../../user_guide/pir.rst:207
321334
msgid ""
@@ -331,13 +344,13 @@ msgid ""
331344
":math:`\\text{ind_degree}`-:math:`\\text{query_rows_per_bucket}`-xxx.json"
332345
" as :ref:`params_file <ApsiSenderConfig>`."
333346
msgstr ""
334-
"假设Query的不可区分度为 :math:`\\text{ind_degree}`,Sender有 "
347+
"假设查询的不可区分度为 :math:`\\text{ind_degree}`,且 sender 有 "
335348
":math:`\\text{sender_data_rows}` 行数据。那么桶的数量应该为 :math:`\\text{bucket_num} "
336349
"= \\text{sender_data_rows} / \\text{ind_degree}`。你可以设置 "
337350
":ref:`experimental_bucket_cnt <ApsiSenderConfig>` 为 "
338-
":math:`\\text{bucket_num}`。如果Client有 :math:`\\text{query_rows}` "
351+
":math:`\\text{bucket_num}`。如果 client有 :math:`\\text{query_rows}` "
339352
"行数据,那么每个桶里会有 :math:`\\text{query_rows_per_bucket} = \\text{query_rows} / "
340353
"\\text{bucket_num}` 行数据。你就可以选择 "
341-
":math:`\\text{ind_degree}`-:math:`\\text{query_rows_per_bucket}`-xxx.json作为"
354+
":math:`\\text{ind_degree}`-:math:`\\text{query_rows_per_bucket}`-xxx.json 作为"
342355
" :ref:`params_file <ApsiSenderConfig>`。"
343356

0 commit comments

Comments
 (0)