Skip to main content

Questions tagged [edit-distance]

A class of problems concerned with finding or minimizing the sequence of change operations (such as insertion, deletion, substitution, or transposition) to convert one list or string into another

3 votes
1 answer
282 views

I am working on a Python C-extension to calculate Damerau-Levenshtein distance. I am not really familiar with C at all--I just know that it generally has better performance. However, I am not sure how ...
stressed's user avatar
  • 133
3 votes
2 answers
340 views

I have a list of binary strings where each binary string max length is 15. I need to find list of integers which is count of similar (should differ by max 1 bit position) binary strings present in the ...
Harry's user avatar
  • 429
2 votes
0 answers
114 views

(See the previous iteration here.) After further revising my code, I have: com.github.coderodde.diff.Diff.java: ...
coderodde's user avatar
  • 32.3k
5 votes
2 answers
2k views

I have a list of words in English. My aim is to find all pairs of words that differ by exactly one letter (i.e. edit distance is 1). For instance: PAY-PLAY, WARM-ARM, WORD-WORK. The naive algorithm is ...
kodkod's user avatar
  • 441
2 votes
1 answer
161 views

(Previous and initial iteration lives here.) (The next iteration is here.) Now I was able to spare some lines by putting diff related state in an object. Also, I relied on ...
coderodde's user avatar
  • 32.3k
6 votes
2 answers
1k views

(See the next and second iteration here.) I have this toy implementation of the diff utility in Java: ...
coderodde's user avatar
  • 32.3k
0 votes
2 answers
184 views

Recently I have been developing a library for Java which provides utility functions for arrays, strings, etc.. While researching string similarity algorithms, I managed to write one of my own. I am ...
Temps's user avatar
  • 49
3 votes
0 answers
72 views

Well, I just have a lot of strings that have common parts between them and not all of them. By this reason, I wanted to group them by their longest common part and take from that the minimum from each ...
z3nth10n's user avatar
  • 247
2 votes
0 answers
52 views

My goal is to look for nearest neighbours in a Boolean-assigned mapping (a Python dictionary). For this purpose I'm looping through the candidates, starting from those with the closest distance. The ...
Felix Emanuel's user avatar
6 votes
2 answers
2k views

I wrote this module to find the Hamming distance between two strings. (It's a problem from exercism.io's Haskell track.) As I saw it, the problem has two distinct ...
Josh Friedlander's user avatar
5 votes
1 answer
126 views

Current implementation I am using a normalized weighted Levenshtein distance for two utf32 strings with the following costs (insertion: 1, deletion: 1, replacement: 2). The normalization is performed ...
maxbachmann's user avatar
2 votes
1 answer
763 views

Below is an implementation of Levenshtein Distance algorithm. I am trying to use modern C++ features as much as I can, i.e. auto, no pointer / raw memory but I feel like it is a constant struggle. ...
Cortex's user avatar
  • 440
1 vote
1 answer
204 views

I have a piece of code that calculates the edit distance between words and works, but it's apparently not fast enough. ClosestWords.java: ...
Schytheron's user avatar
1 vote
1 answer
906 views

How can I vectorize this function? It takes an array of array of tuples as input and computes the distance between elements using Levenshtein's method. I found some simpler examples but they weren't ...
OrangePi3's user avatar
1 vote
1 answer
104 views

I have the following sample data: target <- "Stackoverflow" candidates <- c("Stackflow", "Stackflow", "Stckoverfow") I would like to filter the string from ...
BigDataScientist's user avatar

15 30 50 per page
1
2 3 4 5
8