Sanskrit and AI - My Interview

Yana Meller (Яна Меллер), a journalist from Belarus had an interview with me and it is published in the OnAir magazine of Belavia - Belarusian Airline in July 2020 issue. The interview is published on pages 122 to 129 in Russian and English. The full interview is published in Russian and English version is shortened. For the audience who cannot read Russian, I am presenting here the English version of the full interview with the permission of the editor (permission is communicated to me by the journalist through email). The original published interview can be read here: https://belavia.by/webroot/delivery/images/OnAir_2020_JUL.pdf.

“I Wanted to Do What Nobody Else Was Doing round Me”

By profession, Diwakar Mishra is a Computational Linguist, and by his inner inspiration — a knowledge seeker. He spent most of his academic life (9 years) studying at Jawaharlal Nehru University in Delhi. There, for developing a speech synthesis, or text-to-speech system, for Sanskrit he received his Ph.D. degree as Sanskrit Computational Linguist. Since 2019, Diwakar has been working for “Amazon” in the Bangalore city, where he works as a Language Engineer for Alexa, an intelligent voice assistant. OnAir talked with the Ph.D. about the potential of Sanskrit as the language of artificial intelligence, robots possible impact on humanity, and the reasons why India can be called a miniature of the world.

Disclaimer: The views and opinions expressed in this interview are those of the interviewee and reflect the official policy of position of neither his present nor his past employer.

1. Do you remember your childhood dreams? What did you want to become?

I did not have specific career goals at that time because I did not know what was possible and what was good. But I notice two things in my behaviour. One, I wanted to impact large number of people for good. Second, I wanted to do what no one else was doing around me. I wanted to create new things.

2. When and why did you become interested in Sanskrit?

I started learning Sanskrit in school system at second standard. This was an exciting discovery that the Sanskrit verb forms, particularly third person singular forms, and some words for numbers are very close to Awadhi, the language I speak at home. I found that Awadhi (our language at home, I did not know the name of the language that time) is closer to Sanskrit than it is to the standard Hindi. Awadhi is officially a dialect of Hindi spoken in the middle region of my home state. So I was excited about Sanskrit and the use of Sanskrit at my home, in form of prayers and quotations made me comfortable with Sanskrit.

3. Do you live only in India? In what city?

Yes, I was born in Sitapur, I live in India, but traveled to Turkey and the USA for academic and work purpose. Since last year I have been living in Bangalore, in southern India. In the future I would like to travel more, but for now, my favorite place in the world is the Himalayas. I recommend you traveling by bike or motorcycle in the territory of Ladakh - I also have plans for it! This is the highest plateau of India, bordering two mountain ranges.

4. Please describe your country, how does it look like for you?

India is a miniature of the world. You find the Himalayas covered in ice in the north, you find the desert in the west, you get the world’s most rainfall in the east, and coastal areas and beaches in the south. You get planes in the north and plateau in the south. Thousands of languages belonging to five different language families are spoken here. The majority of the population knows more than one language. We are the second most populated country and we also have endangered tribes with only a few people left. We have the people following and preserving ages old knowledge and culture, and the people developing the most advanced technologies. We have rich people, we have poor people. We have very knowledgeable people, we have ignorant people. We have innocent people, we have cunning people. We have aggressive people, we have peace-bearer people. We have materialistic people, we have spiritual people. We have greedy people and we have very satisfied people whom no one can buy even when they have nothing. You can find the opposites living together in this country. You can find world’s all skin colours in the people of this country. People follow a variety of religions. There are so many local religions that people do not even know of. This is a nation that does not fit in the definition of one language, one religion, and one ethnicity.

Nature has blessed India with variety of its riches. But it is people of India which you will find more interesting. People open their hearts very easily to a person in their first meet. If you visit some pilgrimage site, you will find many people who not only talk spirituality, but they live it. You may be centre of attention of the public but most of the time it is not a reason to worry, because it is just a curiosity. Way of treating the guest differs in different parts of the country. In most part of the country, you will find people who are eager to talk to foreigner guests in broken English. Nature and people both have contributed in making the country special.

5. And what problems do you see in your country?

One thing I would like to improve is the formal education system. In the past few hundred years, the focus of the education has shifted from ‘way of life’ to ‘making a living’. Because of this the most people are not able to thrive to their full potential. This is concerning for me.

6. Let us talk about Sanskrit. Is it true that Sanskrit is included in the official languages of India and all pupils study it at schools?

Yes, Sanskrit is one of the 22 official languages of India and English is the 23rd official language. Around 20 years back, Sanskrit was a mandatory subject in most of the Indian schools. In later developments, when foreign languages were introduced at school level, some boards made these languages an alternate option of Sanskrit. But it is still true that majority of students study it in schools.

7. But, if to believe Wikipedia, less than 0, 0002% speak Sanskrit…

Yes, that is correct. That is the number of people who reported Sanskrit as their first language in the census of 2011.

8. Why don’t people use Sanskrit in their everyday life?

They do, only in a few villages and some scattered families. It is true that the most use of the language is in spiritual and academic contexts. I see two reasons of this. First, this is not the language of governance and market. The second reason is the method of teaching Sanskrit, which has developed an impression that Sanskrit is a difficult language, which is not as correct.

