From ddb40c074d7ac97233c70028d01d245137d7cab2 Mon Sep 17 00:00:00 2001 From: Martin Klotz Date: Mon, 14 Aug 2023 15:17:43 +0200 Subject: [PATCH 1/2] fixes #124 -- updated extraction of matching node id --- src/manipulator/map_annos.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/manipulator/map_annos.rs b/src/manipulator/map_annos.rs index 38467ca2..563f0975 100644 --- a/src/manipulator/map_annos.rs +++ b/src/manipulator/map_annos.rs @@ -77,7 +77,10 @@ impl MapAnnos { graphannis::corpusstorage::ResultOrder::NotSorted, )?; for m in search_results { - let matching_nodes = m.split(' ').map(|s| s.to_string()).collect_vec(); + let matching_nodes = m + .split(' ') + .filter_map(|s| s.rsplit("::").last()) + .collect_vec(); let target = rule.target - 1; if let Some(node_name) = matching_nodes.get(target) { update.add_event(UpdateEvent::AddNodeLabel { From d943b770e2fae2d28f876aa0bceff22e98bd55a7 Mon Sep 17 00:00:00 2001 From: Martin Klotz Date: Mon, 14 Aug 2023 15:18:54 +0200 Subject: [PATCH 2/2] update --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e52e4f8f..da2019e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- mapping annotations now correctly extracts the id of the node to apply a new annotation to + ## [0.3.1] - 2023-08-04 ### Fixed