Better natural language processing in Mojave

Apple’s demonstrations of natural language processing (NLP) in Mojave, shown at WWDC in June, were impressive. My second alpha release of Nalaprop now enables those running beta releases of Mojave to explore its NLP support in more detail, and hopefully without any crashes.


When you have opened a text file or pasted text into the lefthand pane, click on the Parse button in the centre top to see the text parsed into parts of speech in the righthand pane. You can parse text consisting of two or more different languages: after parsing, that shown in the Language box above will be what macOS considers to be the ‘dominant’ language.

In this mixture of Russian and French, it is the Russian which is deemed dominant. However, Mojave’s NLP processing still automatically recognises and parses each of the languages which it supports, so where the text switches from Russian to French, parsing switches from Russian to French and displays both correctly parsed. This is extremely impressive.

This version of Nalaprop uses that initial parsing not only to determine the dominant language and display the parsed text on the right, but it also populates a popup menu for Type of parsing and enables a second parsing (the Parse 2 button) according to that type. The list of types available for a language gives you a good idea of the current level of support for that language.


In this case, I selected Language in the popup menu. The display on the right now shows, word by word, the language type for the text. You can see its sharp and accurate change from ru (Russian) to fr (French).


You can now see word by word the parse tags, using the NameTypeOrLexicalClass setting in the Type menu.


Another option, for languages in which it is supported, is for parsing to give the Lemma or ‘root’ of each word. So in French, for example, the root of le, la, and les is given as le. This also gives the infinitive form of verbs, where appropriate, which is very useful when learning a language or trying to translate it.

Nalaprop supports all languages and parsing which are supported in the version of Mojave being used.

Nalaprop version 1.0a2 for macOS 10.14 Mojave is now available from here: nalaprop10a2
and in Downloads above.

Sadly, it does not run at all on High Sierra or earlier, as it is dependant on Mojave’s sophisticated NLP engine.