https://github.com/paithiov909/vibrrt
An R wrapper for 'vibrato'
https://github.com/paithiov909/vibrrt
pos-tagging r r-package rust
Last synced: about 2 months ago
JSON representation
An R wrapper for 'vibrato'
- Host: GitHub
- URL: https://github.com/paithiov909/vibrrt
- Owner: paithiov909
- License: other
- Created: 2021-03-03T12:44:50.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-25T03:35:57.000Z (8 months ago)
- Last Synced: 2025-02-25T04:20:21.311Z (8 months ago)
- Topics: pos-tagging, r, r-package, rust
- Language: R
- Homepage: https://paithiov909.github.io/vibrrt/
- Size: 1.29 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
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%"
)
pkgload::load_all(export_all = FALSE)
```# vibrrt
[](https://paithiov909.r-universe.dev)
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://github.com/paithiov909/vibrrt/actions/workflows/R-CMD-check.yaml)An R wrapper for [vibrato](https://github.com/daac-tools/vibrato): Viterbi-based accelerated tokenizer.
## Installation
To install from source package, the Rust toolchain is required.
```r
install.packages("vibrrt", repos = c("https://paithiov909.r-universe.dev", "https://cloud.r-project.org"))
```## Usage
You can download the model files from [ryan-minato/vibrato-models](https://huggingface.co/ryan-minato/vibrato-models)
using [hfhub](https://github.com/mlverse/hfhub) package.```{r}
sample_text <- jsonlite::read_json(
"https://paithiov909.r-universe.dev/gibasa/data/ginga/json",
simplifyVector = TRUE
)# withr::with_envvar(c(HUGGINGFACE_HUB_CACHE = tempdir()), {
ipadic <- hfhub::hub_download("ryan-minato/vibrato-models", "ipadic-mecab-2_7_0/system.dic")
# })vibrrt::tokenize(
sample_text[5:8],
tagger = vibrrt::create_tagger(ipadic)
)
```## Versioning
This package is versioned by copying the version number of [vibrato](https://github.com/daac-tools/vibrato),
where the first three digits represent that version number
and the fourth digit (if any) represents the patch release for this package.