Skip to content

Commit

Permalink
Add tok installation instructions for Windows user
Browse files Browse the repository at this point in the history
  • Loading branch information
lampyridae94 committed Apr 20, 2024
1 parent 6a3da4a commit dbb020d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 32 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
^doc$
^Meta$
^.lintr
^vignettes/(.*).ref$
^vignettes/(.*).ref$
^\.vscode$
6 changes: 6 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@ This package is inspired by the NLTK and sacrebleu implementations of the BLEU s

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 example}
Expand Down
74 changes: 43 additions & 31 deletions README.md
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)
```

0 comments on commit dbb020d

Please sign in to comment.