Nevertheless, I was wondering what would I need to change in the code to get the behavior inclusive - inclusive. As far as I understand, the reason of the current behavior is the following function:
Instead, if we did Closed -> fromMaybe s2 e2 we would effectively get the desired behavior - inclusive - inclusive.
Now, is this correct? Is there any other part of the code that assumes that intervals are inclusive - exclusive or is this change enough to make things work? I've tested it locally and, besides the fact that the whole test suit fails with mismatched predicates, the only issue is that some languages like Chinese have ambiguous parses.
I know that there are several questions related to how intervals are handled
inclusive - exclusive
. So far, I've found the following issues:Nevertheless, I was wondering what would I need to change in the code to get the behavior
inclusive - inclusive
. As far as I understand, the reason of the current behavior is the following function:https://github.com/facebook/duckling/blob/84175d61d6f44d0db2abb42d67c6c4213762b64f/Duckling/Time/Types.hs#L834-L849
In particular, the line
https://github.com/facebook/duckling/blob/84175d61d6f44d0db2abb42d67c6c4213762b64f/Duckling/Time/Types.hs#L843
Instead, if we did
Closed -> fromMaybe s2 e2
we would effectively get the desired behavior -inclusive - inclusive
.Now, is this correct? Is there any other part of the code that assumes that intervals are
inclusive - exclusive
or is this change enough to make things work? I've tested it locally and, besides the fact that the whole test suit fails with mismatched predicates, the only issue is that some languages like Chinese have ambiguous parses.