Friday, December 15, 2017

Sanskrit: Best Language for Computer-True or False?

We all hear this in many places, in different forums, websites - that Sanskrit is the best suited language for computers; that there are many studies and research in this regard, and even NASA has endorsed it; NASA to echo Sanskrit in space (really?). There was even a petition on change.org regarding this. How much of this true? What are the basis of these statements? Let us explore a little bit.
First, there is no evidence of NASA's endorsement or its study of Sanskrit. Second, there is no need of NASA or anybody's approval to prove the greatness of Sanskrit language. So, why is that the Sanskrit-computer relationship meme so widespread?

Apparently, this relationship has stemmed out of the notion that Sanskrit is a scientific, logical or mathematical language. And computers too are based on logic and mathematics, with some aura of mystery or smartness around them. Let us look at different aspects in play here.

Computer Programming Languages
When we say "language for computers", it is not clear whether it is a language used to program a computer (that is to build a logic to tell a computer what to do), or is it a language that a computer can speak? Some of the computer programming languages are C, C++, PHP etc. Programming of computer logic needs very precise keywords, syntax and semantics. Sanskrit is a contextual language, and not suited for this purpose. This is because computers are dumb machines without contextual understanding. In Sanskrit, the usage and meaning of a word or sentence depends on the context and needs proper interpretation.

Precision in Sanskrit
The closest association of Sanskrit with NASA appears to be in the form of a paper presented in 1985 by Rick Briggs (of NASA) in the AI Magazine (not affiliated to NASA), titled Knowledge Representation in Sanskrit and Artificial Intelligence. In this paper, the author puts forth the challenges of artificial intelligence (like robots) in understanding the natural (human) language. The paper explains the shortcomings of English language in adequately establishing the relationship between verb, subject, object and other words in a sentence. Then it mainly dwells upon the simplicity of usage of words in Sanskrit sentences using vibhakti endings (विभक्ति-प्रत्यय) and karakas (कारक). The author posits that this approach could make the human language understandable to the machines. This might work if machines can figure out the context of a sentence.

What matters
Historical and cultural inferences strongly indicate that Sanskrit was once a very widely spoken language in a large geographical area. Panini (around 600 BC - 400 BC) did a great job of compiling various usages in Sanskrit language and devising a set of rules to derive the different forms of nouns and verbs. Though there are some texts by other grammarians suggesting some additions to Panini's work, the original work is almost complete in covering the grammar of Sanskrit. Panini's algorithms established a baseline that is almost strictly adhered over centuries, till today. Based on Panini's work, many computational engines have been written that can spit out different forms of a Sanskrit word on a computer screen. The real wonder here is Panini and his work. Computer is just a tool to translate his algorithms. Artificial intelligence with Sanskrit is totally a different subject, although Panini's work may play a part in that, if the concept ever moves forward.

However, isn't it just wonderful that while Sanskrit can be made to fit within a rigorous grammatical framework, it can also linguistically scale up to the infinite quest of humans in exploring and understanding the universe and self?


1 comment: