Questions tagged [edit-distance]

A string metric describing the differences between two strings. More specifically, it is the number of operations that transform one string into another string. Operations include the insertion, deletion, substitution, or transposition of a character in the string. Operations can be considered in combinations and may have different costs.

References

Edit distance (Wikipedia)

256 questions
0
votes
1 answer

How to interpret the output of networkx.optimal_edit_paths?

I want to visualize a sequence of graphs where one is edited into another one edit step at a time. One subtask in doing this is to create the intermediate graphs between a source graph and a target graph. networkx.optimal_edit_paths looks like a…
Galen
  • 1,128
  • 1
  • 14
  • 31
0
votes
1 answer

Editing distance with limit (threshold)

I work for a project in Java 8 and I want to compute the editing distance for 2 strings - in a iterative way (so without recursion); the method will be executed many times, so I need to improve it with a given limit (threshold), meaning that if the…
dacian
  • 95
  • 1
  • 8
0
votes
0 answers

How Can I Optimize This Recursive Edit Distance Function or Its Associated Data Filtration Function?

I built a recursive function to calculate the edit distance between two strings, which I need to iterate over thousands of distinct sentences in order to construct several JSON files for an app I'm updating. The edit distance function is giving good…
Joshua Harwood
  • 337
  • 1
  • 2
  • 15
0
votes
2 answers

Coq Program Fixpoint vs equations as far as best way to get reduction lemmas?

I am trying to prove that particular implementations of how to calculate the edit distance between two strings are correct and yield identical results. I went with the most natural way to define edit distance recursively as a single function (see…
0
votes
0 answers

Fuzzy search a positional inverted index

Using a positional inverted index structure, for example var index = new Dictionary>>() { ["bar"] = new Dictionary>() { [3] = new List() { 33, 45, 182 }, [18] = new…
theonlygusti
  • 11,032
  • 11
  • 64
  • 119
0
votes
1 answer

Edit-based distance(matching) with custom character substitution distance

I want to match a string with another string from OCR(Optical Character Recognition). Usually, OCR-read text are imperfect. In my case, 5's are misrecognized as S and so on. So I am wondering if there's a way to calucate a edit-distance with custom…
KH Kim
  • 1,155
  • 1
  • 7
  • 14
0
votes
1 answer

Oracle fuzzy searching with UTL functions

I need to implement fuzzy search on database layer, but I am having some minor issues. Here is my SQL code for demonstration : SELECT * FROM (SELECT * FROM TOOLS WHERE UTL_MATCH.jaro_winkler_similarity(UPPER('sample tool'), UPPER(NAME)) >…
0
votes
2 answers

Is there a way to perform edit distance between two string columns in a dataframe?

I have two datasets: dataset1 & dataset2 (image link provided), which have a common column called SAX which is a string object. dataset1= SAX 0 glngsyu 1 zicobgm 2 eerptow 3 cqbsynt 4 zvmqben .. ... 475 rfikekw 476 …
udkr
  • 55
  • 6
0
votes
1 answer

Bioinformatics: Understanding ViennaRNA RNAdistance scoring table

I'm trying to compare the output of 2 different algorithms of RNA structure prediction (my implementation of Nussinov vs RNA-mfold algorithm) using the RNAdistance algorithm that is part of ViennaRNA package. I'm getting a distance score of 38…
0
votes
0 answers

C - Dynamic Programming - Edit Distance

(I have simplified my code after reading advice) I am writing a program to take 2 strings and return the smallest editing distance as int. eg. str1 = ab, str2 = ab ; //distance will be 0. (when both char of str1 and str2 are the same, distance will…
keitou777
  • 21
  • 2
0
votes
0 answers

Cluster sequences in a network by their editing distance - in R

I have a dataframe my_df with 10,000 different sequences with different lengths (between 13to18) they comprised from different numbers (0-3) example of my data (60 lines)…
0
votes
0 answers

Fuzzy match one string with the start of another in Java

As shown in this question, Python regex has a neat and concise functionality to fuzzy match one string against the start of a second string (up to x character changes). In the following code snippet, x=1 (see e<=1). The first string is amazing, and…
Ian
  • 3,605
  • 4
  • 31
  • 66
0
votes
1 answer

Elasticsearch inconsistency in the fuzziness parameter with edit distance when used in fuzzy matching

I am trying to understand the effect of fuzziness in fuzzy search using span_near multiple clauses. Here I am doing a document count. Here is one query GET wikipedia-20200820/_search { "query":{ "bool":{ "must":[ …
Syed Arefinul Haque
  • 1,123
  • 2
  • 14
  • 38
0
votes
0 answers

Can the edit distance of two binary numbers of unequal length be approximated with a Mathematical technique?

I am trying to efficiently find the closest binary number from a list of binary numbers to a given binary number. The binary numbers I am working with contain no consecutive zeros and 3 consecutive ones at max. I have tried the following…
qwertyMozart
  • 1
  • 1
  • 1
0
votes
0 answers

Why my code doesn't print the right command of the edit distance?

I'm writing an edit distance program that print the right sequenze of command (ADD,DEL,SET). this is my code: int start(char *path,char *path2) { char *file1=openFile(path),*file2=openFile(path2); long int dim1=calcLen(path),dim2…
user13465503