Skip to content

Commit

Permalink
Merge pull request #90 from snipsco/release/0.59.0
Browse files Browse the repository at this point in the history
Release 0.59.0
  • Loading branch information
adrienball authored Oct 2, 2018
2 parents 5abd87c + c278b3f commit 0a1e111
Show file tree
Hide file tree
Showing 67 changed files with 2,548 additions and 416 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Changelog
All notable changes to this project will be documented in this file.

## [0.59.0] - 2018-10-02
### Added
- Support for 3 new builtin entities: `snips/musicAlbum`, `snips/musicArtist` and `snips/musicTrack`
- Introduction of a `GazetterParser`, which allows to parse gazetteer entities
- API to persist and load a `BuiltinEntityParser`

### Changed
- The `BuiltinEntityParser` parsing API now returns a `Result`
- The `BuiltinEntityParser` object is now built with a `BuiltinEntityParserLoader`


## [0.58.0] - 2018-09-27
### Added
- Limited support of Italian for: AmountOfMoney, Duration, Number, Ordinal, Temperature, Time, Percentage
Expand Down Expand Up @@ -77,6 +88,7 @@ All notable changes to this project will be documented in this file.
### Changed
- Updated Rustling ontology to `0.16.4`

[0.59.0]: https://github.com/snipsco/snips-nlu-ontology/compare/0.58.0...0.59.0
[0.58.0]: https://github.com/snipsco/snips-nlu-ontology/compare/0.57.3...0.58.0
[0.57.3]: https://github.com/snipsco/snips-nlu-ontology/compare/0.57.2...0.57.3
[0.57.2]: https://github.com/snipsco/snips-nlu-ontology/compare/0.57.1...0.57.2
Expand Down
177 changes: 118 additions & 59 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Snips NLU Ontology
Ontology of the Snips NLU library API which describes supported languages and builtin entities.
Please refer to `this page <platforms/snips-nlu-ontology-python>`_ for the python wrapper.

Ontology version: 0.6.0
Ontology version: 0.7.0

Supported languages
-------------------
Expand All @@ -36,64 +36,80 @@ Supported languages
Supported builtin entities
--------------------------

