fix: enhance Chinese numeral time parsing#360
Conversation
1. Added support for Chinese numeral month specifications in time
queries ("七月", "十二月")
2. Extended year-month and full date patterns to accept Chinese numerals
("2025年七月", "七月八号")
3. Improved number parsing logic to handle leading-ten Chinese numerals
("十一", "十五")
4. Updated test cases to verify new Chinese numeral time formats
5. Expanded regex patterns in time_rules.json to accommodate Chinese
numerals
The changes improve natural language processing for Chinese date/time
queries by properly handling Chinese numeral representations alongside
Arabic numerals. This makes the search functionality more intuitive for
Chinese users who may use either number format when specifying dates.
Log: Improved support for Chinese numeral time expressions in search
queries
Influence:
1. Test month queries with Chinese numerals ("七月", "十二月")
2. Verify year-month combinations with Chinese months ("2025年十一月")
3. Check date formats with Chinese day numbers ("七月八号")
4. Test full dates with Chinese numerals ("2025年七月三十日")
5. Verify mixed numeral formats ("最近3天" vs. "最近十五天")
6. Check edge cases like single-digit and leading-ten numbers
fix: 增强中文数字时间解析功能
1. 新增支持中文数字月份查询 ("七月", "十二月")
2. 扩展年月和完整日期格式支持中文数字 ("2025年七月", "七月八号")
3. 改进数字解析逻辑以处理"十"开头的数字写法 ("十一", "十五")
4. 添加测试用例验证新的中文数字时间格式
5. 更新 time_rules.json 中的正则表达式以兼容中文数字
这些改动提升了中文时间查询的自然语言处理能力,正确处理中文数字与阿拉伯数
字表达,使搜索功能对使用中文数字表达时间的用户更加友好。
Log: 改进搜索查询中的中文数字时间表达式支持
Influence:
1. 测试中文数字月份查询 ("七月", "十二月")
2. 验证带中文月份的年份组合 ("2025年十一月")
3. 检查带中文日期的格式 ("七月八号")
4. 测试完整的带中文数字日期 ("2025年七月三十日")
5. 验证混合数字格式 ("最近3天" 与 "最近十五天")
6. 检查边界情况如个位数和"十"开头的数字
Fixes: #370419
There was a problem hiding this comment.
Sorry @Johnson-zs, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Johnson-zs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
deepin pr auto review★ 总体评分:95分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 当前代码已经非常完善,无需额外修复,保持现有实现即可。 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
queries ("七月", "十二月")
("2025年七月", "七月八号")
("十一", "十五")
numerals
The changes improve natural language processing for Chinese date/time
queries by properly handling Chinese numeral representations alongside
Arabic numerals. This makes the search functionality more intuitive for
Chinese users who may use either number format when specifying dates.
Log: Improved support for Chinese numeral time expressions in search
queries
Influence:
fix: 增强中文数字时间解析功能
这些改动提升了中文时间查询的自然语言处理能力,正确处理中文数字与阿拉伯数
字表达,使搜索功能对使用中文数字表达时间的用户更加友好。
Log: 改进搜索查询中的中文数字时间表达式支持
Influence:
Fixes: #370419