vivino / go-autocomplete-trie Goto Github PK
View Code? Open in Web Editor NEWgo-autocomplete-trie is a data structure for text auto completion that allows for fuzzy matching and configurable levenshtein distance limits
License: MIT License
go-autocomplete-trie is a data structure for text auto completion that allows for fuzzy matching and configurable levenshtein distance limits
License: MIT License
Hi,
while using this package to include a little form of an elasticsearch-like prefix-suggester, I've noticed that some words would be omitted in the results in some cases. A specific example:
"suspenseful" and "suspense".
I've created two testcases using only those two words that should, as far as I understand it, yield the same expected result.
For some reason, one of those tests will return the expected two strings that were inserted, but the other will only return the longer one.
Is this intended behavior?
{ name: "Word order small => big", dict: []string{"suspense", "suspenseful"}, trie: New(), search: "susp", expected: []string{ "suspense", "suspenseful", }, }, { name: "Word order big => small", dict: []string{"suspenseful", "suspense"}, trie: New(), search: "susp", expected: []string{ "suspense", "suspenseful", }, },
Best Regards,
Phillip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.