neubig / travatar

This is a repository for the Travatar forest-to-string translation decoder
GNU Lesser General Public License v3.0
28 stars 11 forks source link

Added Advance Interpolation Evaluation Measurement #19

Closed philip30 closed 9 years ago

philip30 commented 9 years ago

In this pull request, I added one more class for the modification of eval-measure-interp, so it can support more various combination beside arithmetic mean.

The measurement can be created from this format: "ainterp:{$VAR|[$MEASUREMENT]|}*$QUERY

$VAR is a 1 character, ranging from A-Z. $MEASUREMENT is the other evaluation measures. $QUERY is mathematical expression that used to combine all the measurements (containing all $VAR).

for example: "ainterp:A|bleu:smooth=1|B|ribes|2_A_B/(A+B)"

will calculate the harmonic mean of bleu+1 and ribes together.

Current limitation: Query can support only binary operator {+,-,/,*} with open and closed parentheses. However, the operator precedence's is already supported.