You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
The parser will output a non-breaking space character if the the input sentence contains \d+ \d+. This leads post-processing failure with error penman.DecodeError: Expected ":" or "/" at position XXX
Note that in the last line, 917 703 1472 contains non-breaking spaces.
./postprocess_2.0.sh sample.txt.pred
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/perry/anaconda3/envs/stog/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/home/perry/anaconda3/envs/stog/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/home/perry/PycharmProjects/phd/AMR-gs-master/stog/data/dataset_readers/amr_parsing/postprocess/postprocess.py", line 16, in postprocess2
for amr in nr.restore_file(file_path):
File "/home/perry/PycharmProjects/phd/AMR-gs-master/stog/data/dataset_readers/amr_parsing/postprocess/node_restore.py", line 19, in restore_file
for amr in AMRIO.read(file_path):
File "/home/perry/PycharmProjects/phd/AMR-gs-master/stog/data/dataset_readers/amr_parsing/io.py", line 48, in read
amr.graph = AMRGraph.decode(' '.join(graph_lines))
File "/home/perry/PycharmProjects/phd/AMR-gs-master/stog/data/dataset_readers/amr_parsing/amr.py", line 640, in decode
_graph = amr_codec.decode(raw_graph_string)
File "/home/perry/anaconda3/envs/stog/lib/python3.6/site-packages/penman.py", line 172, in decode
span, data = self._decode_penman_node(s)
File "/home/perry/anaconda3/envs/stog/lib/python3.6/site-packages/penman.py", line 405, in _decode_penman_node
span, data = self._decode_penman_node(s, pos=pos)
File "/home/perry/anaconda3/envs/stog/lib/python3.6/site-packages/penman.py", line 405, in _decode_penman_node
span, data = self._decode_penman_node(s, pos=pos)
File "/home/perry/anaconda3/envs/stog/lib/python3.6/site-packages/penman.py", line 405, in _decode_penman_node
span, data = self._decode_penman_node(s, pos=pos)
File "/home/perry/anaconda3/envs/stog/lib/python3.6/site-packages/penman.py", line 427, in _decode_penman_node
raise DecodeError('Expected ":" or "/"', string=s, pos=pos)
penman.DecodeError: Expected ":" or "/" at position 364
Workaround
Check for non-breaking spaces and replace them with - or _ in the output.
The text was updated successfully, but these errors were encountered:
Problem
The parser will output a non-breaking space character if the the input sentence contains
\d+ \d+
. This leads post-processing failure with errorpenman.DecodeError: Expected ":" or "/" at position XXX
Example
.pred
fileNote that in the last line,
917 703 1472
contains non-breaking spaces.Workaround
Check for non-breaking spaces and replace them with
-
or_
in the output.The text was updated successfully, but these errors were encountered: