duckling-3

Duckling recognizes times mentioned in a text, but fails to (extensively) parse combined times such as `2 hours and 30 minutes`. Instead of parsing it to 150 minutes, it is parsed into 120 minutes and 30 minutes. The fix adds combinator rules based on keywords and changes the rule-application-order.

ghc-version: 8.6.3

hasbugs-version:

license: BSD

build-framework: cabal

Repository
GitHub Artifacts :

Faults @1dac46a8

[
  {
    "endline": 245,
    "file": "Duckling/Duration/EN/Rules.hs",
    "function": "rules",
    "module": "Duckling.Duration.EN.Rules",
    "startline": 245
  },
  {
    "endline": 260,
    "file": "Duckling/Duration/EN/Rules.hs",
    "function": "rules",
    "module": "Duckling.Duration.EN.Rules",
    "startline": 260
  }
]

Fixes @4cfe88ea

[
  {
    "endline": 262,
    "file": "Duckling/Duration/EN/Rules.hs",
    "function": "rules",
    "module": "Duckling.Duration.EN.Rules",
    "startline": 261
  },
  {
    "endline": 277,
    "file": "Duckling/Duration/EN/Rules.hs",
    "function": "rules",
    "module": "Duckling.Duration.EN.Rules",
    "startline": 277
  },
  {
    "endline": 258,
    "file": "Duckling/Duration/EN/Rules.hs",
    "function": "ruleCompositeDurationAnd",
    "module": "Duckling.Duration.EN.Rules",
    "startline": 243
  }
]