From 69568d49828d97dd410dab0b8eefd4275e1ea42b Mon Sep 17 00:00:00 2001 From: laurenzzumschlinge Date: Fri, 3 Jul 2026 08:28:21 +0200 Subject: [PATCH 1/4] Add tech-enablement tag to keyword mapping and normalize related raw tags --- src/preprocessing/extract_geo_topic.py | 19 +++++++++++++++++-- src/tests/test_pipeline.py | 25 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/preprocessing/extract_geo_topic.py b/src/preprocessing/extract_geo_topic.py index 39344a4..689c1af 100644 --- a/src/preprocessing/extract_geo_topic.py +++ b/src/preprocessing/extract_geo_topic.py @@ -40,7 +40,12 @@ "Animal-Related", "Water", "Nature", - "Human/Civil Rights" # FIX: War vorher vergessen + "Human/Civil Rights", # FIX: War vorher vergessen + "Technology", + "Digital Transformation", + "Scientific Research and Technology Transfer", + "Innovation", + "tech-enablement" ] # 2. Die zentrale Mapping-Schmiede (Konsolidiert von ~24 auf 13 Hauptkategorien) @@ -57,7 +62,14 @@ "Employment/Workforce": "Socio-economic Development, Poverty", "Social/Human Services": "Socio-economic Development, Poverty", "Recreation, Sport & Well-being": "Health", - "Policy development": "Citizenship, Social Justice & Public Affairs" + "Policy development": "Citizenship, Social Justice & Public Affairs", + + # Technology / Digitalization Mapping to tech-enablement + "Technology": "tech-enablement", + "Digital Transformation": "tech-enablement", + "Scientific Research and Technology Transfer": "tech-enablement", + "Innovation": "tech-enablement", + "tech-enablement": "tech-enablement" } # 3. Die Keyword-Kanten für den Freitext-Fallback (Exakt synchron zu den Normalisierungs-Targets) @@ -116,6 +128,9 @@ ], "Peace & Conflict Resolution": [ r"peacebuilding", r"conflict sensitivity", r"peace work" + ], + "tech-enablement": [ + r"tech\w*", r"technolog\w*", r"digital\w*", r"software", r"data science", r"artificial intelligence", r"ai\b", r"it\b" ] } diff --git a/src/tests/test_pipeline.py b/src/tests/test_pipeline.py index a43ae49..f828e6c 100644 --- a/src/tests/test_pipeline.py +++ b/src/tests/test_pipeline.py @@ -125,6 +125,31 @@ def test_extract_tags_special_boundary(self): extract_tags(members) self.assertEqual(members[0]["tags_focus"], ["Human/Civil Rights"]) + def test_extract_tags_tech_enablement(self): + # 1. Robust path: from official tags + members_robust = [ + { + "name": "Org Tech Robust", + "philea_info": { + "Programme Areas": "Digital Transformation\nEducation" + } + } + ] + extract_tags(members_robust) + self.assertEqual(sorted(members_robust[0]["tags_focus"]), ["Education", "tech-enablement"]) + + # 2. Fallback path: from free text keywords + members_fallback = [ + { + "name": "Org Tech Fallback", + "philea_info": { + "About": "Supporting the development of custom software and ai-driven solutions." + } + } + ] + extract_tags(members_fallback) + self.assertEqual(members_fallback[0]["tags_focus"], ["tech-enablement"]) + def test_extract_geo_taxonomy_matching(self): members = [ { From a44e87a0efabaa38820d58025297b3f2e91b1488 Mon Sep 17 00:00:00 2001 From: lauxenz <47084606+lauxenz@users.noreply.github.com> Date: Fri, 10 Jul 2026 17:54:16 +0200 Subject: [PATCH 2/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/preprocessing/extract_geo_topic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/preprocessing/extract_geo_topic.py b/src/preprocessing/extract_geo_topic.py index 689c1af..43a2b6e 100644 --- a/src/preprocessing/extract_geo_topic.py +++ b/src/preprocessing/extract_geo_topic.py @@ -130,7 +130,8 @@ r"peacebuilding", r"conflict sensitivity", r"peace work" ], "tech-enablement": [ - r"tech\w*", r"technolog\w*", r"digital\w*", r"software", r"data science", r"artificial intelligence", r"ai\b", r"it\b" + r"tech\w*", r"technolog\w*", r"digital\w*", r"software", r"data science", r"artificial intelligence", r"ai\b", + r"\bit\b(?=\s+(systems?|services?|infrastructure|department|team|strategy|support))" ] } From b7d4336294ac4d569a1a9c4f5302d19fc5992970 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Jul 2026 15:56:33 +0000 Subject: [PATCH 3/4] docs: update normalized category count in extract_geo_topic header --- src/preprocessing/extract_geo_topic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preprocessing/extract_geo_topic.py b/src/preprocessing/extract_geo_topic.py index 43a2b6e..b6b4455 100644 --- a/src/preprocessing/extract_geo_topic.py +++ b/src/preprocessing/extract_geo_topic.py @@ -48,7 +48,7 @@ "tech-enablement" ] -# 2. Die zentrale Mapping-Schmiede (Konsolidiert von ~24 auf 13 Hauptkategorien) +# 2. Die zentrale Mapping-Schmiede (Konsolidiert von ~24 auf 14 Hauptkategorien) TAG_NORMALIZATION = { # Schreibweisen-Korrekturen "Arts and Culture": "Arts & Culture", From e8f78cc2dabc210913502e00d697ca4da6be1d68 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Jul 2026 07:46:11 +0000 Subject: [PATCH 4/4] docs: clarify category count includes tech-enablement --- src/preprocessing/extract_geo_topic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preprocessing/extract_geo_topic.py b/src/preprocessing/extract_geo_topic.py index b6b4455..2667325 100644 --- a/src/preprocessing/extract_geo_topic.py +++ b/src/preprocessing/extract_geo_topic.py @@ -48,7 +48,7 @@ "tech-enablement" ] -# 2. Die zentrale Mapping-Schmiede (Konsolidiert von ~24 auf 14 Hauptkategorien) +# 2. Die zentrale Mapping-Schmiede (Konsolidiert von ~24 auf 14 Hauptkategorien inkl. tech-enablement) TAG_NORMALIZATION = { # Schreibweisen-Korrekturen "Arts and Culture": "Arts & Culture",