使用 LUIS 设置区域文化
Setting regional culture with LUIS
以“3/1/2017”格式将日期传递给 LUIS returns builtin.datetimev2 实体解析为 2013 年 3 月 1 日。
Month first 是美国对日期字符串的惯例,但在我的语言环境中不是这样,在我的语言环境中,该字符串通常表示 2017 年 1 月 1 日。
这是 JSON 响应:
{
"entity": "23/12/17",
"type": "builtin.datetimeV2.date",
"startIndex": 70,
"endIndex": 77,
"resolution": {
"values": [
{
"timex": "2017-12-23",
"type": "date",
"value": "2017-12-23"
}
]
}
},
{
"entity": "3/1/18",
"type": "builtin.datetimeV2.date",
"startIndex": 83,
"endIndex": 88,
"resolution": {
"values": [
{
"timex": "2018-03-01",
"type": "date",
"value": "2018-03-01"
}
]
}
},
builtin.datetimeV2.date 当前始终是 en-us,并且无法更改它。
有一个 UserVoice 请求,您可以在这里投票:https://cognitive.uservoice.com/forums/551524-luis/suggestions/31549864-luis-add-support-for-english-regional-formats
抱歉,这不是您要找的答案。
以“3/1/2017”格式将日期传递给 LUIS returns builtin.datetimev2 实体解析为 2013 年 3 月 1 日。
Month first 是美国对日期字符串的惯例,但在我的语言环境中不是这样,在我的语言环境中,该字符串通常表示 2017 年 1 月 1 日。
这是 JSON 响应:
{
"entity": "23/12/17",
"type": "builtin.datetimeV2.date",
"startIndex": 70,
"endIndex": 77,
"resolution": {
"values": [
{
"timex": "2017-12-23",
"type": "date",
"value": "2017-12-23"
}
]
}
},
{
"entity": "3/1/18",
"type": "builtin.datetimeV2.date",
"startIndex": 83,
"endIndex": 88,
"resolution": {
"values": [
{
"timex": "2018-03-01",
"type": "date",
"value": "2018-03-01"
}
]
}
},
builtin.datetimeV2.date 当前始终是 en-us,并且无法更改它。
有一个 UserVoice 请求,您可以在这里投票:https://cognitive.uservoice.com/forums/551524-luis/suggestions/31549864-luis-add-support-for-english-regional-formats
抱歉,这不是您要找的答案。