nschneid / amr-hackathon

Abstract Meaning Representation (AMR) Hackathon
MIT License
28 stars 12 forks source link

:instance vs :instance-of #4

Closed goodmami closed 8 years ago

goodmami commented 8 years ago

This is either a bug report or a question about AMR. If it's the latter, then sorry if this is the wrong place to ask (and perhaps I should submit it to amrisi/amr-guidelines instead).

Why does the / operator map to :instance-of instead of :instance (as described in the Part II of the guidelines)? I see :instance-of show up in other places too (e.g., https://github.com/amrisi/amr-guidelines/issues/178), so I feel like I'm missing something.

>>> amr.AMR('( a / alpha )').triples()
[(Var(TOP), ':top', Var(a)), (Var(a), ':instance-of', Concept(alpha))]

Thanks!

nschneid commented 8 years ago

Because a concept on its own is a type (or category). Each variable represents an instance of that type (or member of that category). Consider an AMR for "The tall boy saw the short boy":

(s / saw-01
  :ARG0 (b / boy :mod (t / tall))
  :ARG1 (b2 / boy :mod (s2 / short)))

There is really just one concept for boy, but it has two instances, represented by b and b2. So, when representing the AMR in terms of triples, we say that b and b2 are each an :instance-of the boy concept—or conversely, that the concept has multiple :instance relations. (Var(b), ':instance-of', Concept(boy)) and (Concept(boy), ':instance', Var(b)) would be equivalent.

Does that make sense?

goodmami commented 8 years ago

Thanks for the quick response!

Ok, so if this were presented graphically, there would be one node for boy, and both b and b2 would have :instance-of edges going to boy, or alternatively two :instance edges going from boy. That makes sense as long as we want to ensure that there is just one unique node per concept in a graph.

In that case, the guidelines have it backwards? The graph visualization has directed :instance edges going from variables to concepts, the triples similarly go the other way (e.g. instance(w, want-01)), and it says this:

The slash (/) is shorthand for the :instance relation

Maybe these are artifacts from a previous iteration of AMR?

nschneid commented 8 years ago

Ah, yeah, I would have said :instance-of in the guidelines. Will open an issue there. Thanks!

goodmami commented 8 years ago

Great, thanks for explaining and for opening amrisi/amr-guidelines#184