Skip to content

AhoCorasickTrie

0.1.3

Fast Searching for Multiple Keywords in Multiple Texts

1packages depend
4.9Kdownloads / year
70.1%test coverage
13/13checks pass

Overview

About
Maintained by Matt ChambersFirst published 2016-07-293 releasesCRAN page ↗GitHub ↗

Aho-Corasick is an optimal algorithm for finding many keywords in a text. It can locate all matches in a text in O(N+M) time; i.e., the time needed scales linearly with the number of keywords (N) and the size of the text (M). Compare this to the naive approach which takes O(N*M) time to loop through each pattern and scan for it in the text. This implementation builds the trie (the generic name of the data structure) and runs the search in a single function call. If you want to search multiple texts with the same trie, the function will take a list or vector of texts and return a list of matches to each text. By default, all 128 ASCII characters are allowed in both the keywords and the text. A more efficient trie is possible if the alphabet size can be reduced. For example, DNA sequences use at most 19 distinct characters and usually only 4; protein sequences use at most 26 distinct characters and usually only 20. UTF-8 (Unicode) matching is not currently supported.

Install

Health

CRAN checks
13OK
Slowest check: 1.7 min · r-oldrel-windows-x86_64
Code health
Yes
Tests · ratio 1.70
70.1%
Coverage · measured lines
100%
Documentation · exports
1
Dependencies · direct
Check history
  • OK2026-04-22
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-18
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesNopkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
100%
References docs
0%

Downloads

4.9K
CRAN downloads in the past year
Rank #10,036 · ~13/day · ~408/mo
Daily download trend is not available in this view yet.
35530 days
1.1K90 days
4.9K1 year
Compare downloads with other packages →
Also on451 r2u12 autocran3.9K conda_forge231 bioconda8 c2d4u

Repository

Repository
11Stars
3Forks
2Open issues
0Open PRs
0Releases
9Commits
1Contributors
License Apache-2.0 · 9 commits · Last activity 2025-02-05 · 0% stars, 30d

Stars over time

2025-07-04 · 112026-07-07 · 11

Repository practices

Upstream repositoryBeta

1 development-tooling and community-health practice detected across 1 family in the upstream repository

Checks run against github.com/chambm/ahocorasicktrie on 2026-07-19.

Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)
Depends (0)
none
Imports (1)
LinkingTo (1)
Enhances (0)
none
Reverse dependencies
1direct
0indirect

Code & Tests

People & History

People (3)
Maintainer (1)
Author, Maintainer
Authors (2)
Author, Maintainer
Author, Copyright holder
Copyright holders (2)
Author, Copyright holder
Copyright holder
Package Timeline

3 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.3Latest
    2025-02-05 · current release · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.1.2
    2020-09-29 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • R
    R 3.4.0 released · 2017-04-21
  • 0.1.0
    2016-07-29
  • R
    R 3.3.0 released · 2016-05-03

Package metadata

First published
2016-07-29
Total releases
3 / 10 yrs
License
Apache License 2.0 OSI
Download size
13 KB
Installed size
not tracked yet
With dependencies
not tracked yet
Report a problem with this page →