Question

I need to implement a Diff algorithm in VB.NET to find the changes between two different versions of a piece of text. I've had a scout around the web and have found a couple of different algorithms.

Does anybody here know of a 'best' algorithm that I could implement?

Was it helpful?

Solution

Well I've used the c# version on codeproject and its really good for what I wanted...

http://www.codeproject.com/KB/recipes/diffengine.aspx

You can probably get this translated into VB.net via an online converter if you can't do it yourself...

OTHER TIPS

I like An O(ND) Difference Algorithm and Its Variations by Eugene Myers. I believe it's the algorithm that was used in GNU diff. For a good background see Wikipedia.

This is quite theoretical and you might wish to find source code, but I'm not aware of any in VB.

I don't know for sure if it's the best diff algorithms but you might want to check out those links that talks about SOCT4 and SOCT6

http://dev.libresource.org/home/doc/so6-user-manual/concepts

and also:
http://www.loria.fr/~molli/pmwiki/uploads/Main/so6group03.pdf http://www.loria.fr/~molli/pmwiki/uploads/Main/diffalgo.pdf

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top