genie-toolkit icon indicating copy to clipboard operation
genie-toolkit copied to clipboard

Add templates for light-year, decade and century

Open s-jse opened this issue 3 years ago • 4 comments

This PR adds constant templates needed for three new measurement units added in https://github.com/stanford-oval/thingtalk-units/pull/30 PR.

s-jse avatar Oct 20 '20 02:10 s-jse

!turking is set for decade and century, but is not set for light-year. Does this make sense?

s-jse avatar Oct 20 '20 02:10 s-jse

Also, last year/decade/century usually means "within the the last 1/10/100 years", so something like 'last year/decade/century' => [C.makeDate(null, '-', new Ast.Value.Measure(1, 'year/decade/century')), C.makeDate(null) not 'last year/decade/century' => [C.makeDate(new Ast.DateEdge('start_of', 'year/decade/century'), '-', new Ast.Value.Measure(1, 'year/decade/century')), C.makeDate(new Ast.DateEdge('start_of', 'year/decade/century')

s-jse avatar Oct 20 '20 02:10 s-jse

Not sure about your last comment. To me, "last year" means 2019, and "this year" means 2020. "Last year" is not the same as "in the last 12 months". "Last decade" and "last century" work the same: 2000-2010 and 1900-2000 resp.

Also, before merging this patch, you will need to:

  • wait until a new release of thingtalk-units with the new units
  • fix date_utils in thingtalk to support the new units

Also, what's the purpose for these units, other than "they are useful"? Is there a project that depends on these?

gcampax avatar Oct 20 '20 03:10 gcampax

Not sure about your last comment. To me, "last year" means 2019, and "this year" means 2020. "Last year" is not the same as "in the last 12 months". "Last decade" and "last century" work the same: 2000-2010 and 1900-2000 resp.

Also, before merging this patch, you will need to:

* wait until a new release of thingtalk-units with the new units

* fix [date_utils](https://github.com/stanford-oval/thingtalk/blob/master/lib/date_utils.js) in thingtalk to support the new units

Also, what's the purpose for these units, other than "they are useful"? Is there a project that depends on these?

  • I would say in general it is at least ambiguous (with two meanings). e.g. "Canada has enjoyed a booming economy in the last decade." or "what are some good books that are published in the last decade?" mean the last 10 years.

  • These units are what I realized are missing while working on Schema2QA for Wikidata (specifically, the Astronomy and People domains).

s-jse avatar Oct 20 '20 03:10 s-jse