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
0 answers

longest common substring for two strings

I am looking to find the substring of two different strings; the problem is as follows: Given two strings x = X1...Xn and y = Y1...Ym, find the length of the longest common substring, and the largest k for which in the indices i and j with…
0
votes
0 answers

Suitable approximate string matching algorithm for name and addresses

I am working on a project that contains a large number of names and addresses in its database. Names such as "John K Smith" and "Joe Smith", and addresses such "20 Theroad avenue" or "1345 Myplace st." In this project once a user X enters the…
neutral_sphere
  • 61
  • 1
  • 1
  • 7
0
votes
3 answers

what modifications should be done in edit distance algo if there are diffrent weights for addition/deletion or replacement

P.S. if there are diffrent weightage for addition , replacement and deletion . Than is there any algorithm which could help me . Or, what sort of modifications are required in Wagner–Fischer algorithm so as to minimize the edit distance if weights…
dhruvsharma
  • 125
  • 1
  • 13
0
votes
1 answer

Redundancy in Levenshtein distance algorithm

In the typical dynamic Levenshtein distance algorithm, to compute the value of cell d[i][j], where i and j are the row and column numbers, respectively, we take the minimum of d[i-1][j-1]+0/1, d[i-1][j]+1 and d[i][j-1]+1. However, it seems to me…
Sean Kelleher
  • 1,952
  • 1
  • 23
  • 34
0
votes
1 answer

how to efficiently check if the Levenshtein edit distance between two string is 1

please note that it doesn't require to really calculate Levenshtein edit distance. just check it's 1 or not. The signature of the method may look like this: bool Is1EditDistance(string s1, string s2). for example: 1. "abc" and "ab" return…
lidong
  • 556
  • 1
  • 4
  • 20
0
votes
1 answer

Comparing and visualising groups of sequences

I have two groups A and B of strings of the letters "AGTE" and I'd like to find some way of comparing these to see whether they are statistically similar. The first group A are real world observations, B are predictions. There are 400 or so in each…
HCAI
  • 2,213
  • 8
  • 33
  • 65
0
votes
1 answer

Transform one list of objects into another list

This is a theory question so I'm going to use pseudo code. I have a list of objects that I need to transform into another list. I implemented the Levenshtein algorithm, and that works just fine, but I need to preserve the objects, and not create new…
busbina
  • 549
  • 1
  • 7
  • 19
-1
votes
1 answer

Called object type 'int' is not a function or function pointer

I am kinda new to C++, therefore, I don't know what is the cause of this error, I am trying to solve the edit distance problem recursively, however, this error shows up. error: called object type 'int' is not a function or function pointer return…
-1
votes
1 answer

Does it matter which string is taken along the row and column in Min Edit Distance Problem?

The Problem:- So, i have taken the second string along the row and the first string along the columns-I am getting the wrong answer because of this. But i dont understand how and why?? also, for some value(i.e "table" and "bal") i am getting…
-1
votes
1 answer

Confused about the edit distance

Using the edit distance I have to find how many edits between two strings, which I have already done in my code below, but the part im stuck on is printing the 2d array the output is suppose to look like this: int editdistance(char *s, int ls, char…
TheOne817
  • 37
  • 6
-1
votes
1 answer

Sort an array of strings by "uniqueness"

I found the Levenshtein edit distance algorithm (via the damerau-levenshtein gem) and I think it suits my purpose well enough. This code compares every element to every other element in the array, adding the result of each comparison to a set of…
-1
votes
1 answer

Calculating similarity percentage based on criteria

I want to give an overall similarity rating to users to assess whether they are a suitable match or not. My data might look something like: User1: Casual Player, Speaks English, Plays Mondays User2: Serious Player, Speaks French, Plays…
-2
votes
1 answer

PyCharm end of statement unexpected

I am running PyCharm version 3.6.6 (I checked with sys.version command) and my interpreter is 3.6. The problem is with all the print function. This is the code for edit distance algorithm my teacher provided for us. We are suppose to just run this…
Fran
  • 98
  • 1
  • 12
-2
votes
1 answer

lavinshtein distance with dictionary

How to advance edit distance with operation take an anagram of the existing word. every interim step must be a word from a list of words .
-2
votes
1 answer

Edit Distance Dynamic Programing for very large input

I am solving the well known Edit Distance Dynamic Programing Problem.Actually the problem is given two strings string1 and string2 and given the cost for deletion,insertion and replacement of the character,I have to convert string1 to string2 in…
Aadil Ahmad
  • 139
  • 9
1 2 3
17
18