libdatrie
brew install libdatrie
v0.2.14
LGPL-2.1-or-later
C library implementing double-array trie data structure for efficient string prefix matching and lexical analysis.
Why you might care
Provides O(m) lookup time independent of database size, making it ideal for spell-checkers, lexical analyzers, and dictionary implementations. More memory-efficient than hash tables for prefix-based queries and supports incremental matching. Primarily used as a build dependency for text processing tools that need fast dictionary lookups.
40.4k
30-day installs · #158
145.0k
90-day · #145
262.2k
365-day · #240
182
★ GitHub stars · updated 5mo ago
Build dependencies
Links
- https://github.com/tlwg/libdatrie
- GitHub: tlwg/libdatrie
- Brew formula source: Formula/lib/libdatrie.rb
Blurb generated by claude-haiku-4-5 on today.
Raw metadata
{
"aliases": [],
"alternatives": [
"marisa-trie",
"gperf"
],
"build_dependencies": [
"pkgconf"
],
"categories": [
"library",
"text-processor"
],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Double-Array Trie Library",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:40:42+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "libdatrie",
"github_default_branch": "master",
"github_last_commit_at": "2026-01-05T04:25:09Z",
"github_readme_excerpt": "datrie - Double-Array Trie Library\n==================================\n\nThis is an implementation of double-array structure for representing trie, \nas proposed by Junichi Aoe [1].\n\nTrie is a kind of digital search tree, an efficient indexing method in which\nsearch time is independent of database size. It only takes O(m) search time,\nwhere m is the length of the search string. Comparably as efficient as hashing,\ntrie also provides flexibility on incremental matching and key spelling\nmanipulation. This makes it ideal for lexical analyzers, as well as spelling\ndictionaries.\n\nSee the details of the implementation at [2]:\n https://linux.thai.net/~thep/datrie/datrie.html\n\nHistorically, this was first implemented as C++ classes in a library called\nmidatrie [2], but later simplified and rewritten from scratch in C.\n\n--\nTheppitak Karoonboonyanan.\nSeptember 2006.\n\nReferences\n----------\n\n[1] Aoe, J. \"An Efficient Digital Search Algorithm by Using a Double-Array \n Structure\". IEEE Transactions on Software Engineering. Vol. 15, 9 \n (Sep 1989). pp. 1066-1077.\n\n[2] Karoonboonyanan, T. \"An Implementation of Double-Array Trie\".\n https://linux.thai.net/~thep/datrie/datrie.html\n\n\nLicense\n-------\n\n Copyright (C) 2006-2026 Theppitak Karoonboonyanan\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, see\n \u003chttps://www.gnu.org/licenses/\u003e.\n\n",
"github_repo": "tlwg/libdatrie",
"github_stars": 182,
"github_topics": [],
"homepage": "https://github.com/tlwg/libdatrie",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 40408,
"installs_365d": 262157,
"installs_90d": 144956,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "LGPL-2.1-or-later",
"llm_generated_at": "2026-06-20T23:43:05+00:00",
"llm_model": "claude-haiku-4-5",
"name": "libdatrie",
"oldnames": [],
"one_liner": "C library implementing double-array trie data structure for efficient string prefix matching and lexical analysis.",
"optional_dependencies": [],
"rank_30d": 158,
"rank_365d": 240,
"rank_90d": 145,
"raw_hash": "e9ec9f8ad615f17c",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/lib/libdatrie.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": null,
"version_stable": "0.2.14",
"versioned_formulae": [],
"why_use_this": "Provides O(m) lookup time independent of database size, making it ideal for spell-checkers, lexical analyzers, and dictionary implementations. More memory-efficient than hash tables for prefix-based queries and supports incremental matching. Primarily used as a build dependency for text processing tools that need fast dictionary lookups."
}