Skip to content

Commit

Permalink
log not print
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Dec 15, 2024
1 parent f1fb32a commit 1eaa109
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ovos_utterance_corrections_transformer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from ovos_plugin_manager.templates.transformers import UtteranceTransformer
from ovos_utils.parse import match_one, MatchStrategy
from ovos_utils.xdg_utils import xdg_data_home
from ovos_utils.log import LOG


class UtteranceCorrectionsPlugin(UtteranceTransformer):
Expand Down Expand Up @@ -36,7 +37,7 @@ def transform(self, utterances: List[str], context: Optional[dict] = None) -> (l
try:
utterances[idx] = re.sub(pattern, replacement, utterances[idx], flags=flags)
except re.error as e:
print(f"Invalid regex pattern: {pattern} -> {e}")
LOG.error(f"Invalid regex pattern: {pattern} -> {e}")

# Step 3: Replace individual words
if utterances and self.words_db:
Expand Down

0 comments on commit 1eaa109

Please sign in to comment.