Comments (4)
I can check if I can squeeze some more microseconds out of the code, but it's going to be difficult because even the PHPs function has O(N**3)
complexity.
from locutus.
thanks for your answer,
is there any javascript function that work like this? and can get percentage of similarity? a more efficient way @kukawski
from locutus.
Not exactly what you're looking for, but in this repository you will find function for calculating Levenshtein distance (src/php/strings/levenshtein.js).
Otherwise you can try out Jaro-Winkler similarity (https://www.geeksforgeeks.org/jaro-and-jaro-winkler-similarity/) which is O(n*m)
.
from locutus.
Not exactly what you're looking for, but in this repository you will find function for calculating Levenshtein distance (src/php/strings/levenshtein.js). Otherwise you can try out Jaro-Winkler similarity (https://www.geeksforgeeks.org/jaro-and-jaro-winkler-similarity/) which is
O(n*m)
.
thanks for your time <3
from locutus.
Related Issues (20)
- bin2hex() fails with unicode characters like Æ Ø Å æ ø å
- "contributing guidelines coding standards" url broken HOT 2
- [php/array/array_intersect.js] Simpler option HOT 3
- float bug and missing Q code HOT 2
- Linting upgrade HOT 1
- Failure to recognize some format and extract values in sscanf HOT 2
- [c/stdio/sprintf] %% consumes an extra arg HOT 5
- Question: Is strtotime Algorithmically Equivalent to the PHP Version? HOT 2
- hex2bin() Never Returns If More Than 1 Million Chars HOT 3
- Percentage for "similar_text" HOT 2
- Trying to get in touch regarding a security issue HOT 3
- strip_tags has some differences with php's version HOT 1
- Invalid syntax '/php/_helpers/_bc' in released '_locutus_shared/_locutus_shared_bc.js' HOT 2
- TypeError: Cannot read property '$locutus' of undefined HOT 1
- BUG : php function unserialize not working HOT 6
- Invalid serialization for floating numbers HOT 1
- Help - How install with Ionic? HOT 1
- bcmul is not working with decimal HOT 2
- fmod: toFixed() digits argument must be between 0 and 100
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 locutus.