You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@al06825 - not an official maintainer / nor a contributor. But pretty familiar with this package.
You need to refer to the NER Manager - Built-in Entites & register a entity extractor. Then you can parse the utterance with your chose of entity extractor to do something like this (assuming the extractor you choose has date supports).
Other than that - read the documentation (the page I linked to) & it should answer your question in full.
TQ
On Tuesday, October 17, 2023 at 01:44:15 PM GMT+8, Jared Van Valkengoed ***@***.***> wrote:
@al06825 - not an official maintainer / nor a contributor. But pretty familiar with this package.
You need to refer to the NER Manager - Built-in Entites & register a entity extractor. Then you can parse the utterance with your chose of entity extractor to do something like this (assuming the extractor you choose has date supports).
Other than that - read the documentation (the page I linked to) & it should answer your question in full.
Hope this helps! 😄
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
@al06825 I didn't even realize either! Assuming you the date in that log is correct - you can use the entity for the date by grabbing the JSON value / key with corresponding entity.
nlp.js
node
npm
I wanna extract date when intent is "What date is today?"
I got answer to be "Today is {{date}}" and it returned "Today is today" per the log below.
I wish to have answer like "Today is 2023-08-14"... but how?
Below is the log I got....
"intent": "inquiry.today",
"score": 0.9992725501954545,
"domain": "default",
"sourceEntities": [
{
"start": 12,
"end": 16,
"resolution": {
"values": [
{
"timex": "2023-08-14",
"type": "date",
"value": "2023-08-14"
}
]
},
"text": "today",
"typeName": "datetimeV2.date",
"entity": "date"
}
],
"entities": [
{
"start": 12,
"end": 16,
"len": 5,
"accuracy": 0.95,
"sourceText": "today",
"utteranceText": "today",
"entity": "date",
"rawEntity": "datetimeV2.date",
"resolution": {
"type": "date",
"timex": "2023-08-14",
"strValue": "2023-08-14",
"date": "2023-08-14T00:00:00.000Z"
}
}
],
"answers": [
{
"answer": "Today is today"
}
],
"answer": "Today is today",
The text was updated successfully, but these errors were encountered: