Sub replace() ' ' replace 宏 ' Const wdReplaceAll = 2 Dim oRng As Range Set oRng = ActiveDocument.Content With oRng.Find .Execute FindText:="对抗性的例子", ReplaceWith:="对抗样本", replace:=wdReplaceAll .Execute FindText:="对抗性示例", ReplaceWith:="对抗样本", replace:=wdReplaceAll .Execute FindText:="对抗性实例", ReplaceWith:="对抗样本", replace:=wdReplaceAll .Execute FindText:="对抗性例子", ReplaceWith:="对抗样本", replace:=wdReplaceAll .Execute FindText:="对抗实例", ReplaceWith:="对抗样本", replace:=wdReplaceAll .Execute FindText:="对手", ReplaceWith:="攻击者", replace:=wdReplaceAll .Execute FindText:="挤压", ReplaceWith:="压缩", replace:=wdReplaceAll .Execute FindText:="功能", ReplaceWith:="特征", replace:=wdReplaceAll .Execute FindText:="显着", ReplaceWith:="显著", replace:=wdReplaceAll .Execute FindText:="稳健", ReplaceWith:="鲁棒", replace:=wdReplaceAll .Execute FindText:="健壮", ReplaceWith:="鲁棒", replace:=wdReplaceAll .Execute FindText:="样品", ReplaceWith:="样本", replace:=wdReplaceAll .Execute FindText:="渐变", ReplaceWith:="梯度", replace:=wdReplaceAll .Execute FindText:="培训", ReplaceWith:="训练", replace:=wdReplaceAll .Execute FindText:="规范", ReplaceWith:="范数", replace:=wdReplaceAll .Execute FindText:="探测", ReplaceWith:="检测", replace:=wdReplaceAll .Execute FindText:="辍学", ReplaceWith:="dropout", replace:=wdReplaceAll .Execute FindText:="图层", ReplaceWith:="层", replace:=wdReplaceAll .Execute FindText:="合法示例", ReplaceWith:="合法样本", replace:=wdReplaceAll .Execute FindText:="对抗性样本", ReplaceWith:="对抗样本", replace:=wdReplaceAll .Execute FindText:="对抗性训练", ReplaceWith:="对抗训练", replace:=wdReplaceAll .Execute FindText:="对抗性鲁棒性", ReplaceWith:="对抗鲁棒性", replace:=wdReplaceAll .Execute FindText:="对抗性强大", ReplaceWith:="对抗鲁棒性", replace:=wdReplaceAll .Execute FindText:="敌对", ReplaceWith:="对抗", replace:=wdReplaceAll End With End Sub
|