Wednesday, October 2, 2019

More Arabic and Arabist stuff

Only a year has gone by, and another blogpost already! - But again, mostly for people writing Arabic or transliteration of it on Apple products. I used to have a full website of this (now at org.uib.no/smi/ksv), but I have not had time to keep that updated, and anyway; with Unicode and standardization, the use for it has decreased. Most things now on the Mac do work with Arabic, with the latest versions we can write reasonably well Arabic even in Microsoft Word (although I still prefer Mac-only NisusWriter for this).

So, I can rather use this blog for the occasional burst of insight I may acquire. Perhaps it will even turn up in google searches, so somebody reads it. However, for today there are two items, one for the Mac, the other for iOS (iPads in particular).

First: iPad: More on writing Diacritics.


Below, you will find a blog I wrote last year (2018) about using the Smart keyboard (i.e. the plastic hardware) for writing transliteration on iPads. This has not changed, except that Apple now makes these hardware keyboards for all current iPads, not just the iPad Pro. However, it is still a very expensive solution, $159 for all - probably not worth it, if you do not want to have this keyboard for other reasons. But too much just for the transliteration.

However, there is a simpler solution on the iPad itself, no hardware required, which only costs $5, and that is worth it. I mentioned it in the blog last year, but only in passing, because it was not terribly convenient. But now it is (or maybe it always was, I just did not notice). It is the app Unicode Pad Pro (“with keyboards”, it calls itself). There is a free version, Unicode Pad Express, but that lacks the crucial element, so splurge on the $4.99 Pro version.

The method is like this:

In the app, select «Notepad», and “click” in the open text field to open the on-screen keyboard. This has five tabs on top, named ABC, I, II, III, IV, V. Those named II - V are empty, and you can fill them with your diacritics:


(1) Go to «Catalog» (the cabinet icon top left of keyboard), and in the Unicode catalogue locate the characters you need. It is probably easiest to find them in the option «Unicode Blocks». Long vowels (āīū) are in the block «Latin Extended-A», while emphatics, ṣḍṭẓ, are in Latin Extended Additional. ‘Ayn and hamza are in «Spacing modifier letters». For each character you want, press and hold, and you will see «Copy». Do that, return to notepad keyboard, select an empty slot and paste the character (press the slot and hold). Repeat until you have those you want in the order you want.

(2) When you have got your keyboard set up with the characters you need, exit the Unicode Pad app, and go to the Settings app, to General, and choose Keyboards. At the top, you see a «Keyboards» item, click the > beside it, and in the following choose «Add keyboard». You should then in the «Add keyboard» window, find «Third Party Keyboards», and Unicode Pad listed there. Select it to add to your installed keyboards. You should probably also choose «Give full access» to the keyboard.

(4) Now, your custom keyboard has been added to your iPad. Open any text program that allows typing. Clicking on the globe icon on the onscreen keyboard will cycle through your installed keyboards, among them now Unicode Pad; and you will see the same selection of ABC, and I … V layouts. Thus, you can type directly using this keyboard layout into your text editor, rather than having to open the Unicode Pad app and copy/paste from there. For your regular text, you can select the ABC panel, and so switch back and forth between ABC and your Diacritics keyboard as you type, all within the Unicode Pad keyboard.

Have your Mac read Arabic to you


The second topic is on the Mac. Many may have discovered that you can have the Mac read out to you any typed text, using a “computer voice”. Many apps (like Nisus and Apple's apps) have a “Speech” menu item that controls this, others like Microsoft Word and Safari let you do it through a command key. However, this is of less use for multilingual users, as e.g. French or Norwegian text is read out as if the words were English, i.e. virtually incomprehensible. Useful only if your text is written in the same language as the “speaker” has.

It turns out that you can control this, however. It is just put a place you probably would not think to look. Go to the System Preferences panel Accessibility, and select the Speech (Text to Speech) panel. There you will find at the top of the panel, the menu System voice, with perhaps several voices, in one or more languages. Select “Add”, this will show you a large variety of voices in many languages, including French, German and - this is the point - Arabic. There are three Arabic voices, Laila, Maged and Tarik, available for download. Download those you think you will use. Then, you can use this panel to choose which voice, and hence language, your typed text (or Safari page) will be read out in.

For applications like Word or Safari that do not have a “Speech” menu, you can set up a command keystroke (default is Option+Esc) which will read out any selected text.
          Unfortunately, it does not appear that the Mac (or the apps, they rely on the system for this) is able to link this choice of voice to any language setting in the app. In Word and Nisus and many others, you can define your text to be in “English (UK)” or “French” etc., for spell checking, but this has no effect on the reading language, you have to visit the Accessibility panel each time to choose your language. There is an option, however, to make Accessibility a menu bar item, so you can quickly go to this panel and change language for reading when you need to.

In the same panel, you can choose the speed of reading. For non-native users of Arabic, you may slow the speaker w-a-y down, so that you hear every syllable clearly - you can then even hear its choice of iʿrāb. Because, yes, the Arabic voice will read unvocalized text, and even conjugate the words in the sentence (presumably only if it makes any sense). It seems to do this even if you are offline, so the grammar analysis must be done on the Mac itself. I have not tested how accurate it is, but at least it gives a suggestion for how words should be vocalized and the sentence structured - as long, of course, as the words are in the Mac’s Arabic dictionary (which it must thus have somewhere), and are meaningful. All of this may be pointless to the native speaker, but for any learner of Arabic it may be a useful little aid, to get a suggestion of how a text could be read. And it is certainly a useful tool, in any language, for proof-reading or checking that you have typed an original text correctly, looking at the written original while you hear the typed text being read out to you.

No comments:

Post a Comment