Skip to content

Add templates for light-year, decade and century - #379

Open
s-jse wants to merge 1 commit into
masterfrom
wip/new-unit-templates
Open

Add templates for light-year, decade and century#379
s-jse wants to merge 1 commit into
masterfrom
wip/new-unit-templates

Conversation

@s-jse

@s-jse s-jse commented Oct 20, 2020

Copy link
Copy Markdown
Member

This PR adds constant templates needed for three new measurement units added in stanford-oval/thingtalk-units#30 PR.

@s-jse

s-jse commented Oct 20, 2020

Copy link
Copy Markdown
Member Author

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

@s-jse
s-jse requested a review from sileix October 20, 2020 02:20
@s-jse

s-jse commented Oct 20, 2020

Copy link
Copy Markdown
Member Author

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
s-jse requested a review from gcampax October 20, 2020 02:54
@gcampax

gcampax commented Oct 20, 2020

Copy link
Copy Markdown
Contributor

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?

@s-jse

s-jse commented Oct 20, 2020

Copy link
Copy Markdown
Member Author

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).

@gcampax gcampax left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still care about this? Let's rebase/merge if so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants