-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tok installation instructions for Windows user
- Loading branch information
1 parent
6a3da4a
commit dbb020d
Showing
3 changed files
with
51 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
^doc$ | ||
^Meta$ | ||
^.lintr | ||
^vignettes/(.*).ref$ | ||
^vignettes/(.*).ref$ | ||
^\.vscode$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,43 @@ | ||
|
||
<!-- README.md is generated from README.Rmd. Please edit that file --> | ||
|
||
# sacRebleu | ||
|
||
<!-- badges: start --> | ||
<!-- badges: end --> | ||
|
||
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. | ||
|
||
## Installation | ||
|
||
You can install the development version of sacRebleu from | ||
[GitHub](https://github.com/) with: | ||
|
||
``` r | ||
# install.packages("devtools") | ||
devtools::install_github("LazerLambda/sacRebleu") | ||
``` | ||
|
||
## Example | ||
|
||
``` r | ||
library(sacRebleu) | ||
cand_corpus <- list("This is good", "This is not good") | ||
ref_corpus <- list(list("Perfect outcome!", "Excellent!"), list("Not sufficient.", "Horrible.")) | ||
bleu_corpus <- bleu_corpus(ref_corpus, cand_corpus) | ||
``` | ||
|
||
<!-- README.md is generated from README.Rmd. Please edit that file --> | ||
|
||
# sacRebleu | ||
|
||
<!-- badges: start --> | ||
<!-- badges: end --> | ||
|
||
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. | ||
|
||
## Installation | ||
|
||
You can install the development version of sacRebleu from | ||
[GitHub](https://github.com/) with: | ||
|
||
### Linux and MacOS | ||
|
||
``` r | ||
# install.packages("devtools") | ||
devtools::install_github("LazerLambda/sacRebleu") | ||
``` | ||
|
||
### Windows | ||
|
||
This package builds upon the [tok](https://github.com/mlverse/tok) | ||
package, which requires the Rust toolchain to be installed. To install | ||
the rustup, follow the instructions at | ||
[https://www.rust-lang.org/tools/install](https://rustup.rs/) and at | ||
[tok](https://github.com/mlverse/tok). After installing the Rust | ||
toolchain, you can install the development version of sacRebleu as | ||
described above. | ||
|
||
## Example | ||
|
||
``` r | ||
library(sacRebleu) | ||
cand_corpus <- list("This is good", "This is not good") | ||
ref_corpus <- list(list("Perfect outcome!", "Excellent!"), list("Not sufficient.", "Horrible.")) | ||
bleu_corpus <- bleu_corpus(ref_corpus, cand_corpus) | ||
``` |