Skip to content

Commit

Permalink
Merge pull request #33 from snipsco/release/0.6.0
Browse files Browse the repository at this point in the history
Release/0.6.0
  • Loading branch information
ClemDoum authored Feb 21, 2018
2 parents 1d33c77 + 833e08d commit faceba9
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
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-utils"
version = "0.5.3"
version = "0.6.0"
authors = ["Adrien Ball <adrien.ball@snips.ai>"]

[dependencies]
Expand Down
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2018 Snips

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2 changes: 1 addition & 1 deletion python/snips_nlu_utils/__version__
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.3
0.6.0
4 changes: 2 additions & 2 deletions python/snips_nlu_utils_py/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "snips-nlu-utils-py"
version = "0.5.3"
version = "0.6.0"
authors = ["Adrien Ball <adrien.ball@snips.ai>"]

[lib]
name = "_snips_nlu_utils_py"
crate-type = ["cdylib"]

[dependencies]
snips-nlu-utils = { git = "https://github.com/snipsco/snips-nlu-utils", tag = "0.5.3" }
snips-nlu-utils = { git = "https://github.com/snipsco/snips-nlu-utils", tag = "0.6.0" }
cpython = { version="0.1", default-features=false }
12 changes: 7 additions & 5 deletions src/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@ macro_rules! language_enum {
}
}

language_enum!([DE, EN, ES, FR, KO]);
language_enum!([DE, EN, ES, FR, JA, KO]);

impl FromStr for Language {
type Err = String;
fn from_str(it: &str) -> Result<Language, Self::Err> {
match &*it.to_lowercase() {
"de" => Ok(Language::DE),
"en" => Ok(Language::EN),
"fr" => Ok(Language::FR),
"es" => Ok(Language::ES),
"fr" => Ok(Language::FR),
"ja" => Ok(Language::JA),
"ko" => Ok(Language::KO),
"de" => Ok(Language::DE),
_ => Err(format!("Unknown language {}", it)),
}
}
Expand All @@ -40,11 +41,12 @@ impl FromStr for Language {
impl ToString for Language {
fn to_string(&self) -> String {
match *self {
Language::DE => "de".to_string(),
Language::EN => "en".to_string(),
Language::FR => "fr".to_string(),
Language::ES => "es".to_string(),
Language::FR => "fr".to_string(),
Language::JA => "ja".to_string(),
Language::KO => "ko".to_string(),
Language::DE => "de".to_string(),
}
}
}
Expand Down

0 comments on commit faceba9

Please sign in to comment.