Dear all,
I have a question about the XLE transfer system. Let me know in case I need to send this to another distribution list (parsem?)
Since I haven't followed the development for some years now, I am unsure whether some functionality may have been added or workarounds been found regarding the following aspects.
1. marking and repeatedly executing a block of transfer rules that have to be executed in sequence:
we have a set of rules A that need to be executed in sequence, repeatedly. The number of loops needed is not known and can differ (only an upper limit could be estimated).
- Can we place the block of rules A in a file that can then repeatedly called/inserted? How would we state that?
2. Controlling the number of times such a block of rules needs to be processed repeatedly. We could formulate a rule set or an external procedure that executes a test each time a rule produces a new set of facts, and checks for equality of two subsets.
Is there a way to execute such a test and if the condition is met, stop the repeated execution of the rule block?
In essence, what we would like to achieve:
- A sequence A of transfer rules that continuously rewrite the input, and that can be called repeatedly, without leaving the transfer process (I/O would be too coslty). - Each rule application in A executes a termination condition. - This termination condition either needs to be defined as an external prolog procedure (procedural attachment) or would require several rule applications in a specified order.
I am aware of the limitations of the system that make such a scenario difficult, but I wonder whether you can advise me on - what are the limits of using procedural attachments (we would need check two subsets of facts for identity) - how possibly to employ "stop" in such a scenario - how to effectivly call an identical rule set repeatedly (by listing individual calls to an externally stored rule set of specified length?) - any private knowledge of how to circumvent the difficulty
Thanks a lot for your help!
Best regards, Anette
PS: we are currently still using a release of 2010 (xle-2010-10-06), but could switch versions, of course.
Hi Anette,
I don't think there is an elegant way of repeatedly applying a sequence of rules.
The closest you can get is to define a template encapsulating the rule sequence, and then insert repeated calls to the template (up to the upper limit). That is
template := rule; rule2;..., rulen. @template. @template. ... @template.
And of course, this is only helpful if the upper limit can be determined at rule-writing time, and so is independent of the specific input.
To terminate the repeated application early, I'm guessing the following would work.
- Create some new fact, e.g. carryOn, before the first application of the sequence - Prefix each rule in the sequence with a test, +carryOn - On hitting the termination condition, delete the carryOn fact.
Rule indexing in the transfer system should, if I remember correctly, efficiently recognize that no further rules in the repeated template calls will apply in the absence of a carryOn fact, and skip over them.
If the termination condition can only be determined by recognizing if the fact space is unchanged, this could be tricky. I would try supplementing any rules that do change a fact with an additional consequence that adds a marker fact, like hasChanged. E.g. add extra fact on the rhs like <1>hasChanged, so that any change anywhere in the choice space can be recognized. The termination condition would then be the absence of a hasChanged fact. The first rule in the sequence would probably be one to remove the hasChanged fact, in order to reset the termination condition.
If the transfer system were still under maintenance, it might have been worth breaking its decidability properties to allow open-ended iteration over a set of rules. But I doubt that there is anyone around with the time to look into this.
Out of curiousity, are you using the prolog version of transfer, or the C++ reimplementation (which does not allow for easy definition of new procedural attachments)?
Sorry I can't suggest anything more satisfying
Dick
On Fri, Feb 10, 2017 at 2:33 AM, Anette Frank frank@cl.uni-heidelberg.de wrote:
Dear all,
I have a question about the XLE transfer system. Let me know in case I need to send this to another distribution list (parsem?)
Since I haven't followed the development for some years now, I am unsure whether some functionality may have been added or workarounds been found regarding the following aspects.
- marking and repeatedly executing a block of transfer rules that have to
be executed in sequence:
we have a set of rules A that need to be executed in sequence, repeatedly. The number of loops needed is not known and can differ (only an upper limit could be estimated).
- Can we place the block of rules A in a file that can then repeatedly
called/inserted? How would we state that?
- Controlling the number of times such a block of rules needs to be
processed repeatedly. We could formulate a rule set or an external procedure that executes a test each time a rule produces a new set of facts, and checks for equality of two subsets.
Is there a way to execute such a test and if the condition is met, stop the repeated execution of the rule block?
In essence, what we would like to achieve:
- A sequence A of transfer rules that continuously rewrite the input, and
that can be called repeatedly, without leaving the transfer process (I/O would be too coslty).
- Each rule application in A executes a termination condition.
- This termination condition either needs to be defined as an external
prolog procedure (procedural attachment) or would require several rule applications in a specified order.
I am aware of the limitations of the system that make such a scenario difficult, but I wonder whether you can advise me on
- what are the limits of using procedural attachments (we would need check
two subsets of facts for identity)
- how possibly to employ "stop" in such a scenario
- how to effectivly call an identical rule set repeatedly (by listing
individual calls to an externally stored rule set of specified length?)
- any private knowledge of how to circumvent the difficulty
Thanks a lot for your help!
Best regards, Anette
PS: we are currently still using a release of 2010 (xle-2010-10-06), but could switch versions, of course.
--
Prof. Dr. Anette Frank http://www.cl.uni-heidelberg.de/~frank Computational Linguistics Department email: frank@cl.uni-heidelberg.de University of Heidelberg phone: +49-(0)6221/54-3247 Im Neuenheimer Feld 325 secr: +49-(0)6221/54-3245 69120 Heidelberg, Germany fax: +49-(0)6221/54-3242
pargram@mailman.uni-konstanz.de