Jump to content

Wikifunctions:Type proposals/Time of action

From Wikifunctions

Summary

This type proposes to represent the time in which actions, expressed in natural languages, occur. In real life, activities and events do not usually occur in a precise time instant, but are prolonged in time, may happen more than one time, be repeated, and usually this information is not completely known. Natural languages usually have various constructions that express some of this information, through grammatical features like tense and aspect. In Abstract Wikipedia, we need a way to encode all the information about time that functions need in order to generate natural language content. This proposal aims to do this.

Uses

  • In Abstract content, to encode the time of actions.

Structure

This proposal is composed of two types, Unit of time of action and Time of action.

Unit of time of action

This type is composed of the following keys:

  • start (Wikidata time (Z6064)): the starting time of the action (with uncertainty).
  • end (Wikidata time (Z6064)): the ending time of the action (with uncertainty relative to the start, i.e. what would be the uncertainty if we knew that the event starts exactly in the start time). Equal to start if the action is istantaneous.
  • start of influence (Wikidata time (Z6064)): the time in which the action starts to exercise its influence (for example, in which people have to prepare in some way in order to execute the action). If the action has no influence before the start, this field should be equal to the start. The uncertainty is relative to the start.
  • end of influence (Wikidata time (Z6064)): the time in which the action end to exercise its influence. If the action has no influence after the end, this field should be equal to the end. The uncertainty is relative to the end.
  • number of repetitions before (Wikidata quantity (Z6010)): the number of times the event has been repeated before the given time. Its value should be 0 if it is the first (or only) time the action happens. The unit should be always 1 (Q199).
  • number of repetitions after (Wikidata quantity (Z6010)): the number of times the event has been repeated after the given time. Its value should be 0 if it is the last (or only) time the action happens. The unit should be always 1 (Q199).
  • time between repetitions (Wikidata quantity (Z6010)): the time between two consecutive repetitions. Its unit should be a time, ideally an element of Wikidata time precision (Z6062). Set to 0 if the action doesn't repeat.

Time of action

Should just contain a typed list of Units of type of action.


Example values

The time in which Douglas Adams was an author (taken from Wikipedia):

    • start: September 1962
    • end: 11 May 2001
    • start of influence: September 1962
    • end of influence: 11 May 2001
    • number of repetitions before: 0
    • number of repetitions after: 0
    • time between repetitions: 0

The time in which the sun rises:

    • start: 17 May 2026, 6h ± 6h [Example2 1]
    • end: 17 May 2026, 6:01 ± 1min
    • start of influence: 17 May 2026, 5:20 ± 8min
    • end of influence: 17 May 2026, 6:01
    • number of repetitions before: 1.5e15 ± 5e14
    • number of repetitions after: 1.8e15 ± 8e14
    • time between repetitions: 1 ± 0.03 day
  1. Since the event happens every day, the chosen day is completely arbitrary. We need to discuss how to handle the timezone for timezone-independent times like this one.

Identity

Two … are the same if

Converting to code

Python

JavaScript

Display function

Read function

Alternatives

Comments

For general comments, please reply to the proposer.