Skip to content

Commit

Permalink
fix:domain engine from config (#44)
Browse files Browse the repository at this point in the history
* fix:domain engine from config

* fix:domain engine from config
  • Loading branch information
JarbasAl authored Jan 29, 2025
1 parent f5eb596 commit 6a67485
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ovos_padatious/opm.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class PadatiousPipeline(ConfidenceMatcherPipeline):

def __init__(self, bus: Optional[Union[MessageBusClient, FakeBus]] = None,
config: Optional[Dict] = None,
engine_class: Optional[PadatiousEngine] = IntentContainer):
engine_class: Optional[PadatiousEngine] = None):

super().__init__(bus, config)
self.lock = RLock()
Expand All @@ -273,8 +273,8 @@ def __init__(self, bus: Optional[Union[MessageBusClient, FakeBus]] = None,
self.conf_med = self.config.get("conf_med") or 0.8
self.conf_low = self.config.get("conf_low") or 0.5

if engine_class is None and self.config.get("domain_engine"):
engine_class = DomainIntentContainer
engine_class = engine_class or DomainIntentContainer if self.config.get("domain_engine") else IntentContainer
LOG.info(f"Padatious class: {engine_class.__name__}")

self.remove_punct = self.config.get("cast_to_ascii", False)
use_stemmer = self.config.get("stem", False)
Expand Down

0 comments on commit 6a67485

Please sign in to comment.