9. In 1985 Rick Briggs, a NASA scientist, published in AI Magazine his article “Knowledge Representation in Sanskrit and Artificial Intelligence”. Is it true that Sanskrit is the best language for machine learning?

Sanskrit is quoted as the best human language for computing in general, not for machine learning. The arguments in support of this lie in three factors, Sanskrit language itself, the model of Sanskrit grammar, and knowledge representation models available in Sanskrit texts. Sanskrit language combines the features of both artificial language and natural language which gives it an advantage over others. Sanskrit is similar to artificial languages because, first of all, it is less ambiguous than most other languages spoken by humans (not completely unambiguous). Secondly, it has not changed much over time, it is stable. And thirdly, it has one standard all over the world. Computers are comfortable with artificial languages where they can be given instructions without ambiguity. Sanskrit, like all natural languages, has a verified ability of expressing human thoughts. In an artificial language, you need to create expressions for every thought from scratch. By nature, it is easier for humans to learn a natural language than an artificial language. Another factor in support of computer suitability of Sanskrit is the Sanskrit grammar. The Sanskrit grammar by Panini is also a model of formal grammar. It has elements of programming like variable defining, listing, operational rules, meta-rules, inheritance, and environments. For the details on this, I would recommend an article “The System of Panini” by Prof. Girish Nath Jha. The third factor to support the argument is the knowledge representation techniques available in Sanskrit traditional texts. The “navya nyaaya” philosophy, and “meemaamsaa” philosophy, which deal with the ambiguity in language, can contribute to computer science, especially computational linguistics. I found a small evidence of computer suitability of Sanskrit when I was working on Sanskrit text-to-speech (TTS) system for my Ph.D. research. A TTS system requires conversion of written words to spoken form. Western languages primarily need pronunciation dictionary. Most of Indian languages need pronunciation dictionary for exceptions. But the Sanskrit TTS developed by me uses only rule-based word to pronunciation converter. It did not need a pronunciation dictionary for exceptions.

10. Developers with a strong base and a good understanding of algorithms learn new programming languages pretty fast. If you imagine that Sanskrit will truly become the language of artificial intelligence and machine learning, then developers will need to learn Sanskrit. How many years will it take?

People tend to learn difficult things if those benefit them. Until requirements and expectations of computing go far above and beyond the capabilities of programming languages of the time (present or future), I do not see people switching towards a natural language compiler and programming a real natural language. But if this happens, I still see that Sanskrit will be the best candidate language. In that case, people can definitely learn Sanskrit and then learning it will be easier than it is now. Because, then, there will be huge investment of money, resources and efforts in Sanskrit learning and teaching. English is seen as a difficult language in many countries but people learn it, because it is useful to them. For the very same reason, if Sanskrit benefits people, they will find ways to learn it.

11. As a person working with Artificial Intelligence, can I ask: How do you imagine our future? Will many professions be replaced by robots?

I have been reading the articles of AI experts on LinkedIn. They suggest that the age of AI is coming and it is closer than it was imagined earlier. Smart assistants, self driving vehicles, AI powered weapons are already a reality. AI has already reached a level where there is no point in doubting whether it will happen or not. The next question should be how to make AI not to harm human and the nature. Whoever has an answer to it, will probably rule the AI world for some time.

I am not worried about losing jobs to robots. Not so far in history, computers were seen as eating the jobs of many people. But what do we see today? Computer science is one of the biggest employment creators. Even if robots will replace many human professions, humans will shift to other professions. Robot antivirus and robot recycling will be new big industries. Smart phones and personal computers are getting smaller in their hardware size. Still they create huge amount of electronic waste which is difficult to manage. Robots will definitely not be so small and they will be outdated faster than smart phones. So they will require faster waste management. A virus in a PC or phone does so much harm but most of the time it does not harm physically. But a virus in a robot is more dangerous. Many people run their PC and phones without antivirus but I do not think people will take such risk with robots. The age of robots will also create an industry of raw material and basic parts of robots. So these are some new industries which will be created due to robots. And there will remain human involvement in the professions where we need human touch, like teaching, healthcare and entertainment. AI will be assisting there, not replacing humans.

12. Do you think is it possible to teach a robot to feel?

In my opinion, ‘imitating’ feeling in robots is definitely possible. Simply put, robots can be made to respond to external signals and stimuli in such a way that it looks like they are actually feeling something. Suppose you told a very funny joke to a robot and it starts laughing out loud, holding its stomach with hands, and leaning forward. It seems that it understood the humour. But what actually has happened? Sound of the joke told was recorded by the microphones. It was converted to text by speech recognition. The sound was also analyzed for emotional signal and the text was tagged with that information. Based on its previous learning, the text was classified as a joke and the joke was further classified with its degree of humour. Then there is a voice and physical action response set for that class and degree of humour. The motors in the robot are given the command sequence to act like laughing out loud. The motors execute the command in the predefined, or a function generated sequence. And we think the robot has understood the joke. We have seen many things being possible which were some time thought as impossible. So, even if it seems impossible to me, I will not say that.