How to reverse the order for argument?
See original GitHub issueHi,
I got one example and I want to modify the amr graph to get the reverse version of the reverse sentence for that. The original sentence:
# ::snt If you can use a computer, you have keyboarding skills.
(z0 / have-condition-91
:ARG1 (z1 / have-03
:ARG0 (z2 / you)
:ARG1 (z3 / skill
:topic (z4 / keyboard-01)))
:ARG2 (z5 / possible-01
:ARG1 (z6 / use-01
:ARG0 z2
:ARG1 (z7 / computer))))
The reverse sentence would be
# ::snt If you have keyboardin skills, you can use a computer.
How can I do that? Many thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to use reverse() in Python - Educative.io
The reversed() function takes any sequence as an argument and returns a reversed iterator object. The iterator object accesses the objects of the...
Read more >Assembly Parameter Passing in Reverse Order?
Pushing the right-most first means that the left-most (of the non-register args) is right above the return address, i.e. at a known position ......
Read more >REVERSE - IBM
The REVERSE function returns a character string of exactly the same length as the argument, whose characters are exactly the same as those...
Read more >cursor motions - Change or reverse order of arguments
Go back to beginning and delete unnecessary commas and spaces from beginning of arglist with x. Obviously, this is kind of tedious. What...
Read more >The reverse Parameter - Real Python
00:45 then you'll see that the names are returned in alphabetical order, so 'A' , 'H' , 'M' , and 'S' . Now...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can use the other graph methods to find things, but it depends on what kinds of patterns you are looking for. For instance:
Firstly, to be clear, the
::snt
metadata is not modeled beyond simply being stored along with the graph, so if you want to change that you simply reassign it. But if you are using that to illustrate that you want to swap the arguments in the graph, then you’ll need to replace two triples:('z0', ':ARG1', 'z1')
and('z0', ':ARG2', 'z5')
.Does that help?