Selaa lähdekoodia

20250605-生成说明书

lrj 4 kuukautta sitten
vanhempi
commit
3fdca29d13

+ 2 - 2
src/main/java/cn/cslg/pas/service/dify/GenerateInstructionService.java

@@ -75,7 +75,7 @@ public class GenerateInstructionService {
     public String getClaimContent(String claim) {
        claim= claim.replaceAll("所述","");
         // 正则表达式模式(注意 Java 中需要双反斜杠转义)
-        String regex = "其特征在于[,。;!?、]+(.+)";
+        String regex = "其特征在于[,。;!?、::]+(.+)";
         Pattern pattern = Pattern.compile(regex);
         Matcher matcher = pattern.matcher(claim);
         if (matcher.find()) {
@@ -91,7 +91,7 @@ public class GenerateInstructionService {
         claim= claim.replaceAll("所述","");
         // 正则表达式模式(注意 Java 中需要双反斜杠转义)
         claim= claim.replaceAll("^(\\d+[.、]|\\[[0-9]+])","");
-        claim =claim.replaceAll("其特征在于[,。;!?、]","");
+        claim =claim.replaceAll("其特征在于[,。;!?、::]+(.+)","");
         return claim; // 未找到匹配时返回空字符串