process of weight
has been introduced in (Kippen & Bel 1992). Given a set of items accepted
by the current grammar it is possible to infer rule weights from the set of
examples. The weight of each rule will be the number of times it has been used
in parsing the sample set. Weight inference is used to improve the quality of
randomly generated musical items by increasing the probability that these items
resemble a set of items given as an input by an expert musician. See for
instance the weights of rules in "-gr.dhin--".
this procedure as follows. Load "-gr.dhin-
Compile the grammar and produce its templates. (It's a good idea to save the
current grammar with its templates, but remember that templat
should be computed again each time structural rules have been modified in the
grammar.) Now click "Save weights" on the Control panel to save current
grammar weights in a "-wg" file. Then click "Set weights" and reset all
weights to 0. Select all items in the "Data" window, click "Learn weight
and answer default options in all dialogs.