Using weights for ambiguous rules

From Apertium
Revision as of 20:38, 24 October 2018 by Purplemoon (talk | contribs)
Jump to navigation Jump to search

The Idea

The idea is to allow Old-Apertium transfer rules to be ambiguous, i.e., allow a set of rules to match the same general input pattern, as opposed to the existed situation when the first rule in xml transfer file takes exclusive precedence and blocks out all its ambiguous peers during transfer precompilation stage.

To decide which rule applies, transfer module would use a set of predefined or pretrained — more specific — weighted patterns provided for each group of ambiguous rules. This way, if a specific pattern matches, the rule with the highest weight for that pattern is applied.

The first rule in xml transfer file that matches the general pattern is still considered the default one and is applied if no weighted patterns matched.

Transfer module

Implementation

Step 1
Step 2
Step 3
Step 4
Step 5

Evaluation