Popularity
1.9
Growing
Activity
0.0
Stable
15
3
1
Programming language: Go
License: BSD 3-clause "New" or "Revised" License
Tags:
Data Structures
mspm alternatives and similar packages
Based on the "Data Structures" category.
Alternatively, view mspm alternatives based on common mentions on social networks and blogs.
-
gocache
A complete Go cache library with mutiple stores (memory, memcache, redis, ...), chainable, loadable, metrics cache and more. -
hyperloglog
HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. -
merkletree
Implementation of a merkle tree providing an efficient and secure verification of the contents of data structures. -
Bloomfilter
Face-meltingly fast, thread-safe, marshalable, unionable, probability- and optimal-size-calculating Bloom filter in go -
hilbert
Go package for mapping values to and from space-filling curves, such as Hilbert and Peano curves. -
gostl
Data structure and algorithm library for go, designed to provide functions similar to C++ STL. -
remember-go
A universal interface for caching slow database queries (backed by redis, memcached, ristretto, or in-memory). -
count-min-log
A Go implementation Count-Min-Log sketch: Approximately counting with approximate counters (Like Count-Min sketch but using less memory). -
nan
Zero allocation Nullable structures in one library with handy conversion functions, marshallers and unmarshallers.
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
Do you think we are missing an alternative of mspm or a related project?
Popular Comparisons
README
Multi-String Pattern Matching algorithm.
This implementation is inspired from Aho-Corasick algorithm
Getting Started
modelA = mspm.NewModel("mspm_model_A")
patternsToSearch = strings.NewReader(words) // words is newline seperated list of words/keywords
// build mspm model with patterns
modelA.Build(patternsToSearch)
inputString := "input document where the above pattern is searched for."
document := strings.NewReader(inputString)
output, err := modelA.MultiTermMatch(document)
// output ~= [{matched_word: n_count}, ..]
Test Coverage
TrieNode vs TrieHashNode benchmark
$ cd github.com/BlackRabbitt/mspm/ds/trie
$ go test -bench=.
goos: darwin
goarch: amd64
pkg: github.com/BlackRabbitt/mspm/ds/trie
BenchmarkTrieNodeInsert-4 500000 2582 ns/op
BenchmarkTrieNodeSearch-4 10000000 205 ns/op
BenchmarkTrieHashNodeInsert-4 1000000 1491 ns/op
BenchmarkTrieHashNodeSearch-4 10000000 206 ns/op
PASS
ok github.com/BlackRabbitt/mspm/ds/trie 8.795s
Resources
- Trie
- mspm - Multi-String Pattern Matching algorithm. Generally used for Information Retrieval.
- Aho-Corasick algorithm