文本替换添加对应的日志

This commit is contained in:
tiger_zhou 2024-03-11 17:57:12 +08:00
parent c085f5f778
commit d20fe5fd27

View File

@ -147,6 +147,7 @@ public class SimulationVoiceHandler {
* 匹配替换对象
*/
public static class Replacement {
String match;
String replace;
@ -169,6 +170,7 @@ public class SimulationVoiceHandler {
}
return regexReplace(content);
}
/**
* 对语音识别内容进行仿真用词处理
*
@ -183,7 +185,7 @@ public class SimulationVoiceHandler {
}
private String regexReplace(String s) {
log.info("正则替换");
log.info("正则替换 字符[{}]", s);
//编号替换
Pattern pattern = Pattern.compile("([一二三四五六七八九十]+)(号)");
Matcher matcher = pattern.matcher(s);