Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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>
- Host: GitHub
- URL: https://github.com/muschellij2/argostranslate
- Owner: muschellij2
- License: other
- Created: 2024-09-12T05:14:39.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-17T05:03:41.000Z (3 months ago)
- Last Synced: 2024-10-16T08:21:59.816Z (2 months ago)
- Language: R
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
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).