Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Damerau-levenshtein distance Algorithm #5735

Open
Jivi-this-side opened this issue Oct 12, 2024 · 4 comments · May be fixed by #5869
Open

Damerau-levenshtein distance Algorithm #5735

Jivi-this-side opened this issue Oct 12, 2024 · 4 comments · May be fixed by #5869
Assignees

Comments

@Jivi-this-side
Copy link

What would you like to Propose?

~ Would like to add Damerau-levenshtein distance Algorithm in Dynamic Programming folder.

Issue details

The Damerau–Levenshtein distance is a measure of the similarity between two strings, which takes into account the number of insertion, deletion, substitution, and transposition operations needed to transform one string into the other.

The Damerau–Levenshtein distance differs from the classical Levenshtein distance by including transpositions among its allowable operations in addition to the three classical single-character edit operations (insertions, deletions and substitutions)
Time Complexity : O(M*N) (where M is the length of the first string and N is the length of the second one.)

Additional Information

This has a variety of uses in areas like:

~ Correction of misspelled words: The Damerau-Levenshtein distance is frequently employed in algorithms for spelling correction since it can quantify how similar a misspelled word is to a correctly spelled word in the dictionary. Following that, the algorithm may offer a list of words with tiny distances or the correct term with the least distance as potential corrections.

~ Natural language processing: The Damerau-Levenshtein distance can be employed in natural language processing tasks like text classification and language identification. For instance, the method can be used to determine how close a text is to a collection of recognized languages or categories, and then the text can be categorized according to the category with the least distance.

~ Computational biologly: The Damerau-Levenshtein distance is frequently used in computational biology to assess how similar DNA or protein sequences are to one another. Sequence alignment, mutation detection, and evolutionary link analysis can all be done using the technique.

@Jivi-this-side
Copy link
Author

Jivi-this-side commented Oct 12, 2024

Hi, @siriak ! Is it possible to assign me this issue!

@siriak
Copy link
Member

siriak commented Oct 13, 2024

I think it's already implemented here

. Isn't it the same?

@Jivi-this-side
Copy link
Author

Nope!!.... the mentioned Java code is not an implementation of the Damerau-Levenshtein distance algorithm.
The Damerau-Levenshtein distance is a modification of the Levenshtein distance that also considers transpositions (i.e., swapping two adjacent characters) as a single operation.

The provided code only considers insertions, deletions, and substitutions, but not transpositions. It is an implementation of the Levenshtein distance algorithm, not the Damerau-Levenshtein distance algorithm.

@siriak
Copy link
Member

siriak commented Oct 15, 2024

Ok, then please add Damerau-Levenshtein distance and we'll review it

@Shivam1-123 Shivam1-123 linked a pull request Oct 16, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants