/*******************Version3*******************/ /*------------------- Parser---------------------*/ Add another variable /*----------------- Search control------------------*/ iterative over bounds -- maximum 10 non-terminals -- overall at the beginning -- until you finish -- while for each example, you may want to put incremental on the bound on the number of rules. script -- you can also record the bound as additional variable in the generalise_oneTrainingSet, and then record in a list like PA/Time, /*****************cfg4***************/ it is not small change: % cfg4 - seperate the bound on the number of different types of rules % new_nt is applied after trying to bind with those in the hypothesised. This temps to be top-down. However, you can reverse the order of 2nd/3rd abduce clause -- However, the deterministic statement is not quite right. /****************** Version2 *******************/ % This is modified from 'metagol_D_topDown_deterministic' /*----------------- Deterministic and Non-deterministic ------------------*/ just by setting, rather than a different code /*----------------- Record ------------------*/ /*----------------- Parser ------------------*/ cf_rule0, cf_rule1a, cf_rule1b, cf_rule2 deductively, mapping these rules to be used in the Earley parser /*----------------- Search control------------------*/ Top-down -- try to use the previous node asap incremental within each /****************** Previously -- deterministic grammar *******************/ The storage is slightly different. The head of node is stored as, while the update in the parser utilities changed -- addT and pprint /****************** Version1 *******************/ 1. red-black tree structure for recording 2. separate record for rule1 and rule2 3. *** Separate the bound for rule1 and rule2 --> by their description, there bound will be 2/3. However, there is a minimum bound on the number of (2) Minimum Bound updated in files: run.pl -- the general command: initial and output the learned grammars generalise.pl -- no change actually parser -- abduce utilities: pretty_print is updated as well addT S-A-B-EmptyPair -- The Value in the pair of Key-Value is empty, you could put the example there /****************** Version0 *******************/ % this version is similar to the dyadic version. 1. iterative deepening. The bound is tight and derived by Blumer Bound log However differ a. length of sequence in the given examples 2. greedily My modification: 1. Explicit bound on the number of non-terminals. In Stephen's dyadic version, he only gives one new predicate, so, there is no problem of permitating. If I don't put a bound, then the --, no it won't, it will only based on what you have so far in the N list 2. use negative examples all the time (after passing each positive examples). This will improve the efficiency when it is top-down Parser: by using the divide-subseq, you . However, you can achieve sth similar by the depth bound on parse --> *** Change to Chart Parser? Compression: 1. Substrings are part of terminal, so you don't need extra rules for them. %rewrite_rule(substring0,[e,d]). /***************************Organisation or layout of my code ***********************************/ 1. Parsers: a. different language b. chart parser or not 2. Search_controls. It would be simply a. add search bounds using Blumer bound