<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">If you want the option to have word based vs char based, then open a Jira issue so we can track it. That'd give the front-end and possibly the user the option tune the diff.<div><br></div><div>Also, re accents, you could preprocess the inputs of diff to do folding. There's a filter in Lucene that is able to do this (in the context of Lucene indexing and searching, so not directly applicable here. But at least example code). So can ICU. If this is something that you think should be in JSword, as opposed to a front-end, open a Jira issue to track it.</div><div><br></div><div>WRT priorities, it will be low for me at least until av11n is done.</div><div><br></div><div>In His Service,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>DM</div><div><br><div><div>On Sep 1, 2012, at 10:20 AM, Chris Burrell &lt;<a href="mailto:chris@burrell.me.uk">chris@burrell.me.uk</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks for this. We've decided to stick with the letter options for now. As it highlights the subtle differences between words like saith and said rather well.<div><br></div><div>One thing I notice however, and I'm not sure how we would do this, is that the diffing takes account of the accents in the original text. I'm guessing there is no easy way to have that work out of the box, apart from changing the OSIS returned by the call and amending it prior to the diff occurring.&nbsp;</div>
<div><br></div><div>Chris</div><div><br><div><br></div><div><br><br><div class="gmail_quote">On 29 August 2012 19:00, DM Smith <span dir="ltr">&lt;<a href="mailto:dmsmith@crosswire.org" target="_blank">dmsmith@crosswire.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">It was based upon an earlier version of diff-match-patch, which was written in javascript, not java. The selection criteria I had was that it had to have a license compatible to JSword. When the original author was hired by google, the code changed to an incompatible license for porting. Since then it was ported to Java 5.<div>
<br><div>I ported the earlier version to Java 1.4. But I broke it out into multiple classes. (We might be able to eliminate our version and use the google version directly).</div><div><div><br></div><div>I think there is a way to have it do a word based match, but with code changes:</div>
<div><a href="http://code.google.com/p/google-diff-match-patch/wiki/LineOrWordDiffs" target="_blank">http://code.google.com/p/google-diff-match-patch/wiki/LineOrWordDiffs</a></div><div><br></div><div><br><div><div><div class="h5">
<div>On Aug 29, 2012, at 12:50 PM, Chris Burrell &lt;<a href="mailto:chris@burrell.me.uk" target="_blank">chris@burrell.me.uk</a>&gt; wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5">Hi all<div><br>
</div><div>The current diffing produces some fairly strange results from time to time. I was wondering how much work it would be to make it work for a word by word diff, rather than letter by letter. I've a quick scan through the diff-ing engine, but it looks fairly complicated and can't figure out how much of this is a copy of&nbsp;<a href="http://code.google.com/p/google-diff-match-patch" target="_blank">http://code.google.com/p/google-diff-match-patch</a> and how much has changed.</div>

<div><br></div><div>In the example below,&nbsp;</div><div><table>
      <tbody><tr>
        <td valign="top" dir="ltr"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"And God saw th<u>at th</u>e light <font><b>, that it was 
          good : and God divid</b></font><u>was good. And God separat</u>ed the 
          light from the darkness<font> </font>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"<br><br>The new diff would hopefully not chop "that and "the" &nbsp;in the first occurrence above. It would not chop "divid" off either, but rather have longer words, which would in turn make things slightly more readable.<br>

<br></td></tr></tbody></table></div><div>(bold indicates strike through)</div><div><br></div><div>Chris</div><div><br></div></div></div><div class="im">
_______________________________________________<br>jsword-devel mailing list<br><a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a><br><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div>
</blockquote></div><br></div></body></html>