Skip to content
Snippets Groups Projects
Commit c3a9eb30 authored by Aurélien Lamercerie's avatar Aurélien Lamercerie
Browse files

Update requirements and gitignore

parent 2224211a
No related branches found
No related tags found
No related merge requests found
......@@ -5,3 +5,5 @@ __pycache__
*catalog-v001.xml
venv/*
amr_models/*
*.ipynb_checkpoints/
tests/output/*
......@@ -6,3 +6,4 @@ rdflib
graphviz
bs4
lxml
multiprocessing-logging
......@@ -6,14 +6,14 @@
=== Preparation ===
- INFO - -- base reference: test
- INFO - -- input filepath: /home/lamenji/Workspace/Tetras/amrbatch/tests/input/test.txt
- INFO - -- output dirpath: /home/lamenji/Workspace/Tetras/amrbatch/tests/output/Test-20230314/
- INFO - -- output dirpath: /home/lamenji/Workspace/Tetras/amrbatch/tests/output/Test-20230628/
- INFO - -- Reading input line set to recover a list of work data
- DEBUG - *** sentence 1 ***
<work_data.WorkData object at 0x7f5207109ba0>
The sun is a star.
- DEBUG - *** sentence 2 ***
<work_data.WorkData object at 0x7f52071087f0>
Earth is a planet.
- INFO - ----- number of sentences: 2
- DEBUG - -- Making output directory tree (/home/lamenji/Workspace/Tetras/amrbatch/tests/output/Test-20230314/)
- DEBUG - -- Making output directory tree (/home/lamenji/Workspace/Tetras/amrbatch/tests/output/Test-20230628/)
- DEBUG - -- Generating sentence file
- INFO -
=== Text Convert to AMR Graphs ===
......@@ -22,31 +22,36 @@
- DEBUG - (/home/lamenji/Workspace/Tetras/amrbatch/tests/../amr_models/model_parse_xfm_bart_large-v0_1_0)
- INFO - -- Loading AMR model
- INFO - -- Converting sentences to AMR graphs
- INFO - ----- Sentence 1 successfully processed
- DEBUG - ['# ::snt The sun is a star.\n(s / star\n :domain (s2 / sun))']
- INFO - ----- Sentence 2 successfully processed
- DEBUG - ['# ::snt Earth is a planet.\n(p / planet\n :domain p\n :name (n / name\n :op1 "Earth"))']
- INFO - ----- Sentence successfully processed
- INFO - ['# ::snt The sun is a star.\n(s / star\n :domain (s2 / sun))']
- INFO - -- Loading AMR model
- INFO - -- Converting sentences to AMR graphs
- WARNING - gid=x Start paren present but planet is not a new concept
- INFO - ----- Sentence successfully processed
- INFO - ['# ::snt Earth is a planet.\n(p / planet\n :domain p\n :name (n / name\n :op1 "Earth"))']
- INFO - ----- Total processed graph number: 2
- INFO - -- Generating AMR graph files
- DEBUG - ----- AMR Graph file (penman): test-01.stog.amr.penman
- DEBUG - ----- AMR Graph file (dot): test-01.stog.amr.dot
- DEBUG - ----- AMR Graph file (png): {os.path.basename(good_png_fn)}
- DEBUG - ----- AMR Graph file (penman): test-02.stog.amr.penman
- DEBUG - ----- AMR Graph file (dot): test-02.stog.amr.dot
- DEBUG - ----- AMR Graph file (png): {os.path.basename(good_png_fn)}
- INFO - ----- AMR Graph file (penman): test-01.stog.amr.penman
- INFO - ----- AMR Graph file (penman): test-02.stog.amr.penman
- INFO - ----- AMR Graph file (dot): test-02.stog.amr.dot
- INFO - ----- AMR Graph file (dot): test-01.stog.amr.dot
- INFO - ----- AMR Graph file (png): test-01.stog.amr.png
- INFO - ----- AMR Graph file (png): test-02.stog.amr.png
- INFO - ----- AMR Graph file (svg): test-01.stog.amr.svg
- INFO - ----- AMR Graph file (svg): test-02.stog.amr.svg
- INFO -
=== AMR Graphs Serialization to AMR-RDF Representation ===
- INFO - -- library: amrld
- DEBUG - (/home/lamenji/Workspace/Tetras/amrbatch/amrbatch/amrld/)
- INFO - -- Serialize AMR graphs to RDF using amr-ld library
- DEBUG - ----- AMR filepath (penman): /home/lamenji/Workspace/Tetras/amrbatch/tests/output/Test-20230314/test-01/test-01.stog.amr.penman
- DEBUG - ----- AMR-RDF filepath (triple): /home/lamenji/Workspace/Tetras/amrbatch/tests/output/Test-20230314/test-01/test-01.stog.amr.nt
- DEBUG - ----- AMR-RDF filepath (turtle): /home/lamenji/Workspace/Tetras/amrbatch/tests/output/Test-20230314/test-01/test-01.stog.amr.ttl
- INFO - ----- AMR filepath (penman): test-01.stog.amr.penman
- INFO - ----- AMR-RDF filepath (triple): test-01.stog.amr.nt
- INFO - ----- AMR-RDF filepath (turtle): test-01.stog.amr.ttl
- INFO - ----- AMR-RDF triple successfully processed (test-01.stog.amr.nt)
- INFO - ----- AMR-RDF triple successfully processed (test-01.stog.amr.ttl)
- INFO - ----- AMR-RDF turtle successfully processed (test-01.stog.amr.ttl)
- INFO - -- Serialize AMR graphs to RDF using amr-ld library
- DEBUG - ----- AMR filepath (penman): /home/lamenji/Workspace/Tetras/amrbatch/tests/output/Test-20230314/test-02/test-02.stog.amr.penman
- DEBUG - ----- AMR-RDF filepath (triple): /home/lamenji/Workspace/Tetras/amrbatch/tests/output/Test-20230314/test-02/test-02.stog.amr.nt
- DEBUG - ----- AMR-RDF filepath (turtle): /home/lamenji/Workspace/Tetras/amrbatch/tests/output/Test-20230314/test-02/test-02.stog.amr.ttl
- INFO - ----- AMR filepath (penman): test-02.stog.amr.penman
- INFO - ----- AMR-RDF filepath (triple): test-02.stog.amr.nt
- INFO - ----- AMR-RDF filepath (turtle): test-02.stog.amr.ttl
- INFO - ----- AMR-RDF triple successfully processed (test-02.stog.amr.nt)
- INFO - ----- AMR-RDF triple successfully processed (test-02.stog.amr.ttl)
- INFO - ----- AMR-RDF turtle successfully processed (test-02.stog.amr.ttl)
......@@ -26,13 +26,14 @@ 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'SolarSystem' # f'Test'
base_output_name = f'Test'
# base_output_name = f'SolarSystem'
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)
......@@ -63,8 +64,8 @@ for amr_graph in amr_graph_list:
# -- Parsing from a string
reading_file = open(input_filepath, "r")
input_string = reading_file.read()
# reading_file = open(input_filepath, "r")
# input_string = reading_file.read()
#data_reference = os.path.splitext(os.path.basename(input_filepath))[0]
# data_reference = None
# data_reference = 'testReference'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment