Apertium has moved from SourceForge to GitHub.
If you have any questions, please come and talk to us on #apertium on irc.freenode.net or contact the GitHub migration team.

Paths to rule blocked

From Apertium
Jump to: navigation, 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)

[edit] How to avoid

If you have e.g. a rule for nom.prop.gen followed by one for nom.gen:

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

then the first rule block the second rule for the proper nouns (though non-proper nouns will still be handled by the first rule).

To avoid the warning, simply define a

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

and use that in the second rule. The behaviour will be the same.

[edit] When it's OK

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

Personal tools