11.11. twol.tester module

twol-tester tests the full set of two-level rules against examples

This program is useful for checking complete rule sets where all morphophonemes are constrained by some rules. The twol-comp rule compiler checks indidual rules as it compiles them, so this program becomes useful when initial versions all rules have been written.

This program is intended to be used when one partitions the rules in to smaller groups in order to make the development cycle fast when writing larger sets of two-level rules. The compiler twol-comp does that kinds of checking only if the whole set of rules are compiled but twol-tester can test for the negative examples even if only one or a few rule groups have been recompiled.

The formulae:

lost = examples & rule[1] & rule[2] & ... & rule[n]

neg = [pos.u .o. pairs*] - examples

wrong = neg & rule[1] & rule[2] & ... & rule[n]
twol.tester.paths(heading, fst)[source]

A function for printing strings that an FST generates