Skip to content
Snippets Groups Projects
Commit af8a5cee authored by David Rouquet's avatar David Rouquet
Browse files

Update WorkData to fix a bug about sentence cleaning

parent 108ca865
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,7 @@ class WorkData: ...@@ -54,6 +54,7 @@ class WorkData:
# -- Sentence # -- Sentence
self.id_line_str = f'# ::id {self.reference}\n' self.id_line_str = f'# ::id {self.reference}\n'
clean_sentence = re.sub("(\.)*\\n", "", sentence) clean_sentence = re.sub("(\.)*\\n", "", sentence)
clean_sentence = re.sub("(\.)*", "", clean_sentence)
self.sentence = f'{clean_sentence}.' self.sentence = f'{clean_sentence}.'
# -- Graph # -- Graph
......
...@@ -26,13 +26,13 @@ from utility import file_cutter ...@@ -26,13 +26,13 @@ from utility import file_cutter
# -- Input Data # -- Input Data
# input_filename = f'08d1b73a-bdf5-4b54-8e6e-b96665f3c2fa.txt' # input_filename = f'08d1b73a-bdf5-4b54-8e6e-b96665f3c2fa.txt'
input_filename = f'test.txt' # input_filename = f'test.txt'
# input_filename = f'SSC-ABSTRACT.txt' input_filename = f'SSC-ABSTRACT.txt'
input_filepath = f'{INPUT_DIR_PATH}{input_filename}' input_filepath = f'{INPUT_DIR_PATH}{input_filename}'
# -- Output references # -- Output references
base_output_name = f'Test' base_output_name = f'SolarSystem' # f'Test'
time_ref = f'{datetime.now().strftime("%Y%m%d")}' time_ref = f'{datetime.now().strftime("%Y%m%d")}'
output_dirpath = f'{OUTPUT_DIR_PATH}{base_output_name}-{time_ref}/' output_dirpath = f'{OUTPUT_DIR_PATH}{base_output_name}-{time_ref}/'
os.makedirs(output_dirpath, exist_ok=True) os.makedirs(output_dirpath, exist_ok=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment