Description Usage Arguments Value Examples
BLEU score calculations over a data frame.
1 | bleu(.data, n = 4)
|
.data |
A list, where each candidate has multiple references (dataframe that was transformed into a list by another function in this package) |
n |
desired number of ngrams (defaults to 4) |
tibble with data in long form. Each row contains the BLEU score for each ngram value for each candidate-reference pair.
1 2 3 4 5 6 7 8 | # Our candidate and reference data
sample_data <- list(list(candidate = "The cat the cat on the mat", references = c("The cat is on the mat", "There is a cat on the mat")),
list(candidate = "The cat the cat on the map", references = c("The cat is on the ccccccat", "There is a cat on the mat")))
# Run function
bleu(sample_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.