Closed marcverhagen closed 7 years ago
By the way, I first thought of having a type named BinaryRelation with three properties:
relation - identifier pointing to an object of type Annotation
arg1 - identifier pointing to an object of type Annotation
arg2 - identifier pointing to an object of type Annotation
But I felt that since we would then want ternary and n-ary relations as well I might just bite the bullet.
Won't creating such a generic relation type be tempting to derive all other relations from it? How about naming the type"Fact" or something similar?
It may. I am also a bit uneasy about having GenericRelation and Dependency be siblings. As a third issue, being a subset of Relation a GenericRelation needs a label, and there is no meaningful label except for something bland like "relation", which would apply to all instances of GenericRelation.
I like Fact as a name, but I also like how Relation or GenericRelation connects to common use of the term in many NLP tools.
Here is how this may work out in LIF, what is printed here is a view for the ReVerb output of "She swam to Paris.":
{
"metadata": {
"contains": {
"Token": {"producer": "org.anc.lapps.reverb.relation:2.0.0" }}
"Markable": {"producer": "org.anc.lapps.reverb.relation:2.0.0" }}
"GenericRelation": {"producer": "org.anc.lapps.reverb.relation:2.0.0" }}},
"annotations": [
{"id":"t0", "start":0, "end":3, "@type":"Token", "features": {"pos":"PRP"}},
{"id":"t1", "start":4, "end":8, "@type":"Token", "features": {"pos":"VBD"}},
{"id":"t2", "start":9, "end":11, "@type":"Token", "features": {"pos":"TO"}},
{"id":"t3", "start":12, "end":17, "@type":"Token", "features": {"pos":"NNP"}},
{"id":"t4", "start":17, "end":18, "@type":"Token", "features": {"pos":"."}},
{"id":"m1", "@type":"Markable", "features": {"targets":["t1"]}},
{"id":"m2", "@type":"Markable", "features": {"targets":["t2","t3"]}},
{"id":"m3", "@type":"Markable", "features": {"targets":["t4"]}},
{"id":"r1",
"@type":"GenericRelation",
"features": {
"label":"swim to",
"relation":"m2",
"arguments": ["m1","m3"] }}]
}
Perhaps we can use something like UntypedRelation for this, where untyped refers to the absence of a label or just the string (for example "swim to") as the label. This would dampen people's enthousiasm for over-using or sub typing this.
Added in ec2378ea48adfd2db1e8c869f46af236ef4810c3
The vocabulary is not well positioned to deal with any kind of relation that is not a semantic role or a dependency. For ReVerb (see issue https://github.com/lappsgrid-incubator/Services/issues/5), which creates relations without typing them, we simply want some annotation type to represent things like "call(ET,home)".
There is a Relation type that defines the label property (used for syntactic categories and names of dependencies in subtypes of relation). I suggest a new subtype named GenericRelation with two properties:
The Annotation objects could be tokens, chunks or markables.