Comments (4)
Thinking about this a bit more, I'm reluctant to replace the current implementation with something twice as slow with vague real-world advantages. I think a better approach would be to make the edit distance function pluggable (with the current LevenshteinDistance
function as a default).
I will investigate how this can be done without breaking changes (hopefully). And afterwards maybe you can contribute a DamerauLevenshteinDistance
function? What do you think?
from fuzzysearch.
It would be nice to see some benchmarks comparing them.
from fuzzysearch.
I have implemented the Damerau–LevenshteinDistance(Optimal string alignment distance), and do some benchmark on them.
It seems like Damerau–LevenshteinDistance is 2x slower than LevenshteinDistance.Do you think it's an acceptable change?
If the performance is ok, I will clean the code and raise a pr
from fuzzysearch.
Thinking about this a bit more, I'm reluctant to replace the current implementation with something twice as slow with vague real-world advantages. I think a better approach would be to make the edit distance function pluggable (with the current
LevenshteinDistance
function as a default).I will investigate how this can be done without breaking changes (hopefully). And afterwards maybe you can contribute a
DamerauLevenshteinDistance
function? What do you think?
I think it's good idea.I'm looking forward that
from fuzzysearch.
Related Issues (20)
- RankFind does not use Levenshtein distance to build results HOT 6
- Introduce gopkg support HOT 2
- new type for targets HOT 2
- Expose Normalize function
- RankMatch seems to be broken HOT 3
- Getting error:" github.com/lithammer/fuzzysearch: module github.com/lithammer/fuzzysearch@latest found (v1.1.2), but does not contain package github.com/lithammer/fuzzysearch" HOT 3
- Document differences with bevacqua/fuzzysearch HOT 1
- Add case insensitive RankFind HOT 2
- New Release + upgrade to go 1.18. HOT 5
- Unecessary alocations due to transformer.Nop HOT 2
- Exact match mode?
- Using MaxInt instead of -1
- Consider implementing support of multi-byte character sets HOT 4
- Use of CMOV instruction in Levenshtein's minimum function HOT 1
- mishandling of utf8 replacement character HOT 2
- support a method for returning matched indices for characters
- support match for reversed words
- panic in transform.go when it's trying to reslice HOT 2
- Case insensetivity HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuzzysearch.