The new feature for creating disjunctive logical forms based on the differences between aligned semantic graphs is amazing. Thank you for implementing such a great idea!
Unfortunately, I failed to get multiple disjunctive logical forms by computing the difference between a disjunctive form created by buildDisjunctiveLFFor and a new LF: I always end up by having the disjunction of two LFs (the disjunctive one and the new LF), not the disjunctive LF with new disjunctions from the new LF merged. Is there any way to obtain that?
Thank you,
Giuliano
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In fact, the problem is subtler. When the result of the first disjunction (with two disjunctive predicates) is "disjunctively built" with a new LF (with one of the predicates only) the result that arises is a reduced LF with the new predicate only. In this case:
Thanks for pointing out this deficiency. When I wrote the disjunctivizer, it was aimed at providing a disjunctive LF for two input LFs that were both ordinary, non-dijunctive LFs. So the code for generating disjunctive LFs does not inspect any 'one-of' or 'opt' elements that are present in either input LF.
Extending the disjunctivizer to have this more general behavior is in some ways straightforward. As I see it, the disjunctivizer would just need to look at each aligned node to also see which disjunctive elements are already present, then compare them with the other LF's node (and what disjunctive elements are present there, too).
But there are some complicating factors. For example: if the disjunctivizer decides not to include a node as an option because it's already present, it still must examine the semantic features of the skipped node to make sure their content is incorporated as well. Another example: assume that the first LF has an 'opt' node (representing, say, a deletion) that is actually among the 'one-of' nodes (representing a substitution) in the other LF. At first blush, it seems that substitution status should override deletion status, but I'd have to look through some examples to see all the implications.
I'll put this at the top of my bugfix list.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thank you very much for your answer. In fact, I understand the original disjunctivizer served primarily to merge logical forms from couples of paraphrases, and the current implementation works perfectly fine for that. On the other hand, my aim is to merge several LFs deriving from the analysis of one sentence when WSD is not entirely possible at the syntactic level: so, multiple disjunctivizing is needed.
Of course, I am aware the solution is not that simple: thank you for putting this in your bugfix list!
Giuliano
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The new feature for creating disjunctive logical forms based on the differences between aligned semantic graphs is amazing. Thank you for implementing such a great idea!
Unfortunately, I failed to get multiple disjunctive logical forms by computing the difference between a disjunctive form created by buildDisjunctiveLFFor and a new LF: I always end up by having the disjunction of two LFs (the disjunctive one and the new LF), not the disjunctive LF with new disjunctions from the new LF merged. Is there any way to obtain that?
Thank you,
Giuliano
In fact, the problem is subtler. When the result of the first disjunction (with two disjunctive predicates) is "disjunctively built" with a new LF (with one of the predicates only) the result that arises is a reduced LF with the new predicate only. In this case:
<lf> <node id="w2" pred="accompany%2:38:00"/> </lf>(I am using a wordnet encoding for predicates).
Sorry, the format went away because I pasted from the resulting xml. These are the graph (the first, already the result of diff merging):
Graph1 = (opennlp.ccg.hylo.graph.LFGraph) ([w2@accompany%2:38:00, w2@accompany%2:42:01, w1@homo%1:05:00:: {num=sem_sg, det=definite}, w4@policeman%1:18:00:: {num=sem_sg, det=definite}], [w2@accompany%2:42:01 --Agent--> w1@homo%1:05:00:: {num=sem_sg, det=definite}=(w2@accompany%2:42:01,w1@homo%1:05:00:: {num=sem_sg, det=definite}), w2@accompany%2:42:01 --Theme--> w4@policeman%1:18:00:: {num=sem_sg, det=definite}=(w2@accompany%2:42:01,w4@policeman%1:18:00:: {num=sem_sg, det=definite})])
Graph2 = (opennlp.ccg.hylo.graph.LFGraph) ([w2@accompany%2:38:00, w1@man%1:18:00:: {num=sem_sg, det=definite}, w4@policeman%1:18:00:: {num=sem_sg, det=definite}], [w2@accompany%2:38:00 --Agent--> w1@man%1:18:00:: {num=sem_sg, det=definite}=(w2@accompany%2:38:00,w1@man%1:18:00:: {num=sem_sg, det=definite}), w2@accompany%2:38:00 --Theme--> w4@policeman%1:18:00:: {num=sem_sg, det=definite}=(w2@accompany%2:38:00,w4@policeman%1:18:00:: {num=sem_sg, det=definite})])
This is the result (hoping that the format now works):
<?xml version="1.0" encoding="UTF-8"?><lf>
<node id="w2" pred="accompany%2:38:00"/>
</lf>
Last edit: Giuliano Lancioni 2013-05-11
Hi Giuliano,
Thanks for pointing out this deficiency. When I wrote the disjunctivizer, it was aimed at providing a disjunctive LF for two input LFs that were both ordinary, non-dijunctive LFs. So the code for generating disjunctive LFs does not inspect any 'one-of' or 'opt' elements that are present in either input LF.
Extending the disjunctivizer to have this more general behavior is in some ways straightforward. As I see it, the disjunctivizer would just need to look at each aligned node to also see which disjunctive elements are already present, then compare them with the other LF's node (and what disjunctive elements are present there, too).
But there are some complicating factors. For example: if the disjunctivizer decides not to include a node as an option because it's already present, it still must examine the semantic features of the skipped node to make sure their content is incorporated as well. Another example: assume that the first LF has an 'opt' node (representing, say, a deletion) that is actually among the 'one-of' nodes (representing a substitution) in the other LF. At first blush, it seems that substitution status should override deletion status, but I'd have to look through some examples to see all the implications.
I'll put this at the top of my bugfix list.
Dear Scott,
thank you very much for your answer. In fact, I understand the original disjunctivizer served primarily to merge logical forms from couples of paraphrases, and the current implementation works perfectly fine for that. On the other hand, my aim is to merge several LFs deriving from the analysis of one sentence when WSD is not entirely possible at the syntactic level: so, multiple disjunctivizing is needed.
Of course, I am aware the solution is not that simple: thank you for putting this in your bugfix list!
Giuliano