Making intervals 'inclusive - inclusive'
emlautarom1 opened this issue · 1 comments
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:
duckling/Duckling/Time/Types.hs
Lines 834 to 849 in 84175d6
In particular, the line
duckling/Duckling/Time/Types.hs
Line 843 in 84175d6
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 think you are correct wrt the code, but changing this would break essentially every user of duckling, so I'm not really in favour of changing it.