About Anaconda Help Download Anaconda

r / packages / r-ahocorasicktrie

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.

Type Size Name Uploaded Downloads Labels
conda 87.3 kB | linux-64/r-ahocorasicktrie-0.1.2-r43h884c59f_0.tar.bz2  1 year and 1 month ago 27 main
conda 87.5 kB | linux-64/r-ahocorasicktrie-0.1.2-r42h884c59f_0.tar.bz2  2 years and 8 months ago 66 main
conda 80.7 kB | win-64/r-ahocorasicktrie-0.1.0-r34h796a38f_0.tar.bz2  4 years and 11 months ago 48 main
conda 73.0 kB | osx-64/r-ahocorasicktrie-0.1.0-r36h466af19_0.tar.bz2  4 years and 11 months ago 21 main
conda 80.0 kB | linux-64/r-ahocorasicktrie-0.1.0-r36h29659fb_0.tar.bz2  4 years and 11 months ago 67 main

© 2025 Anaconda, Inc. All Rights Reserved. (v4.0.7) Legal | Privacy Policy