Skip to content

Penman command gives invalid graphs when variable is re-declared #150

@Abhishek-P

Description

@Abhishek-P

If an AMR graph has a mistake where the same variable is used for two different concept nodes, the command collapses them, and does so in such a way that it leads to an invalid penman.

 penman <<< '(o / or
        :op1 (n / name
                :op1 "Abhishek")
        :op2 (n / name
                :op1 "Abhishek Purushothama"))'

outputs

(o / or
   :op1 (n / name
           / name
           :op1 "Abhishek"
           :op1 "Abhishek Purushothama")
   :op2 n)

which is invalid

penman <<< '(o / or
   :op1 (n / name
           / name
           :op1 "Abhishek"
           :op1 "Abhishek Purushothama")
   :op2 n)'

gives

penman.exceptions.DecodeError: 
  line 3
               / name

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions