Rosetta Code:Village Pump/LevenshteinDistance

From Rosetta Code
Revision as of 13:08, 16 November 2020 by rosettacode>Caislen (Created page with "{{Vptopic |topic=LevenshteinDistance |summary=How to contribute and fix errors }} So, been using RC for a while, but recently trying to find my around here in order to help...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
LevenshteinDistance
This is a particular discussion thread among many which consider Rosetta Code.

Summary

How to contribute and fix errors

Discussion

So, been using RC for a while, but recently trying to find my around here in order to help contribute. However, I am unsure regarding a few ways-of-working.

On the Levenshtein Distance page, for example, there is source code for a few different solutions in Java. The "optimized solution" is tagged with "Translation of: Python". Unfortunately due to differences in how arrays are initialized, the Java translation have a bug difficult to detect. The python code works fine, and the Java code works fine with the provided examples. But the Java version of the algorithm results in incorrect answers for a small subset of strings. One example is ["abcdefgh", "defghabc"] with the correct answer being 6 and the published version resulting in 5.

So, how do I help fix this?

Do I edit the Java translation, fix the bug, and make it a permanent non-translated version? If so, should I somehow still credit the Python version?