[sword-devel] Comparing Verses

DM Smith dmsmith555 at yahoo.com
Wed Jan 18 18:42:08 MST 2006



Chris Little wrote:
> DM Smith wrote:
>> Someone has ported the GNU diff algorithm to Java (see 
>> http://www.bmsi.com/java/Diff.java)
>> It is written as the diff of two arrays.
>> I compared the code against analyze.c in GNU's diffutils and it looks 
>> like a straightforward port.
>> I think it would be trivial to port it to C++.
>>
>> Appropriately, it is licensed with the GPL license.
By appropriately, I meant that it was derived from GNU diff so it makes 
sense that it is GPL. The author of the java code tried to get 
permission to license it under LGPL, but the owners balked.
> I think I might be more inclined to use a BSD licensed version of diff 
> as a basis and to re-write the wdiff functionality so that we own it. 
> Even if we go the GNU diff route, we might want to rewrite wdiff 
> anyway since it does fairly little and could be handled better with 
> code specialized to our needs. (E.g. should we necessarily present 
> "heaven" vs. "heavens" as a change of a whole word? Or should we just 
> present the  difference of a single character, like "heaven{+s}". You 
> could also use this for orthographic variation, e.g. heaven vs. heauen 
> (1611 KJV spelling) > hea{v|u}en. And we could always make this 
> flexible and user-selectable.)
I agree about re-writing wdiff, especially if we have an in-core 
version. No sense going out to disk. The Java version takes two arrays. 
The content can be anything that can be compared as a Comparable.
>
> But the main reason I'd prefer a BSD licensed version of diff would be 
> that we actually have the potential of having all third-party code be 
> BSD/MIT/Apache/LGPL. The only exception, currently, is GNU regexp, I 
> believe. Once we get a replacement for that (probably by using either 
> ICU's Regex functionality or a BSD version of regexp), we'll have the 
> ability to permit groups to do non-GPL licensing from us (e.g. if ABS 
> wanted to do a branded version of BibleCS). There are no explicit 
> plans for anything like this (and, no, certainly no one has suggested 
> making Sword closed-source), but it would be nice to maintain the 
> possibility of having flexible licensing if we have the need.
I agree with this reasoning. There is a way around any GPL license and 
that is to use a plugin model. The plugin point must be able to accept 
any implementation of the interface.


More information about the sword-devel mailing list