From af8a5cee70026d6cb831b486b1c56967be5410e5 Mon Sep 17 00:00:00 2001
From: daxid <david.rouquet@tetras-libre.fr>
Date: Wed, 28 Jun 2023 10:25:45 +0200
Subject: [PATCH] Update WorkData to fix a bug about sentence cleaning

---
 amrbatch/work_data.py       | 1 +
 tests/test_amrbatch_main.py | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/amrbatch/work_data.py b/amrbatch/work_data.py
index 724a49b3..08b4fbb0 100644
--- a/amrbatch/work_data.py
+++ b/amrbatch/work_data.py
@@ -54,6 +54,7 @@ class WorkData:
         # -- Sentence
         self.id_line_str = f'# ::id {self.reference}\n'
         clean_sentence = re.sub("(\.)*\\n", "", sentence)
+        clean_sentence = re.sub("(\.)*", "", clean_sentence)
         self.sentence = f'{clean_sentence}.'
 
         # -- Graph
diff --git a/tests/test_amrbatch_main.py b/tests/test_amrbatch_main.py
index bdf06f4c..7484c948 100644
--- a/tests/test_amrbatch_main.py
+++ b/tests/test_amrbatch_main.py
@@ -26,13 +26,13 @@ from utility import file_cutter
 
 # -- Input Data
 # input_filename = f'08d1b73a-bdf5-4b54-8e6e-b96665f3c2fa.txt'
-input_filename = f'test.txt'
-# input_filename = f'SSC-ABSTRACT.txt'
+# input_filename = f'test.txt'
+input_filename = f'SSC-ABSTRACT.txt'
 input_filepath = f'{INPUT_DIR_PATH}{input_filename}'
 
 
 # -- Output references
-base_output_name = f'Test'
+base_output_name = f'SolarSystem' # f'Test'
 time_ref = f'{datetime.now().strftime("%Y%m%d")}'
 output_dirpath = f'{OUTPUT_DIR_PATH}{base_output_name}-{time_ref}/'
 os.makedirs(output_dirpath, exist_ok=True)
-- 
GitLab