/snips-nlu-ontology

Ontology of Snips NLU

Primary LanguageRustOtherNOASSERTION

Snips NLU Ontology

https://travis-ci.org/snipsco/snips-nlu-ontology.svg?branch=master

Ontology of the Snips NLU library API which describes supported languages and builtin entities.

Supported languages

Language Identifier
German de
English en
Spanish es
French fr
Italian it
Portuguese - Europe pt_pt
Portuguese - Brazil pt_br
Japanese ja
Korean ko

Supported builtin entities

Entity Identifier Category
AmountOfMoney snips/amountOfMoney Grammar Entity
City snips/city Gazetteer Entity
Country snips/country Gazetteer Entity
Date snips/date Grammar Entity
DatePeriod snips/datePeriod Grammar Entity
Datetime snips/datetime Grammar Entity
Duration snips/duration Grammar Entity
MusicAlbum snips/musicAlbum Gazetteer Entity
MusicArtist snips/musicArtist Gazetteer Entity
MusicTrack snips/musicTrack Gazetteer Entity
Number snips/number Grammar Entity
Ordinal snips/ordinal Grammar Entity
Percentage snips/percentage Grammar Entity
Region snips/region Gazetteer Entity
Temperature snips/temperature Grammar Entity
Time snips/time Grammar Entity
TimePeriod snips/timePeriod Grammar Entity

Grammar Entity

Grammar entities, in the context of Snips NLU, correspond to entities which contain significant compositionality. The semantic meaning of such an entity is determined by the meanings of its constituent expressions and the rules used to combine them. Modern semantic parsers for these entities are often based on defining a formal grammar. In the case of Snips NLU, the parser used to handle these entities is Rustling, a Rust adaptation of Facebook's duckling.

Gazetteer Entity

Gazetteer entities correspond to all the builtin entities which do not contain any semantical structure, as opposed to the grammar entities. For such entities, a gazetteer entity parser is used to perform the parsing.

Results Examples

The following sections provide results examples for each builtin entity.

AmountOfMoney

[
  {
    "kind": "AmountOfMoney",
    "value": 10.05,
    "precision": "Approximate",
    "unit": ""
  }
]

City

[
  {
    "kind": "City",
    "value": "Paris"
  }
]

Country

[
  {
    "kind": "Country",
    "value": "France"
  }
]

Date

[
  {
    "kind": "InstantTime",
    "value": "2017-06-13 00:00:00 +02:00",
    "grain": "Day",
    "precision": "Exact"
  }
]

DatePeriod

[
  {
    "kind": "TimeInterval",
    "from": "2017-06-07 00:00:00 +02:00",
    "to": "2017-06-09 00:00:00 +02:00"
  }
]

Datetime

[
  {
    "kind": "InstantTime",
    "value": "2017-06-13 18:00:00 +02:00",
    "grain": "Hour",
    "precision": "Exact"
  },
  {
    "kind": "TimeInterval",
    "from": "2017-06-07 18:00:00 +02:00",
    "to": "2017-06-08 00:00:00 +02:00"
  }
]

Duration

[
  {
    "kind": "Duration",
    "years": 0,
    "quarters": 0,
    "months": 3,
    "weeks": 0,
    "days": 0,
    "hours": 0,
    "minutes": 0,
    "seconds": 0,
    "precision": "Exact"
  }
]

MusicAlbum

[
  {
    "kind": "MusicAlbum",
    "value": "Discovery"
  }
]

MusicArtist

[
  {
    "kind": "MusicArtist",
    "value": "Daft Punk"
  }
]

MusicTrack

[
  {
    "kind": "MusicTrack",
    "value": "Harder Better Faster Stronger"
  }
]

Number

[
  {
    "kind": "Number",
    "value": 42.0
  }
]

Ordinal

[
  {
    "kind": "Ordinal",
    "value": 2
  }
]

Percentage

[
  {
    "kind": "Percentage",
    "value": 20.0
  }
]

Region

[
  {
    "kind": "Region",
    "value": "California"
  }
]

Temperature

[
  {
    "kind": "Temperature",
    "value": 23.0,
    "unit": "celsius"
  },
  {
    "kind": "Temperature",
    "value": 60.0,
    "unit": "fahrenheit"
  }
]

Time

[
  {
    "kind": "InstantTime",
    "value": "2017-06-13 18:00:00 +02:00",
    "grain": "Hour",
    "precision": "Exact"
  }
]

TimePeriod

[
  {
    "kind": "TimeInterval",
    "from": "2017-06-07 18:00:00 +02:00",
    "to": "2017-06-07 20:00:00 +02:00"
  }
]