From 8959819e31784b32e053c854718ed8b8b99c8428 Mon Sep 17 00:00:00 2001 From: Ninglin Du Date: Thu, 13 Jun 2024 17:21:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81"=E5=B7=A5=E4=BD=9C=E6=97=A5[?= =?UTF-8?q?=E6=AF=8F=E5=A4=A9]=E4=B8=89=E7=82=B9"=E7=9A=84=E8=AF=B4?= =?UTF-8?q?=E6=B3=95=20(#224)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scala/com/xiaomi/duckling/dimension/time/repeat/Rules.scala | 2 +- .../com/xiaomi/duckling/dimension/time/repeat/Examples.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/duckling-fork-chinese/core/src/main/scala/com/xiaomi/duckling/dimension/time/repeat/Rules.scala b/duckling-fork-chinese/core/src/main/scala/com/xiaomi/duckling/dimension/time/repeat/Rules.scala index 12ce29be..ff4aaea1 100644 --- a/duckling-fork-chinese/core/src/main/scala/com/xiaomi/duckling/dimension/time/repeat/Rules.scala +++ b/duckling-fork-chinese/core/src/main/scala/com/xiaomi/duckling/dimension/time/repeat/Rules.scala @@ -112,7 +112,7 @@ trait Rules extends DimRules with LazyLogging { val ruleWorkDays = Rule( name = "", - pattern = List("(每一?个)?(工作日|非工作日|节假日)".regex), + pattern = List("(每一?个)?(工作日|非工作日|节假日)(每天)?".regex), prod = regexMatch { case _ :: _ :: t :: _ => val workdayType = t match { case "工作日" => WorkdayType.Workday diff --git a/duckling-fork-chinese/learning/src/main/scala/com/xiaomi/duckling/dimension/time/repeat/Examples.scala b/duckling-fork-chinese/learning/src/main/scala/com/xiaomi/duckling/dimension/time/repeat/Examples.scala index caaef022..22a0dda8 100644 --- a/duckling-fork-chinese/learning/src/main/scala/com/xiaomi/duckling/dimension/time/repeat/Examples.scala +++ b/duckling-fork-chinese/learning/src/main/scala/com/xiaomi/duckling/dimension/time/repeat/Examples.scala @@ -49,7 +49,7 @@ object Examples extends DimExamples { (RepeatValue(DurationData(1, Week), start = (ymd(d = 13), Some(form.DayOfWeek))), List("每周三", "每个星期三")), (RepeatValue(DurationData(1, Day), start = (h(8), Some(form.TimeOfDay(Some(8), false)))), List("每天上午八点", "每个上午八点")), (RepeatValue(workdayType = NonWorkday), List("非工作日", "节假日")), - (RepeatValue(workdayType = Workday, start = (yMdHms(d = 13, H = 3, grain = Hour), Some(form.TimeOfDay(Some(3), false)))), List("工作日三点", "每个工作日三点")), + (RepeatValue(workdayType = Workday, start = (yMdHms(d = 13, H = 3, grain = Hour), Some(form.TimeOfDay(Some(3), false)))), List("工作日三点", "工作日每天三点", "每个工作日三点")), (RepeatValue(workdayType = Workday, start = (datetimeInterval( new DuckDateTime(LocalDateTime.of(2013, 2, 12, 8, 0, 0)), new DuckDateTime(LocalDateTime.of(2013, 2, 12, 12, 0, 0)),