From 817a6c9f42af8c154a7a595ef8882deb2ac92c77 Mon Sep 17 00:00:00 2001
From: Bartosz Walkowiak <bwalkow@e-science.pl>
Date: Fri, 10 Feb 2023 14:11:15 +0000
Subject: [PATCH] Update main.py

---
 main.py | 78 ++++++++++++++++++++++++++++-----------------------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/main.py b/main.py
index d92cf40..3990512 100644
--- a/main.py
+++ b/main.py
@@ -1,39 +1,39 @@
-"""Implementation of anonymizer service."""
-import nlp_ws
-from src.worker_old import Worker
-import logging
-import nlp_ws
-
-_log = logging.getLogger(__name__)
-
-
-class AnonymizerWorker(nlp_ws.NLPWorker):
-    """Class implementing TextFixerWorker worker."""
-
-    @classmethod
-    def static_init(cls, config):
-        """Initialize process."""
-        cls._configuration = config.get("tool").get("configuration", "ccl")
-        cls._default_language = config.get("tool").get("default_language", "pl")
-        cls._default_replacer = config.get("tool").get("default_replacer", "tag")
-
-        _log.info(
-            "AnonymizerWorker initialized with configuration: %s, default language: %s, default replacer: %s",
-            cls._configuration,
-            cls._default_language,
-            cls._default_replacer,
-        )
-
-    def __init__(self):
-        self._worker = Worker(
-            configuration=self._configuration,
-            default_language=self._default_language,
-            default_replacer=self._default_replacer,
-        )
-
-    def process(self, input_file, task_options, output_file):
-        self._worker.process(input_file, task_options, output_file)
-
-
-if __name__ == "__main__":
-    nlp_ws.NLPService.main(AnonymizerWorker, pause_at_exit=False)
+"""Implementation of anonymizer service."""
+import nlp_ws
+from src.worker import Worker
+import logging
+import nlp_ws
+
+_log = logging.getLogger(__name__)
+
+
+class AnonymizerWorker(nlp_ws.NLPWorker):
+    """Class implementing TextFixerWorker worker."""
+
+    @classmethod
+    def static_init(cls, config):
+        """Initialize process."""
+        cls._configuration = config.get("tool").get("configuration", "ccl")
+        cls._default_language = config.get("tool").get("default_language", "pl")
+        cls._default_replacer = config.get("tool").get("default_replacer", "tag")
+
+        _log.info(
+            "AnonymizerWorker initialized with configuration: %s, default language: %s, default replacer: %s",
+            cls._configuration,
+            cls._default_language,
+            cls._default_replacer,
+        )
+
+    def __init__(self):
+        self._worker = Worker(
+            configuration=self._configuration,
+            default_language=self._default_language,
+            default_replacer=self._default_replacer,
+        )
+
+    def process(self, input_file, task_options, output_file):
+        self._worker.process(input_file, task_options, output_file)
+
+
+if __name__ == "__main__":
+    nlp_ws.NLPService.main(AnonymizerWorker, pause_at_exit=False)
-- 
GitLab