{"id":21428325,"url":"https://github.com/mlverse/hftokenizers","last_synced_at":"2025-07-14T10:31:53.544Z","repository":{"id":45174904,"uuid":"329803075","full_name":"mlverse/hftokenizers","owner":"mlverse","description":"Hugging face tokenizers for R using extendr","archived":true,"fork":false,"pushed_at":"2023-05-17T07:31:14.000Z","size":176,"stargazers_count":11,"open_issues_count":4,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-07T13:40:40.528Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mlverse.github.io/hftokenizers","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlverse.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-15T03:54:11.000Z","updated_at":"2025-02-19T02:39:22.000Z","dependencies_parsed_at":"2022-09-05T18:12:07.053Z","dependency_job_id":null,"html_url":"https://github.com/mlverse/hftokenizers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mlverse/hftokenizers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlverse%2Fhftokenizers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlverse%2Fhftokenizers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlverse%2Fhftokenizers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlverse%2Fhftokenizers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlverse","download_url":"https://codeload.github.com/mlverse/hftokenizers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlverse%2Fhftokenizers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265280703,"owners_count":23739853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T22:12:46.966Z","updated_at":"2025-07-14T10:31:48.524Z","avatar_url":"https://github.com/mlverse.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# HuggingFace tokenizers from R\n\n[![R build status](https://github.com/mlverse/hftokenizers/workflows/R-CMD-check/badge.svg)](https://github.com/mlverse/hftokenizers/actions) \n\n\u003e This is an experimental project binding HuggingFace [tokenizers](https://github.com/huggingface/tokenizers) Rust library to R using the [extendr](https://github.com/extendr/extendr) project. Do **not** use for anything meaninful yet.\n\n## Installation\n\nThis repository uses the [helloextendr template](https://github.com/extendr/helloextendr).\n\nBefore you can install this package, you need to install a working Rust toolchain. We recommend using [rustup.](https://rustup.rs/)\n\nOn Windows, you'll also have to add the `i686-pc-windows-gnu` and `x86_64-pc-windows-gnu` targets:\n\n    rustup target add x86_64-pc-windows-gnu\n    rustup target add i686-pc-windows-gnu\n\nOnce Rust is working, you can install this package via:\n\n``` {.r}\nremotes::install_github(\"mlverse/hftokenizers\")\n```\n\n## Small example\n\nHere's a quick demo of what you can do with `hftokenizers`:\n\n```{r}\nlibrary(hftokenizers)\n\ndownload.file(\n  \"https://raw.githubusercontent.com/mlverse/hftokenizers/main/tests/testthat/assets/small.txt\",\n  \"small.txt\"\n)\n\ntokenizer$\n  new(models_bpe$new())$\n  train(normalizePath(\"small.txt\"))$\n  encode(c(\"hello world\"))$\n  ids\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlverse%2Fhftokenizers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlverse%2Fhftokenizers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlverse%2Fhftokenizers/lists"}