edge-redact 加载模型

原文

0 字

检测到的信息

0
高 中 低

示例

代码

import { redact, restore } from "edge-redact";

const { text, mapping } = await redact("客户王建国,电话 138 0013 8000");

// text    → "客户[PERSON_1],电话 [PHONE_1]"
// mapping → { "[PERSON_1]": "王建国", "[PHONE_1]": "138 0013 8000" }

restore(reply, mapping);