question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to transfer the following example to a reversed sentense?

See original GitHub issue

Hi,

I got an question for the following example which is related to that question. https://github.com/goodmami/penman/issues/106 But the difference is the following example has different AMR structure to represent the same sentence. I am curious how to modify AMR graph to get a reversed sentnece.

In this case, the original sentence is “If you can use a computer, then you have keyboarding skills”. The reversed sentence can be “If you have keyboarding skills, then you can use a computer”.

# ::snt If you can use a computer, then you have keyboarding skills.
(h / have-03
      :ARG0 (y / you)
      :ARG1 (s / skill
            :topic (k / keyboard))
      :condition (p / possible-01
            :ARG1 (u / use-01
                  :ARG0 y
                  :ARG1 (c / computer))))

In this case, the original sentence is “If Alice can use a computer, then Bob have keyboarding skills”. The reversed sentence can be “If Bob have keyboarding skills, then Alice can use a computer”.

# ::snt If Alice can use a computer, then Bob have keyboarding skills.
(h / have-03
      :ARG0 (p / person
            :name (n / name
                  :op1 "Bob"))
      :ARG1 (s / skill
            :topic (k / keyboard))
      :condition (p2 / possible-01
            :ARG1 (u / use-01
                  :ARG0 (p3 / person
                        :name (n2 / name
                              :op1 "Alice"))
                  :ARG1 (c / computer))))

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
goodmamicommented, Aug 30, 2022

Do you know if there are any other graph-to-string realizers or the graph-to-string realizers you often used instead of the gtos model?

There are plenty, but I don’t actually use them, at least not now. You might try a search on the ACL Anthology (e.g., for AMR generation) and see what turns up.

1reaction
goodmamicommented, Aug 17, 2022

I strongly suggest you follow the example in #106 instead of doing string manipulations, which will only work for a very limited number of graphs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to reverse the order of words in a sentence - Educative.io
1. class ReverseWords { ; 2. public static void main(String args[]) { ; 3. String s[] = "you shall not pass".split(" "); ;...
Read more >
Reverse a Sentence in Java - Scaler Topics
Reversing a sentence in Java using recursion is explained in detail. ... The following example makes it more clear - ... import java.util....
Read more >
Reverse words in a given string - GeeksforGeeks
Follow the below steps to solve the problem: Run a for loop to traverse the string and create a temporary string to store...
Read more >
Inverted Word Order | What is an Inverted Sentence?
A sentence is a group of words that expresses a complete thought, usually in the format of a subject before a verb. Inverted...
Read more >
Sentence pattern Transformations
1. place there at the beginning of the sentence and · 2. reverse positions of the subject and verb. Examples. NOTE: Do not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found