# hankcs/AhoCorasickDoubleArrayTrie

An extremely fast implementation of Aho Corasick algorithm based on Double Array Trie.

Repository: https://github.com/hankcs/AhoCorasickDoubleArrayTrie
Canonical: https://ross.abutalabs.com/products/ahocorasickdoublearraytrie
Homepage: http://www.hankcs.com/program/algorithm/aho-corasick-double-array-trie.html
Language: Java
License Family: other
Topics: aho-corasick, doublearraytrie, algorithm, java, fast
Last push: 2021-11-24T17:09:04+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4165, "days_push": 1743, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1016, forks 298 (observed 2026-08-28T04:03:14.367598+00:00)

## What it is
A Java library implementing the Aho-Corasick multi-pattern string matching algorithm on top of a Double Array Trie, achieving O(n) matching speed. It is used as a core data structure in the HanLP NLP package and is available via Maven Central.

## Use cases
- find all occurrences of many keywords in a text fast
- multi-pattern string matching in Java
- linkify or highlight dictionary words in text
- dictionary-based text annotation
- fast keyword matching for NLP tokenization
- spell-check text against a large dictionary

## When to choose
- you need extremely fast multi-pattern matching over a large dictionary in Java
- memory-efficient string matching matters
- you're building NLP pipelines like segmentation or term extraction

## When to avoid
- you need a non-JVM language implementation
- you only need single-pattern search (use a simpler algorithm)
- you need an actively maintained library with recent releases

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, search-engine, nlp
- domain: developer-tools
- platform: jvm
- tags: aho-corasick, double-array-trie, multi-pattern-matching, string-matching, text-processing, algorithms, natural-language-processing

## Member repositories
- hankcs/AhoCorasickDoubleArrayTrie (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:14.367598+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:11:18.765394+00:00, confidence not recorded.
  - readme: https://github.com/hankcs/AhoCorasickDoubleArrayTrie (fetched 2026-08-28T04:03:14.367598+00:00, sha be6757473f92)
  - homepage: http://www.hankcs.com/program/algorithm/aho-corasick-double-array-trie.html (fetched 2026-08-29T13:10:32.778041+00:00, sha 20de0d214b93)
  - site_page: https://www.hankcs.com/about (fetched 2026-08-29T13:10:32.787982+00:00, sha 001a7ec350a1)
  - site_page: http://www.hankcs.com/about (fetched 2026-08-29T13:10:32.792093+00:00, sha c01d28ddc326)
- Data as of 2026-08-30T08:39:29.467469+00:00.
