The example code will result into error

#2
by raptorkwok - opened

Here is the example code in the Space:

import evaluate
metric_nist = evaluate.load('nist_mt')

hypothesis1 = "It is a guide to action which ensures that the military always obeys the commands of the party"
reference1 = "It is a guide to action that ensures that the military will forever heed Party commands"
reference2 = "It is the guiding principle which guarantees the military forces always being under the command of the Party"

print(metric_nist.compute(hypothesis1, [reference1, reference2]))

It will result in the following error:

TypeError: compute() takes 1 positional argument but 3 were given

How to resolve this? Thanks.

Are you sure that this is the right place for this? It appears that you're talking about the nist_mt evaluation library but this is an implementation of the codebleu metric.

raptorkwok changed discussion status to closed

Sign up or log in to comment