clu-ling / logx-reader

https://clu-ling.github.io/logx-reader
0 stars 0 forks source link

Identify relative dates #11

Open myedibleenso opened 4 years ago

myedibleenso commented 4 years ago
myedibleenso commented 4 years ago

Though many are working as expected, we need tests for all of these.

How many vessels are arriving in the next hour?

  • LGTM

How many vessels are arriving over the next week?

  • Very close. Don't include over in returned span (using it as a zero-width assertion)

How many vessels are arriving by the the end of the week?

  • LGTM

How many vessels are arriving each day for the next week?

  • LGTM

How many vessels are arriving daily for the next week?

  • Needs work (daily and similar expressions are missing)

How many vessels are arriving everyday for the next week?

  • Needs work (everyday and similar expressions are missing)
zwellington commented 3 years ago

ComplexInterval

Added rule: ComplexIntervalTime

- name: "complex-interval-time-expression"
  label: ComplexIntervalTime
  type: token
  action: ${actionFlow}
  pattern: |
     (?<frequency> [lemma=/^(daily|everyday)$/]) (@interval:IntervalTime)

Corresponding tests: tests

myedibleenso commented 3 years ago

Thanks, @zwellington. The time expression is great! It seems like that Query should be a QuantityQuery, though.

Any ideas about what's going on there?

zwellington commented 3 years ago

@myedibleenso , the current grammar has a commented out QuantityQuery. There is also no relabel action for QuantityQuery.

zwellington commented 3 years ago

Between 2001 and 2007

  • IntervalTime Post 2012
  • AfterTime 2 November 2016
  • Date between Nov 2012 and Nov 2016
  • IntervalTime Circa Dec 2015
  • ApproximateDate? As of 31 Jul 2017
  • AfterTime?