Paths to rule blocked

From Apertium
Revision as of 15:19, 13 December 2016 by Unhammer (talk | contribs)
Jump to navigation Jump to search

If you get

Warning (753): Paths to rule 5 blocked by rule 3.

from apertium-preprocess-transfer (or make), then you can check out the relevant rules by doing e.g.

$ xmllint --xpath '//rule[3]' apertium-dan-nor.nor-dan.t1x
$ xmllint --xpath '//rule[5]' apertium-dan-nor.nor-dan.t1x

(exchanging apertium-dan-nor.nor-dan.t1x for your transfer file)

How to avoid

If you have a rule for nom.prop.gen followed by one for nom.gen, defined as

    <def-cat n="nom.gen">
      <cat-item tags="n.*.gen.*"/>
      <cat-item tags="np.*.gen.*"/>
    </def-cat>
    <def-cat n="nom.prop.gen">
      <cat-item tags="np.*.gen.*"/>
    </def-cat>

then the first will block the second *for the proper nouns* (though not for non-proper nouns). To avoid the warning, simply define a

    <def-cat n="nom.unprop.gen">
      <cat-item tags="n.*.gen.*"/>
    </def-cat>

and use that in the second rule.

When it's OK

For "catch-all" rules, it's fine if there is some overlap.