Microsoft.Recognizers.Text provides recognition and resolution of numbers, units, date/time, etc. in multiple languages (ZH, EN, FR, ES, PT, DE, IT, TR, HI, NL. Partial support for JA, KO, AR, SV). Packages available at: https://www.nuget.org/profiles/Recognizers.Text, https://www.npmjs.com/~recognizers.text
MIT License
1.68k
stars
431
forks
source link
Support for non-int time ranges in timex in c# #3106
Describe the bug
From LUIS, I get a Timex valued PT0.5H. I'd like to parse the string with this library, but the parts (i.e. hours) must be an int. See code.
To Reproduce
Steps to reproduce the behavior:
Parse a Timex from the string PT0.5H via TimexResolver.Resolve(new[] { "PT0.5H });
A ThrowOverflowOrFormatException is thrown.
Expected behavior
The timex is parsed properly.
Platform (please complete the following information):
Describe the bug From LUIS, I get a Timex valued
PT0.5H
. I'd like to parse the string with this library, but the parts (i.e. hours) must be anint
. See code.To Reproduce Steps to reproduce the behavior:
PT0.5H
viaTimexResolver.Resolve(new[] { "PT0.5H });
ThrowOverflowOrFormatException
is thrown.Expected behavior The timex is parsed properly.
Platform (please complete the following information):