Repository: dongrixinyu/JioNLP (language: python)

Issue:
[BUG] 提取时间实体‘晚上十一点钟’,会定位到日期的‘2023-10-01’，正确的应该是今天的日期加十一点钟？
import jionlp as jio
res =jio.ner.extract_time('晚上十一点钟')
print(res)
```
返回结果：
[{'text': '晚上十一点钟', 'offset': [0, 6], 'type': 'time_point', 'detail': {'type': 'time_point', 'definition': 'accurate', 'time': ['2023-10-01 23:00:00', '2023-10-01 23:59:59']}}]

**期望行为(Expectation)**
[{'text': '晚上十一点钟', 'offset': [0, 6], 'type': 'time_point', 'detail': {'type': 'time_point', 'definition': 'accurate', 'time': ['2023-12-07 23:00:00', '2023-12-07 23:59:59']}}]

Thx a lot


Discussion / hints:

Fix patch:
diff --git a/jionlp/rule/rule_pattern.py b/jionlp/rule/rule_pattern.py
index 58ed90d..930f543 100644
--- a/jionlp/rule/rule_pattern.py
+++ b/jionlp/rule/rule_pattern.py
@@ -385,7 +385,7 @@
 SELF_EVI_LUNAR_DAY_STRING = r'([初廿]([一二三四五六七八九十1-9]|10))'
 
 # 时
-HOUR_STRING = r'((十)?[一两二三四五六七八九]|[零〇十]|二十[一二三四]?|[01]?\d|2[01234])[时点]'
+HOUR_STRING = r'((十)?[一两二三四五六七八九]|[零〇十]|二十[一二三四]?|[01]?\d|2[01234])[时点](整|钟)?'
 BLUR_HOUR_STRING = r'(凌晨|白天|清[晨|早]|黎明|一(大)?早|早[晨上]?|[上中下]午|午后|(傍)?晚[间上]?|[深半午]?夜[里间]?|[上下前后]半夜)'
 CONSECUTIVE_BLUR_HOUR_STRING = r'(一两|两三|三四|四五|五六|六七|七八|八九|九十)[点]'  # 明天下午七八点
 


Test patch:
diff --git a/test/test_time_parser.py b/test/test_time_parser.py
index 26710c1..47d2244 100644
--- a/test/test_time_parser.py
+++ b/test/test_time_parser.py
@@ -471,6 +471,8 @@ def test_time_parser(self):
              {'type': 'time_span', 'definition': 'accurate', 'time': ['2021-06-14 01:06:40', '2035-12-31 23:59:59']}],
             ['今晚八点以后', _ts_1,
              {'type': 'time_span', 'definition': 'accurate', 'time': ['2021-06-14 20:00:00', 'inf']}],
+            ['晚上十一点钟到晚上十二点', _ts_1,
+             {'type': 'time_span', 'definition': 'accurate', 'time': ['2021-06-14 23:00:00', '2021-06-15 00:00:00']}],
 
             # 残缺型 ……至……
             ['1月3至2月10', _ts_1,
@@ -699,6 +701,12 @@ def test_time_parser(self):
             # 当设定 strict 参数时会报错
             ['十一点半', _ts_1,
              {'type': 'time_point', 'definition': 'accurate', 'time': ['2021-06-14 11:30:00', '2021-06-14 11:30:59']}],
+            ['晚上十一点', _ts_1,
+             {'type': 'time_point', 'definition': 'accurate', 'time': ['2021-06-14 23:00:00', '2021-06-14 23:59:59']}],
+            ['晚上十一点钟', _ts_1,
+             {'type': 'time_point', 'definition': 'accurate', 'time': ['2021-06-14 23:00:00', '2021-06-14 23:59:59']}],
+            ['晚上十一点整', _ts_1,
+             {'type': 'time_point', 'definition': 'accurate', 'time': ['2021-06-14 23:00:00', '2021-06-14 23:59:59']}],
 
             # 时分秒 标准格式按 `:` 区隔
             ['上月30号12:37', _ts_1,