diff options
Diffstat (limited to 'meta-offline-voice-agent/recipes-python/python3-snips-inference/files/0001-Update-dependencies-in-snips-nlu-parsers.patch')
-rw-r--r-- | meta-offline-voice-agent/recipes-python/python3-snips-inference/files/0001-Update-dependencies-in-snips-nlu-parsers.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/meta-offline-voice-agent/recipes-python/python3-snips-inference/files/0001-Update-dependencies-in-snips-nlu-parsers.patch b/meta-offline-voice-agent/recipes-python/python3-snips-inference/files/0001-Update-dependencies-in-snips-nlu-parsers.patch new file mode 100644 index 00000000..8ce47c32 --- /dev/null +++ b/meta-offline-voice-agent/recipes-python/python3-snips-inference/files/0001-Update-dependencies-in-snips-nlu-parsers.patch @@ -0,0 +1,67 @@ +From 851b7f6ec979663850f8ea060379d53e94d36874 Mon Sep 17 00:00:00 2001 +From: Anuj Solanki <anuj603362@gmail.com> +Date: Wed, 9 Oct 2024 12:12:36 +0530 +Subject: [PATCH] Update dependencies in snips-nlu-parsers + + - Use the latest `gazetteer-entity-parser`. + - Change `snips-nlu-parsers-ffi-macros` to a local path. + +Upstream-Status: Inaproppriate. +Signed-off-by: Anuj Solanki <anuj603362@gmail.com> +--- + Cargo.toml | 2 +- + python/ffi/Cargo.toml | 2 +- + src/gazetteer_parser.rs | 5 +++-- + 3 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/Cargo.toml b/Cargo.toml +index 29243eb..176c637 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -19,7 +19,7 @@ lazy_static = "1" + regex = "1" + serde = { version = "1", features = ["derive"] } + serde_json = "1" +-gazetteer-entity-parser = { git = "https://github.com/snipsco/gazetteer-entity-parser", tag = "0.8.0" } ++gazetteer-entity-parser = { git = "https://github.com/snipsco/gazetteer-entity-parser" } + rustling-ontology = { git = "https://github.com/snipsco/rustling-ontology", tag = "0.19.3" } + snips-nlu-ontology = { git = "https://github.com/snipsco/snips-nlu-ontology", tag = "0.67.1" } + snips-nlu-utils = { git = "https://github.com/snipsco/snips-nlu-utils", tag = "0.9.1" } +diff --git a/python/ffi/Cargo.toml b/python/ffi/Cargo.toml +index 6b7308d..ccbcbf7 100644 +--- a/python/ffi/Cargo.toml ++++ b/python/ffi/Cargo.toml +@@ -12,6 +12,6 @@ crate-type = ["cdylib"] + failure = "0.1" + libc = "0.2" + ffi-utils = { git = "https://github.com/snipsco/snips-utils-rs", rev = "291ce1d" } +-snips-nlu-parsers-ffi-macros = { git = "https://github.com/snipsco/snips-nlu-parsers", tag = "0.4.3" } ++snips-nlu-parsers-ffi-macros = { path = "../../ffi/ffi-macros" } + snips-nlu-ontology = { git = "https://github.com/snipsco/snips-nlu-ontology", tag = "0.67.1" } + snips-nlu-ontology-ffi-macros = { git = "https://github.com/snipsco/snips-nlu-ontology", tag = "0.67.1" } +diff --git a/src/gazetteer_parser.rs b/src/gazetteer_parser.rs +index 607bbd1..ddf06a7 100644 +--- a/src/gazetteer_parser.rs ++++ b/src/gazetteer_parser.rs +@@ -64,7 +64,8 @@ impl GazetteerParser<BuiltinGazetteerEntityKind> { + "Cannot find gazetteer parser for entity '{:?}'", + entity_kind + ) +- }) ++ })?; ++ Ok(()) + } + } + +@@ -147,7 +148,7 @@ where + .map(|parser| { + Ok(parser + .parser +- .run(&sentence.to_lowercase(), max_alternative_resolved_values)? ++ .run(&sentence.to_lowercase(), max_alternative_resolved_values) + .into_iter() + .map(|parsed_value| GazetteerEntityMatch { + value: substring_with_char_range(sentence.to_string(), &parsed_value.range), +-- +2.39.5 (Apple Git-154) + |