From 05ecd719789cd419fcbc0ed082c2119c1e9bc517 Mon Sep 17 00:00:00 2001 From: hexastack Date: Thu, 28 Nov 2024 20:13:47 +0100 Subject: [PATCH] fix: revert to default slot value --- nlu/models/slot_filler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nlu/models/slot_filler.py b/nlu/models/slot_filler.py index 5789ee56..917fa883 100644 --- a/nlu/models/slot_filler.py +++ b/nlu/models/slot_filler.py @@ -266,6 +266,8 @@ class SlotFiller(tfbp.Model): #Post Processing synonym_map = self.get_synonym_map() final_slot_value = synonym_map.get(slot_value) + if final_slot_value is None: + final_slot_value = slot_value # Calculate entity start and end indices entity = {