tdauth / wc3lib

A collection of libraries and tools which help to modify the game Warcraft III: The Frozen Throne.
GNU General Public License v2.0
20 stars 3 forks source link

Improve string delta for wc3trans #1

Open tdauth opened 7 years ago

tdauth commented 7 years ago

Currently the delta is calculated by the byte difference using strcmp. It might be the case that one string is part of the other on a different position. Therefore use an algorithm to search for parts of the string in the other -> create a diff.

tdauth commented 7 years ago

http://stackoverflow.com/questions/5859561/getting-the-closest-string-match

and

https://en.wikipedia.org/wiki/Levenshtein_distance

tdauth commented 7 years ago

https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#C.2B.2B

tdauth commented 7 years ago

http://erikerlandson.github.io/algorithm/libs/algorithm/doc/html/algorithm/Sequence.html

tdauth commented 7 years ago

https://en.wikipedia.org/wiki/Approximate_string_matching