ahocorasick: Fast Multi-Pattern String Matching with the 'Aho-Corasick' Algorithm

Provide fast multi-pattern string matching for 'R' using the 'Aho-Corasick' algorithm, powered by the 'Rust' 'aho-corasick' crate. It builds reusable automatons for detecting matches, counting matches, locating character, extracting matched text, and replacing matches in character vectors. For more details on the 'Aho-Corasick' algorithm, please see Aho and Corasick (1975) <doi:10.1145/360825.360855>.

Version: 0.2.0
Depends: R (≥ 4.2)
Imports: checkmate, cli, fs, rlang
Suggests: dplyr, knitr, pkgdown, rmarkdown, tibble, tidyr, testthat (≥ 3.0.0)
Published: 2026-06-02
DOI: 10.32614/CRAN.package.ahocorasick (may not be active yet)
Author: Hao Cheng [aut, cre, cph]
Maintainer: Hao Cheng <Yousa-Mirage at foxmail.com>
BugReports: https://github.com/Yousa-Mirage/r-ahocorasick/issues
License: MIT + file LICENSE
URL: https://yousa-mirage.github.io/r-ahocorasick/, https://github.com/Yousa-Mirage/r-ahocorasick
NeedsCompilation: yes
SystemRequirements: Cargo (Rust's package manager), rustc >= 1.65.0, xz
Language: en-US
Materials: README, NEWS
CRAN checks: ahocorasick results

Documentation:

Reference manual: ahocorasick.html , ahocorasick.pdf
Vignettes: Benchmarks (source, R code)

Downloads:

Package source: ahocorasick_0.2.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): ahocorasick_0.2.0.tgz, r-oldrel (arm64): not available, r-release (x86_64): ahocorasick_0.2.0.tgz, r-oldrel (x86_64): ahocorasick_0.2.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=ahocorasick to link to this page.