News for hackers. Stuff that matters.
Re:Unicode Utilities: Confusables by hilbert42 on Saturday August 20, 2022 @06:37PM (#32535765)
Potentially this is a big problem. Especially with OCR, transliterations from and across different languages, characters missing their diacriticals, etc.

Whilst I was aware of the problem I wasn't aware that it's as big as it is. Those of us who use Latin scripts are reasonably familiar with the common ones such as o, O and 0 [l/c, u/c alpha & zero], but there's some tricky ones even in these Latin scripts that many of us get wrong.

As I discovered a while back - but I can't remember how - most of us get the World War Two abbreviation WWII wrong (myself included). The 'II' is not two alpha characters as we almost inevitability use but rather it should be the Unicode characters for Roman numerals. Even then I cannot remember if the correct transliteration for Arabic numeral 2 is supposed to to be Roman numeral '1' used twice/repeated or if Roman numeral '2' actually has its own Roman numerical glyph (I suspect the latter is correct). There are many more instances like this too, the dash, minus sign, en and em dash for instance.

Yes, I could look them up but it's a nuisance to do so on-the-fly and that's the whole point/trouble.

It seems to me we need much better proofing tools that would flag errors or potential errors. I reckon we've been very poorly served in this regard in that there no simple software tools available of the quality we need.

It's not only symbols or characters we need to correct but also typos that don't show up on spelling checkers such as for and fro and the big troublemakers it's and its. Spelling and grammar checkers should automatically highlight or flag such words whether their usage is correct or not.

Re:Unicode Utilities: Confusables by CharlesW on Saturday August 20, 2022 @07:23PM (#32536027)
> …most of us get the World War Two abbreviation WWII wrong (myself included). The 'II' is not two alpha characters as we almost inevitability use but rather it should be the Unicode characters for Roman numerals.

FWIW, this example is really, really far down on the list of things you'll be going to typographic and/or semantic hell for. It doesn't impede communication, and I'd guess that using the Roman numeral glyphs would actually break stuff that assumes the usual/normal Latin representation.

From https://en.wikipedia.org/wiki/Roman_numerals#Unicode: "The Unicode standard, however, includes special Roman numeral code points for compatibility only, stating that '[f]or most purposes, it is preferable to compose the Roman numerals from sequences of the appropriate Latin letters.'"

> Potentially this is a big problem.

I wonder how far context can go to mitigate this in OCR applications?

> Unicode Utilities: Confusables

Re:Unicode Utilities: Confusables by hilbert42 on Tuesday August 23, 2022 @08:45AM (#32564077)
FWIW, this example is really, really far down on the list of things you'll be going to typographic and/or semantic hell for. It doesn't impede communication,...

Totally agree, it's just that on occasions I've seen others raise the matter as an excellent example of how complex Unicode can be. Using a well-known, well used example clearly illustrates the point.

However, the matter of data integrity and machine learning is another matter altogether as meanings can easily be misinterpreted if wrong characters are used. One of the biggest problems of course is the transliterations of scripts both ancient and modern. This is a serious issue for historians and archivists and it's the reason for why Unicode makes such distinctions.

Considering these serious limitations, it's little wonder why OCR is not used as much as it ought to be. Take any text PDF on the Internet Archive that's derived from an image scan of a book and you'll find the error rate to be enormous. Clearly, these errors are why the IA offers books in both text and 'raw' image forms. Similarly, many newspaper publishers have usergroups of readers who correct scans of historical newspapers.

Obviously, this is very time consuming and somewhat defeats the purpose of OCR, it still however is a more accurate and much faster process than retyping the text.

The only real longterm solution is AI/machine learning and even then it won't be perfect. Statistics (hit/error rates for any given text) will come into play. Texts that are converted with, say, a deemed accuracy of 99.99% [my guesstimate] would be exempt from further correction but still marked with '99.99%' in the attached metadata - here the metadata is everything. Others will be flagged for correction with the potential errors flagged.

This needs new conversion format rules for OCR, as I see it, both metadata and the original scans should always be embedded within the 'converted' file. As far as I'm aware whilst work has progressed along these lines we're still a long way from a practical working solution.

Re:Unicode Utilities: Confusables by nerdponx on Saturday August 20, 2022 @07:15PM (#32535982)
Unicode does have both upper- and lower-case Roman numerals, U+2160 to U+2188.

But I doubt that the Romans had any clearer of a sense than you of whether "II" was one letter or two. It probably varied across eras and regions, and most people probably didn't think one way or another about it. It's probably not such a big deal to write II when you meant U+2161.

However, I definitely do agree that we are badly lacking in good software tools to help us enrich the set of letters that we can easily use. Imagine if you could type "II" and your text editor could offer to replace it with "Ⅱ".

On the other hand, font support is a limiting factor. For most purposes, II should looks similar to Ⅱ. But in our current world, you are at the mercy of whatever fonts that happen to implement Ⅱ, which might be totally different from how II looks.

Re:Unicode Utilities: Confusables by hilbert42 on Tuesday August 23, 2022 @01:14PM (#32567974)
Yeah, right. I don't think the Romans would have given it much of a second thought if at all. It's only an issue from our modern perspective, preserving data integrity in electronic records is the principal reason. Whilst 'I' '1' or 'l' are essentially just vertical strokes or lines and there's not much to distinguish between them, especially so with the glyphs of some sanserif typefaces, ascetics also play a role and likely more so with certain other characters. Incidentally, here the spelling checker threw up rôle as an alterative which is a somewhat related point.

FYI, I've somewhat expanded on my earlier comment in reply to CharlesW.

Re:Unicode Utilities: Confusables by kevin_thibedeau on Saturday August 20, 2022 @09:30PM (#32536622)
> Imagine if you could type "II" and your text editor could offer to replace it with "Ⅱ".

MS Word has had this for decades.

Re:Unicode Utilities: Confusables by garaetjjte on Saturday August 20, 2022 @09:58PM (#32536737)
You shouldn't try to use every weird dedicated character Unicode has. Usually they are included for full round-trip compatibility with other encodings. (like Ω ohm sign vs Ω omega which is preferred). About Roman numerals Unicode standard says: For most purposes, it is preferable to compose the Roman numerals from sequences of the appropriate Latin letters.
Re:Unicode Utilities: Confusables by mongol on Sunday August 21, 2022 @12:30AM (#32537431)
I doubt Romans used unicode. Do we have evidence they did see the numeral character I as different from I as used in text?
Re:Unicode Utilities: Confusables by alganet on Sunday August 21, 2022 @05:53AM (#32538712)
Maybe.

We know the Romans were influenced by the Greek, and the Greek by the Minoan.

Both the Greek and Minoan had their own numerals:

https://en.wikipedia.org/wiki/Aegean_numerals https://en.wikipedia.org/wiki/Greek_numerals

Before the Romans, the Greeks were already using phonetic letters as numerals. They did saw Iota as either a number or a phoneme depending on the context.

Looking at these older sytems, it looks like the romans just mixed both approaches, either on purpose or not. (I have absolutely no evidence to support this, it's a guess).

Maybe the problem is really older than we think?