+---------------+---------------------+---------------------+
| Entity | Identifier | Supported languages |
+===============+=====================+=====================+
| AmountOfMoney | snips/amountOfMoney | | German |
| | | | English |
| | | | Spanish |
| | | | French |
| | | | Italian |
| | | | Japanese |
| | | | Korean |
+---------------+---------------------+---------------------+
| Time | snips/datetime | | German |
| | | | English |
| | | | Spanish |
| | | | French |
| | | | Italian |
| | | | Japanese |
| | | | Korean |
+---------------+---------------------+---------------------+
| Duration | snips/duration | | German |
| | | | English |
| | | | Spanish |
| | | | French |
| | | | Italian |
| | | | Japanese |
| | | | Korean |
+---------------+---------------------+---------------------+
| Number | snips/number | | German |
| | | | English |
| | | | Spanish |
| | | | French |
| | | | Italian |
| | | | Japanese |
| | | | Korean |
+---------------+---------------------+---------------------+
| Ordinal | snips/ordinal | | German |
| | | | English |
| | | | Spanish |
| | | | French |
| | | | Italian |
| | | | Japanese |
| | | | Korean |
+---------------+---------------------+---------------------+
| Percentage | snips/percentage | | German |
| | | | English |
| | | | Spanish |
| | | | French |
| | | | Italian |
| | | | Japanese |
+---------------+---------------------+---------------------+
| Temperature | snips/temperature | | German |
| | | | English |
| | | | Spanish |
| | | | French |
| | | | Italian |
| | | | Japanese |
| | | | Korean |
+---------------+---------------------+---------------------+
+---------------+---------------------+---------------------+---------------------+
| Entity | Identifier | Category | Supported languages |
+===============+=====================+=====================+=====================+
| AmountOfMoney | snips/amountOfMoney | `Grammar Entity`_ | | German |
| | | | | English |
| | | | | Spanish |
| | | | | French |
| | | | | Italian |
| | | | | Japanese |
| | | | | Korean |
+---------------+---------------------+---------------------+---------------------+
| Time | snips/datetime | `Grammar Entity`_ | | German |
| | | | | English |
| | | | | Spanish |
| | | | | French |
| | | | | Italian |
| | | | | Japanese |
| | | | | Korean |
+---------------+---------------------+---------------------+---------------------+
| Duration | snips/duration | `Grammar Entity`_ | | German |
| | | | | English |
| | | | | Spanish |
| | | | | French |
| | | | | Italian |
| | | | | Japanese |
| | | | | Korean |
+---------------+---------------------+---------------------+---------------------+
| MusicAlbum | snips/musicAlbum | `Gazetteer Entity`_ | | French |
+---------------+---------------------+---------------------+---------------------+
| MusicArtist | snips/musicArtist | `Gazetteer Entity`_ | | French |
+---------------+---------------------+---------------------+---------------------+
| MusicTrack | snips/musicTrack | `Gazetteer Entity`_ | | French |
+---------------+---------------------+---------------------+---------------------+
| Number | snips/number | `Grammar Entity`_ | | German |
| | | | | English |
| | | | | Spanish |
| | | | | French |
| | | | | Italian |
| | | | | Japanese |
| | | | | Korean |
+---------------+---------------------+---------------------+---------------------+
| Ordinal | snips/ordinal | `Grammar Entity`_ | | German |
| | | | | English |
| | | | | Spanish |
| | | | | French |
| | | | | Italian |
| | | | | Japanese |
| | | | | Korean |
+---------------+---------------------+---------------------+---------------------+
| Percentage | snips/percentage | `Grammar Entity`_ | | German |
| | | | | English |
| | | | | Spanish |
| | | | | French |
| | | | | Italian |
| | | | | Japanese |
+---------------+---------------------+---------------------+---------------------+
| Temperature | snips/temperature | `Grammar Entity`_ | | German |
| | | | | English |
| | | | | Spanish |
| | | | | French |
| | | | | Italian |
| | | | | Japanese |
| | | | | Korean |
+---------------+---------------------+---------------------+---------------------+

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
----------------
Expand Down Expand Up @@ -156,6 +172,45 @@ Duration
}
]
----------
MusicAlbum
----------

.. code-block:: json
[
{
"kind": "MusicAlbum",
"value": "Discovery"
}
]
-----------
MusicArtist
-----------

.. code-block:: json
[
{
"kind": "MusicArtist",
"value": "Daft Punk"
}
]
----------
MusicTrack
----------

.. code-block:: json
[
{
"kind": "MusicTrack",
"value": "Harder Better Faster Stronger"
}
]
------
Number
------
Expand Down Expand Up @@ -214,3 +269,7 @@ Temperature
}
]
.. _compositionality: https://en.wikipedia.org/wiki/Principle_of_compositionality
.. _Rustling: https://github.com/snipsco/rustling-ontology
.. _duckling: https://github.com/facebook/duckling
.. _gazetteer entity parser: https://github.com/snipsco/gazetteer-entity-parser
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parsers_metadata": [
{
"entity_identifier": "snips/musicArtist",
"entity_parser": "parser_1"
},
{
"entity_identifier": "snips/musicTrack",
"entity_parser": "parser_2"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"0.5.0-SNAPSHOT","parser_filename":"parser","threshold":0.6,"stop_words":[],"edge_cases":[]}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"0.5.0-SNAPSHOT","parser_filename":"parser","threshold":0.7,"stop_words":[],"edge_cases":[]}
Binary file not shown.
4 changes: 4 additions & 0 deletions data/tests/builtin_entity_parser/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"language": "fr",
"gazetteer_parser": "gazetteer_entity_parser"
}
3 changes: 3 additions & 0 deletions data/tests/builtin_entity_parser_no_gazetteer/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"language": "en"
}
12 changes: 12 additions & 0 deletions data/tests/builtin_gazetteer_parser/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parsers_metadata": [
{
"entity_identifier": "snips/musicArtist",
"entity_parser": "parser_1"
},
{
"entity_identifier": "snips/musicTrack",
"entity_parser": "parser_2"
}
]
}
1 change: 1 addition & 0 deletions data/tests/builtin_gazetteer_parser/parser_1/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"0.5.0-SNAPSHOT","parser_filename":"parser","threshold":0.6,"stop_words":[],"edge_cases":[]}
Binary file added data/tests/builtin_gazetteer_parser/parser_1/parser
Binary file not shown.
1 change: 1 addition & 0 deletions data/tests/builtin_gazetteer_parser/parser_2/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"0.5.0-SNAPSHOT","parser_filename":"parser","threshold":0.7,"stop_words":[],"edge_cases":[]}
Binary file added data/tests/builtin_gazetteer_parser/parser_2/parser
Binary file not shown.
12 changes: 12 additions & 0 deletions data/tests/custom_gazetteer_parser/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parsers_metadata": [
{
"entity_identifier": "music_artist",
"entity_parser": "parser_1"
},
{
"entity_identifier": "music_track",
"entity_parser": "parser_2"
}
]
}
1 change: 1 addition & 0 deletions data/tests/custom_gazetteer_parser/parser_1/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"0.5.0-SNAPSHOT","parser_filename":"parser","threshold":0.6,"stop_words":[],"edge_cases":[]}
Binary file added data/tests/custom_gazetteer_parser/parser_1/parser
Binary file not shown.
1 change: 1 addition & 0 deletions data/tests/custom_gazetteer_parser/parser_2/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"0.5.0-SNAPSHOT","parser_filename":"parser","threshold":0.7,"stop_words":[],"edge_cases":[]}
Binary file added data/tests/custom_gazetteer_parser/parser_2/parser
Binary file not shown.
2 changes: 1 addition & 1 deletion platforms/snips-nlu-ontology-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}
}

