The goal of sacRebleu is to provide a simple interface to the BLEU score, a metric for evaluating the quality of generated text. This package is inspired by the NLTK and sacrebleu implementations of the BLEU score, and is implemented in C++ for the R programming language.
You can install the development version of sacRebleu from GitHub with:
# install.packages("devtools")
::install_github("LazerLambda/sacRebleu") devtools
library(sacRebleu)
<- list("This is good", "This is not good")
cand_corpus <- list(list("Perfect outcome!", "Excellent!"), list("Not sufficient.", "Horrible."))
ref_corpus <- bleu_corpus(ref_corpus, cand_corpus) bleu_corpus