bleu_vec: BLEU (Bilingual Evaluation Understudy).

Description Usage Arguments Value Examples

Description

Evaluate a machine translation candidate against a set of reference sentences.

Usage

1
bleu_vec(candidate, reference, n = 1)

Arguments

candidate

Candidate sentence.

reference

Vector of reference sentences.

n

ngram size, default = 1.

Value

A double indicating the BLEU score between the candidate and the set of references.

Examples

1
2
3
cand <- "the cat the cat on the mat"
reference <- c("the cat is on the mat", "there is a cat on the mat")
bleu_vec(cand, reference, 2)

kanishkamisra/footrulr documentation built on May 23, 2019, 5:07 p.m.