Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

s-jse
Copy link
Member

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

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

@s-jse
Copy link
Member Author

s-jse commented Oct 20, 2020

!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
Copy link
Member Author

s-jse commented Oct 20, 2020

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
Copy link
Contributor

gcampax commented Oct 20, 2020

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
Copy link
Member Author

s-jse commented Oct 20, 2020

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

Copy link
Contributor

@gcampax gcampax left a comment

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