【文件属性】:
文件名称:cedar:可高效更新的双数组树的 go 实现
文件大小:1.84MB
文件格式:ZIP
更新时间:2021-05-29 01:15:06
go golang cedar ahocorasick Go
雪松
cedar软件包基于实现双数组trie。
它是由 Naoki Yoshinaga 用 C++ 编写的的端口。 cedar-go当前实现了reduced版本的cedar。 如果只有一个goroutine执行插入或删除操作,则此程序包不是线程安全的。
安装
go get github.com/go-ego/cedar
用法
package main
import (
"fmt"
"github.com/go-ego/cedar"
)
func main () {
// create a new cedar trie.
trie := cedar . New ()
// a helper function to print the id-key-value triple given trie node id
printIdKeyValue := func ( id in
【文件预览】:
cedar-master
----.gitignore(495B)
----go.mod(79B)
----doc.go(512B)
----dict_test.go(4KB)
----aho()
--------aho.go(12B)
----io.go(1KB)
----.travis.yml(253B)
----LICENSE(34KB)
----go.sum(163B)
----testdata()
--------README.md(75B)
--------dict.txt(4.84MB)
----cedar.go(10KB)
----.github()
--------CONTRIBUTING.md(23B)
--------issue_template.md(838B)
--------pull_request_template.md(878B)
--------workflows()
----cedar_test.go(4KB)
----example_test.go(2KB)
----README.md(3KB)
----circle.yml(498B)
----cedar_bm_test.go(963B)
----api.go(6KB)
----errors.go(477B)