version = "0.58.0"
version = "0.59.0"
group = "ai.snips"


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.58.0"
version = "0.59.0"
group = "ai.snips"


Expand Down
1 change: 0 additions & 1 deletion platforms/snips-nlu-ontology-python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
setuptools_rust==0.8.4
twine==1.11.0
wheel==0.30.0
1 change: 1 addition & 0 deletions platforms/snips-nlu-ontology-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

required = [
"future==0.16.0",
"pathlib==1.0.1; python_version < '3.4'",
"wheel==0.30.0"
]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
[package]
name = "snips-nlu-ontology-rs"
version = "0.58.0"
version = "0.59.0"
authors = ["Adrien Ball <[email protected]>"]

[dependencies]
failure = "0.1"
ffi-utils = { git = "https://github.com/snipsco/snips-utils-rs", rev = "4292ad9" }
lazy_static = "1.0"
libc = "0.2"
snips-nlu-ontology = { git = "https://github.com/snipsco/snips-nlu-ontology", tag = "0.58.0" }
snips-nlu-ontology-ffi-macros = { git = "https://github.com/snipsco/snips-nlu-ontology", tag = "0.58.0" }
snips-nlu-ontology-parsers-ffi-macros = { git = "https://github.com/snipsco/snips-nlu-ontology", tag = "0.58.0" }
snips-nlu-ontology = { git = "https://github.com/snipsco/snips-nlu-ontology", tag = "0.59.0" }
snips-nlu-ontology-ffi-macros = { git = "https://github.com/snipsco/snips-nlu-ontology", tag = "0.59.0" }
snips-nlu-ontology-parsers-ffi-macros = { git = "https://github.com/snipsco/snips-nlu-ontology", tag = "0.59.0" }

[lib]
name = "snips_nlu_ontology_rs"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#[macro_use]
extern crate failure;
#[macro_use]
extern crate lazy_static;
extern crate libc;
extern crate snips_nlu_ontology;
#[macro_use]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
from __future__ import absolute_import

from snips_nlu_ontology.builtin_entities import (
BuiltinEntityParser, get_all_languages, get_all_builtin_entities,
get_supported_entities, get_ontology_version, get_builtin_entity_examples)
get_all_builtin_entities, get_all_gazetteer_entities,
get_all_grammar_entities, get_all_languages, get_builtin_entity_examples,
get_builtin_entity_shortname, get_ontology_version, get_supported_entities,
get_supported_gazetteer_entities, get_supported_grammar_entities)
from snips_nlu_ontology.builtin_entity_parser import BuiltinEntityParser
from snips_nlu_ontology.gazetteer_entity_parser import GazetteerEntityParser
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.58.0
0.59.0
Loading

0 comments on commit 0a1e111

Please sign in to comment.