Closed Wangpeiyi9979 closed 3 years ago
The --rearrange
option is a tree operation and it only swaps branch positions. If you want to reattach branches at different locations, try --reconfigure
:
~/git/penman$ original='(b / believe-01
> :ARG1 (c8 / capable-01
> :ARG2 (i / innovate-01
> :ARG0 (p / person
> :mod (e2 / each)))
> :ARG1 p)
> :ARG0 (p2 / person))'
~/git/penman$ echo "$original" | penman --reconfigure=canonical
(b / believe-01
:ARG0 (p2 / person)
:ARG1 (c8 / capable-01
:ARG1 (p / person
:mod (e2 / each)
:ARG0-of i)
:ARG2 (i / innovate-01)))
Sometimes you can get different results if you chain both operations:
~/git/penman$ echo "$original" | penman --rearrange=attributes-first,alphanumeric | penman --reconfigure=original
(b / believe-01
:ARG0 (p2 / person)
:ARG1 (c8 / capable-01
:ARG1 (p / person
:mod (e2 / each))
:ARG2 (i / innovate-01
:ARG0 p)))
Thanks!!
Hi, thanks for your nice work. When I rearrange the amr as follow:
I find the referenced variable
p
appears before(p / person :mod (e2 / each))
. Would you help me solve this problem. Thanks!