5

Revisions for Japanese text are difficult to read as often an entire <p>aragraph is marked as having been changed.

In this post a single character was changed (revision 2). However, the inline, side-by-side and side-by-side markdown diffs look as follows.

enter image description here enter image description here enter image description here

It would be better if a "word boundary" is at least detected as a change of script (hiragana vs. katakana vs. kanji).

1
  • Oh thanks I find another error looking at the image :) Commented Apr 26, 2016 at 15:12

2 Answers 2

3

I apologize for having missed this before. We actually added the possibility to enable a heuristic for Japanese compound segmentation in the diff engine, it was just never enabled on this site. I have enabled it now. Your example now looks like this:

screenshot of the improved diff

I think the fact that (unlike on Japanese Stack Overflow) this site contains a mixture of English and Japanese shouldn't be a problem, but we should keep an eye on that to be sure.

1
  • Fantastic, thank you! Oh... this is so much nicer.
    – Earthliŋ Mod
    Commented Jul 12, 2016 at 8:15
1

I know the Unicode Consortium has already defined how to mechanically decide word boundaries. The algorithm is comparatively simple if Unicode properties are available, and sufficient to fulfill this site's need, at least.

Side effects unassessed.

7
  • If decent word boundaries were implemented, revisions on jp.stackoverflow.com would benefit as well, I think.
    – Earthliŋ Mod
    Commented Apr 26, 2016 at 17:33
  • @Earthliŋ 確かに…! Commented Apr 26, 2016 at 17:36
  • @Earthliŋ Oh, by "side effects" I mean lest it break some other foreign languages. But well, active SE sites that require non-alphabet are only Japanese, Chinese and Hebrew (mathese excluded), so far so good... Commented Apr 26, 2016 at 17:45
  • Oh, there's Arabic... Commented Apr 26, 2016 at 17:49
  • Arabic? I don't there is an active site in Arabic... I guess Arabic is used on Islam.SE and Hebrew on Mi Yodeya.
    – Earthliŋ Mod
    Commented Apr 26, 2016 at 18:27
  • Yes that was what I tried to say. Sorry for confusion :) Commented Apr 27, 2016 at 7:30
  • 1
    @Earthliŋ I also found Hinduism SE with much Devanagari, but thankfully they use spaces. Commented Apr 29, 2016 at 11:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .