Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/muschellij2/argostranslate

R package to wrap the argostranslate Python module <https://github.com/argosopentech/argos-translate>
https://github.com/muschellij2/argostranslate

Last synced: 19 days ago
JSON representation

R package to wrap the argostranslate Python module <https://github.com/argosopentech/argos-translate>

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# argostranslate

[![R-CMD-check](https://github.com/muschellij2/argostranslate/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/muschellij2/argostranslate/actions/workflows/R-CMD-check.yaml)

The goal of `argostranslate` is to wrap the [`argostranslate`](https://github.com/argosopentech/argos-translate) Python module.

## Installation

You can install the development version of `argostranslate` like so:

``` r
remotes::install_github("muschellij2/argostranslate")
```

### Installation of `argostranslate` Python Module

To install `argostranslate`, you can either run `install_argos`, which calls `reticulate::py_install()`, If you already have a `conda` environment enacted, use `reticulate::py_install` or simply `install_argos`

``` r
library(argostranslate)
install_argos()
```

Or you can run `create_argos_condaenv()`, which calls `reticulate::conda_create()` and creates a conda environment for `argos`, named
`argos`.

``` r
create_argos_condaenv()
```

If you use this method, you should run `reticulate::use_condaenv("argos")` before enabling Python.

## Example

This is a basic example which shows you how to solve a common problem:

```{r example}
library(argostranslate)
argos_translate("Hello World!")
```

## License
Argos Translate is dual licensed under either the [MIT License](https://github.com/muschellij2/argostranslate/blob/master/LICENSE).