Skip to content

Temporal Information Knowledge Model

Overview

The Temporal Information Knowledge Model (display name: Temporal Information EN v#) identifies and returns—in normalized format—the following time expressions:

Expression type Description Examples
Time point A specific time The Declaration was signed on July 4, 1776.

The plane should take off at 3PM.

In November 1996 I traveled to the United States.

A big change took place in 2016.
Time span An amount of time units, from minutes up to years It took her three minutes to find the solution.

Your condition will continue to improve over the next two weeks.

I have known her for more than ten years.
Time interval A time interval (from ... to ...) He ruled the region from July 2005 to September 2011.

The model returns information as linked data in JSON-LD format (see also https://json-ld.org/).

Value normalization

Time points

Time point expressions are normalized according to the ISO 8601 standard. Here are some examples of value normalization:

  • July 4, 17761776-07-04
  • 3PM-----T15
  • November 19961996-11
  • 20162016

Time spans

Time span expressions are normalized using this format:

[ sign ] quantity unit-of-measure

For example:

Seven days7 day

Possible units of measure are:

  • year
  • month
  • day
  • hour
  • minute

Quantity can be indefinite, for example:

For some months I've been skeptical, but now I believe it.indefinite month

Weeks are returned as days, centuries as years, etc. For example:

Two weeks14 day

The optional sign can be + (plus sign) or - (minus sign) and denotes time spans that "add" or "subtract" time from an explicit or implicit time point. For example:

  • The first agreement was in 2009. After eight years the companies merged.+ 8 year, meaning eight years after 2009
  • These events took place 30 years ago.- 30 year, meaning thirty years before a time that was "this year"—but not further specified—for the writer or speaker.

Time intervals

Time interval expression are normalized using this format:

"from" time point / "to" time point

Left and right time points are normalized according to the ISO 8601 standard. For example:

from July 2005 to September 20112005-07/2011-09

Derived time points

The Temporal Information model is also capable of deriving time points from deixes referring to other time points.

In particular, the model can derive a time point from:

  • "Before/after" expressions that are recognized as time spans and referred to a time point

    For example, in:

    I first traveled to Australia in 2002 and returned fifteen years later.

    the expression fifteen years later is not recognizable as a time point by itself, but is recognized as a time span (normalized to + 15 year) and, once referred to 2002—which is recognized as a time point—, makes the model derive a new time point by adding the time span. In this case the new time point is 2017, which is 2002 + 15.

  • "Equal to" expressions referred to a time point

    For example, in:

    We met on July 27, 2014. On the same day we became business partners.

    the expression On the same day is not recognizable as a time point by itself, but once referred to July 27, 2014—which is recognized as a time point—and interpreted as "the same", makes the model derive another occurrence of the explicit time point, in this case 2014-07-27.

Derived time points are flagged as such in the output.

Output structure

The model output has the same structure as any other model and is affected by the functional properties of the workflow block.
The peculiar part of the output is the extraData object: to have extraData it's necessary to turn on the Output rules extra data functional option of the workflow block.

Temporal information is inside the JSON-LD property of the extraData object and it's a JSON-LD object.

Given this input text:

I first traveled to Australia in 2004. I returned seven years later. After that, I lived in New Zealand from February 2013 to November 2014.

the extraData object in output will be like this:

"extraData": {
    "script-version": "v1.1.0 rev. 2021-07-20T13:58:19.796Z",
    "JSON-LD": {
        "@context": {
            ...
        },
        "@graph": {
            "@id": "TemporalInformation",
            "items": [
                {
                    "@id": "3411a0251418664029e3e2c6cb01f70b",
                    "@type": "schema:PropertyValue",
                    "name": "TimePoint",
                    "value": "2004",
                    "matches": [
                        {
                            "@id": "008743bc89848b9d52537c9b52362e27",
                            "start": 33,
                            "end": 37,
                            "sentence": 0,
                            "text": "2004"
                        }
                    ]
                },
                {
                    "@id": "3a495e7fda460928c1f56a022d519d54",
                    "@type": "schema:PropertyValue",
                    "name": "TimePoint",
                    "value": "2011",
                    "matches": [
                        {
                            "@id": "1fd2bcd8b1f2b96fc4c15e7447e6c634",
                            "start": 50,
                            "end": 67,
                            "sentence": 1,
                            "text": "seven years later",
                            "derived": true,
                            "referenceTimePoint": "008743bc89848b9d52537c9b52362e27",
                            "referenceTimeSpan": "11620a7b84820db2e05f8824fd4b10cd"
                        }
                    ]
                },
                {
                    "@id": "42850d057130d3162cf6f8f0707bcc3e",
                    "@type": "schema:PropertyValue",
                    "name": "TimeInterval",
                    "value": "2013-02/2014-11",
                    "matches": [
                        {
                            "@id": "d745613c4b3b182f73cc0173e26879fd",
                            "start": 104,
                            "end": 139,
                            "sentence": 2,
                            "text": "from February 2013 to November 2014"
                        }
                    ]
                },
                {
                    "@id": "e7d7ffa0181dba4317d6077d873e7675",
                    "@type": "schema:PropertyValue",
                    "name": "TimePoint",
                    "value": "2013-02",
                    "matches": [
                        {
                            "@id": "766fe2f27808dccabba5f7fb065248d8",
                            "start": 104,
                            "end": 122,
                            "sentence": 2,
                            "text": "from February 2013"
                        }
                    ]
                },
                {
                    "@id": "6a5825809662d2ca7d7f851f95349cac",
                    "@type": "schema:PropertyValue",
                    "name": "TimePoint",
                    "value": "2014-11",
                    "matches": [
                        {
                            "@id": "f9cdca3b7b7e5e0614d717a2e03dc2e7",
                            "start": 123,
                            "end": 139,
                            "sentence": 2,
                            "text": "to November 2014"
                        }
                    ]
                },
                {
                    "@id": "a5f53924b0dc85e3f44a02dbf2f2ddc1",
                    "@type": "schema:PropertyValue",
                    "name": "TimeSpan",
                    "value": "+ 7 year",
                    "matches": [
                        {
                            "@id": "11620a7b84820db2e05f8824fd4b10cd",
                            "start": 50,
                            "end": 67,
                            "sentence": 1,
                            "text": "seven years later"
                        }
                    ]
                }
            ]
        }
    }
}

where:

  • script-version is the version of the software module used by the model to derive time points and for value normalization, normally it can be ignored.
  • JSON-LD is a JSON-LD object. For the description of the JSON-LD format refer to the official documentation.
  • The @graph property of the JSON-LD object has two properties:

    • @id: object identifier, is always TemporalInformation
    • items: array containing the temporal information

Detected temporal information is stored in the items array of the @graph property.
Each member of the array represents all the detected instances of a temporal information.
Item properties are:

  • @id: unique identifier
  • @type: schema.org type
  • name: type of time expression, which is:

    • TimePoint for time points, even if derived
    • TimeSpan for time spans
    • TimeInterval for time intervals
  • value: normalized information value

  • matches: occurrences of the information in the text. Each array item corresponds to a part of the text and has these properties:

    • @id: unique identifier
    • start: zero-based position of the first character of the portion of text expressing the information
    • end: zero-based position of the character after the last of the portion of text expressing the information
    • sentence: index inside the sentences array of the sentence containing the occurrence
    • text: portion of text expressing the information
    • (Optional, for time points) derived: when this property is present, its value is always true, indicating the match refers to a time point that has been derived from other time expressions
    • (Optional, for time spans) indefiniteQuantity: when present, its value is the portion of text that expresses the indefinite quantity, for example the word some
    • (Optional, for time spans) duration: when present, its value is the portion of text indicating the time span represents a duration, for example the word for in for seven years
    • (Optional, for derived time points) referenceTimePoint: the @id value of the items array member with name equal to TimePoint acting as the base time point from which the match was derived
    • (Optional, for derived time points) referenceTimeSpan: the @id value of the items array member with name equal to TimeSpan acting as the time span added to—or subtracted—from the base time point to derive the match