“Grammar” is the systematic framework of rules that governs the structure, composition, and use of a natural language. For humans studying languages, a textbook grammar has often been a key resource to advance in the learning process. Not so for AI: it is grammatically competent without using a formal grammar because its grammatical “behavior” emerges from training on vast amounts of texts. Modern “Large Language Models” (LLMs) thus do not usually contain a transparent, human-readable grammar module – they are able to implicitly apply grammatical rules without stating them.
When Europeans – seafarers, traders and colonists – arrived in Southeast Asia and the Indonesian archipelago in the 16th century, they needed Malay primarily in two areas – to interact with the courts in Sumatra and the Malay peninsula, and in in trade and communication across the Archipelago where it had been used as a language of communications for centuries. To learn Malay, an oral approach served them perfectly well for a long time – picking up this language in conversation, using wordlists and so on – eventually speaking in a correct or understandable way.
The need for formal language instruction – and for a formal grammar – emerged with colonial expansion and missionary activities. At around 1680, members of the Dutch clergy embarked on a translation of the bible into Malay. Malay had to be taught to officials. Yet it took another 50 years until the first grammar of Malay was printed in Europe with funds of the Dutch East Indies Company – in 1736 in Amsterdam.
This grammar had been produced by a Swiss-Dutch pastor and Orientalist, Georg Heinrich Werndly (1693−1744). As a pastor, he had lived between 1719–1726 in Padang, Makassar and Batavia (today’s Jakarta) and subsequently given the task to complete the Bible translation into Malay. His family roots are in Zurich from where his father had moved to Lingen, Germany, working as a pastor.
For his grammar, Werndly made sure that Malay text samples are presented both in Roman and Arabic script. At the time, Malay was written primarily in Arabic script, and knowledge of that script was essential. For that purpose, the printer used typesets that were adapted or newly created for this grammar. Werndly’s textual sources – the example sentences – are mostly taken from Malay literature and religious books. He exposes us to the Malay of the Sultanates and courts much more than to that of the market.

I am interested in the history of the Malay language because of my work on Sumatran “singers of tales”. This week, I consulted a copy of Werndly’s grammar in the reading room of the Berne University Library…It was an impeccable copy, after 300 years of storage (one out of two that I could locate in Switzerland). When I mentioned this to the clerk on checking out, his remark was “Not sure if our digitalized books will last that long”.
Before finishing this post, I put a question to AI – “which grammars were used to train LLMs on Malay?” The answer was: “There is no publicly documented list of traditional Malay or Indonesian grammars that were directly inserted into, or systematically used to train, the major general-purpose AI models”. However, the answer to the prompt lists the language corpus databases – one of them with 4 billion words – that were used.