Skip to content

Commit

Permalink
Merge pull request #134 from snipsco/release/0.64.5
Browse files Browse the repository at this point in the history
Release 0.64.5
  • Loading branch information
adrienball authored Apr 2, 2019
2 parents ebd3f74 + db245c0 commit af32574
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 32 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.

## [0.64.5] - 2019-04-02
### Fixed
- Make the json serialization of kotlin object the same as the rust one

## [0.64.4] - 2019-02-28
### Fixed
- Portuguese builtin entity examples
Expand Down Expand Up @@ -160,6 +164,7 @@ All notable changes to this project will be documented in this file.
### Changed
- Updated Rustling ontology to `0.16.4`

[0.64.5]: https://github.com/snipsco/snips-nlu-ontology/compare/0.64.4...0.64.5
[0.64.4]: https://github.com/snipsco/snips-nlu-ontology/compare/0.64.3...0.64.4
[0.64.3]: https://github.com/snipsco/snips-nlu-ontology/compare/0.64.2...0.64.3
[0.64.2]: https://github.com/snipsco/snips-nlu-ontology/compare/0.64.1...0.64.2
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snips-nlu-ontology"
version = "0.64.4"
version = "0.64.5"
authors = [
"Adrien Ball <[email protected]>",
"Thibaut Lorrain <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion doc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snips-nlu-ontology-doc"
version = "0.64.4"
version = "0.64.5"
authors = ["Adrien Ball <[email protected]>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion ffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snips-nlu-ontology-ffi"
version = "0.64.4"
version = "0.64.5"
authors = ["Kevin Lefevre <[email protected]>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion ffi/ffi-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snips-nlu-ontology-ffi-macros"
version = "0.64.4"
version = "0.64.5"
authors = [
"Kevin Lefevre <[email protected]>",
"Thibaut Lorrain <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion platforms/kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}
}

version = "0.64.4"
version = "0.64.5"
group = "ai.snips"


Expand Down
2 changes: 1 addition & 1 deletion platforms/kotlin/snips-nlu-ontology-export/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.64.4"
version = "0.64.5"
group = "ai.snips"


Expand Down
58 changes: 32 additions & 26 deletions platforms/kotlin/src/main/kotlin/ai/snips/nlu/ontology/Ontology.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import ai.snips.nlu.ontology.SlotValue.Type.ORDINAL
import ai.snips.nlu.ontology.SlotValue.Type.PERCENTAGE
import ai.snips.nlu.ontology.SlotValue.Type.TEMPERATURE
import ai.snips.nlu.ontology.SlotValue.Type.TIME_INTERVAL
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.annotation.JsonSubTypes
import com.fasterxml.jackson.annotation.JsonSubTypes.Type
import com.fasterxml.jackson.annotation.JsonTypeInfo
Expand All @@ -49,37 +51,41 @@ enum class Precision { APPROXIMATE, EXACT }
enum class Grain { YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND }

// TODO : add converters to JSR310 / ThreeTen types
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "kind")
@JsonSubTypes(
Type(value = CustomValue::class, name = "CUSTOM"),
Type(value = NumberValue::class, name = "NUMBER"),
Type(value = OrdinalValue::class, name = "ORDINAL"),
Type(value = InstantTimeValue::class, name = "INSTANT_TIME"),
Type(value = TimeIntervalValue::class, name = "TIME_INTERVAL"),
Type(value = AmountOfMoneyValue::class, name = "AMOUNT_OF_MONEY"),
Type(value = TemperatureValue::class, name = "TEMPERATURE"),
Type(value = DurationValue::class, name = "DURATION"),
Type(value = PercentageValue::class, name = "PERCENTAGE"),
Type(value = MusicAlbumValue::class, name = "MUSICALBUM"),
Type(value = MusicArtistValue::class, name = "MUSICARTIST"),
Type(value = MusicTrackValue::class, name = "MUSICTRACK")
Type(value = CustomValue::class, name = "Custom"),
Type(value = NumberValue::class, name = "Number"),
Type(value = OrdinalValue::class, name = "Ordinal"),
Type(value = InstantTimeValue::class, name = "InstantTime"),
Type(value = TimeIntervalValue::class, name = "TimeInterval"),
Type(value = AmountOfMoneyValue::class, name = "AmountOfMoney"),
Type(value = TemperatureValue::class, name = "Temperature"),
Type(value = DurationValue::class, name = "Duration"),
Type(value = PercentageValue::class, name = "Percentage"),
Type(value = MusicAlbumValue::class, name = "MusicAlbum"),
Type(value = MusicArtistValue::class, name = "MusicArtist"),
Type(value = MusicTrackValue::class, name = "MusicTrack")
)
sealed class SlotValue(val type: Type) {
sealed class SlotValue(val kind: Type) {

@JsonIgnore
@Deprecated("use kind instead")
val type = kind

@Parcel
enum class Type {
CUSTOM,
NUMBER,
ORDINAL,
INSTANT_TIME,
TIME_INTERVAL,
AMOUNT_OF_MONEY,
TEMPERATURE,
DURATION,
PERCENTAGE,
MUSICALBUM,
MUSICARTIST,
MUSICTRACK
@JsonProperty("Custom") CUSTOM,
@JsonProperty("Number") NUMBER,
@JsonProperty("Ordinal") ORDINAL,
@JsonProperty("InstantTime") INSTANT_TIME,
@JsonProperty("TimeInterval") TIME_INTERVAL,
@JsonProperty("AmountOfMoney") AMOUNT_OF_MONEY,
@JsonProperty("Temperature") TEMPERATURE,
@JsonProperty("Duration") DURATION,
@JsonProperty("Percentage") PERCENTAGE,
@JsonProperty("MusicAlbum") MUSICALBUM,
@JsonProperty("MusicArtist") MUSICARTIST,
@JsonProperty("MusicTrack") MUSICTRACK
}

@Parcel(BEAN)
Expand Down

0 comments on commit af32574

Please sign in to comment.