a computational analysis of mahabharata · epics such as ramayana and mahabharata. hence we have...

10
D S Sharma, R Sangal and A K Singh. Proc. of the 13th Intl. Conference on Natural Language Processing, pages 219–228, Varanasi, India. December 2016. c 2016 NLP Association of India (NLPAI) A computational analysis of Mahabharata Debarati Das UG student,Dept. of CSE PES Institute of Technology Karnataka, India Debarati.d1994 @gmail.com Bhaskarjyoti Das PG Student, Dept. of CSE Visvesvaraya Technological University Karnataka, India Bhaskarjyoti01 @gmail.com Kavi Mahesh Dean of Research and Director KAnOE-Center for Knowledge Analytics and Ontological Engineering PES University, Bangalore Drkavimahesh @gmail.com Abstract Indian epics have not been analyzed com- putationally to the extent that Greek epics have. In this paper, we show how inter- esting insights can be derived from the an- cient epic Mahabharata by applying a va- riety of analytical techniques based on a combination of natural language process- ing, sentiment/emotion analysis and so- cial network analysis methods. One of our key findings is the pattern of signif- icant changes in the overall sentiment of the epic story across its eighteen chapters and the corresponding characterization of the primary protagonists in terms of their sentiments, emotions, centrality and lead- ership attributes in the epic saga. 1 Introduction Large epics such as the Mahabharata have a wealth of information which may not be apparent to hu- man readers who read them for the fascinating sto- ries or spiritual messages they contain. Compu- tational analysis of large texts can unearth inter- esting patterns and insights in the structure, flow of stories and dynamics of the numerous charac- ters in the intricate stories that make up the epics. Unfortunately, not much attention has been paid to applying natural language processing and other related techniques to carry out computational anal- yses of Indian epics. In this work, we attempt to carry out detailed analyses of the Mahabharata epic. Sentiment and social network analyses have been applied mainly to structured texts such as tweets, emails etc. to discover user sentiments or important personalities. Comparatively literary works are less subjected to computational anal- ysis as there are no immediate business incen- tives. However,similar techniques can be adopted towards appreciating the literary work, to under- stand underlying social network and to find or val- idate literary truths. As literary text is built around a social backdrop, it reflects the society the author lives in and reveals a lot about the contemporary social setting. Unlike SMS and tweets, genre is important in literary text. Amongst the past and recent liter- ary genres, epics and novels have seen most of the work in the Digital Humanity community as the scope is typically large in terms of time, number of events and characters to facilitate computational analysis. The Greek epics Iliad and Odyssey, the English epic Beowulf, novels such as Vic- tor Hugo’s Les Miserable and works of William Shakespeare are some of the examples. How- ever, there is no major existing work around Indian epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related work The first important step in computational analy- sis of a literary text is to identify the protago- nists. Next the relatedness of the protagonists can be computed to form the underlying social net- work. There are essentially two methods to cap- ture social network from a literary text. One op- tion is to capture all social events such as con- versations assuming that all characters participat- ing in a social event are socially related. This method does not work well for narrative intensive text. The other method assumes that all charac- ters appearing in a given co-occurrence window have some kind of social relations. This approach ends up considering even insignificant characters but works better for narrative based texts such as epics. Newman and Girvan’s work (2004) to de- tect the communities in Victor Hugo’s Les Mis- erable is the first major effort to find the social network from narratives. Sack (2012) deduced 219

Upload: others

Post on 13-Feb-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A computational analysis of Mahabharata · epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related

D S Sharma, R Sangal and A K Singh. Proc. of the 13th Intl. Conference on Natural Language Processing, pages 219–228,Varanasi, India. December 2016. c©2016 NLP Association of India (NLPAI)

A computational analysis of Mahabharata

Debarati DasUG student,Dept. of CSE

PESInstitute of Technology

Karnataka, IndiaDebarati.d1994

@gmail.com

Bhaskarjyoti DasPG Student, Dept. of CSE

VisvesvarayaTechnological University

Karnataka, IndiaBhaskarjyoti01

@gmail.com

Kavi MaheshDean of Research and Director

KAnOE-Center for Knowledge Analyticsand Ontological EngineeringPES University, Bangalore

[email protected]

Abstract

Indian epics have not been analyzed com-putationally to the extent that Greek epicshave. In this paper, we show how inter-esting insights can be derived from the an-cient epic Mahabharata by applying a va-riety of analytical techniques based on acombination of natural language process-ing, sentiment/emotion analysis and so-cial network analysis methods. One ofour key findings is the pattern of signif-icant changes in the overall sentiment ofthe epic story across its eighteen chaptersand the corresponding characterization ofthe primary protagonists in terms of theirsentiments, emotions, centrality and lead-ership attributes in the epic saga.

1 Introduction

Large epics such as the Mahabharata have a wealthof information which may not be apparent to hu-man readers who read them for the fascinating sto-ries or spiritual messages they contain. Compu-tational analysis of large texts can unearth inter-esting patterns and insights in the structure, flowof stories and dynamics of the numerous charac-ters in the intricate stories that make up the epics.Unfortunately, not much attention has been paidto applying natural language processing and otherrelated techniques to carry out computational anal-yses of Indian epics. In this work, we attemptto carry out detailed analyses of the Mahabharataepic.

Sentiment and social network analyses havebeen applied mainly to structured texts such astweets, emails etc. to discover user sentimentsor important personalities. Comparatively literaryworks are less subjected to computational anal-ysis as there are no immediate business incen-tives. However,similar techniques can be adopted

towards appreciating the literary work, to under-stand underlying social network and to find or val-idate literary truths. As literary text is built arounda social backdrop, it reflects the society the authorlives in and reveals a lot about the contemporarysocial setting.

Unlike SMS and tweets, genre is important inliterary text. Amongst the past and recent liter-ary genres, epics and novels have seen most of thework in the Digital Humanity community as thescope is typically large in terms of time, numberof events and characters to facilitate computationalanalysis. The Greek epics Iliad and Odyssey,the English epic Beowulf, novels such as Vic-tor Hugo’s Les Miserable and works of WilliamShakespeare are some of the examples. How-ever, there is no major existing work around Indianepics such as Ramayana and Mahabharata. Hencewe have chosen Mahabharata as the target text fora computational analysis effort.

2 Related work

The first important step in computational analy-sis of a literary text is to identify the protago-nists. Next the relatedness of the protagonists canbe computed to form the underlying social net-work. There are essentially two methods to cap-ture social network from a literary text. One op-tion is to capture all social events such as con-versations assuming that all characters participat-ing in a social event are socially related. Thismethod does not work well for narrative intensivetext. The other method assumes that all charac-ters appearing in a given co-occurrence windowhave some kind of social relations. This approachends up considering even insignificant charactersbut works better for narrative based texts such asepics. Newman and Girvan’s work (2004) to de-tect the communities in Victor Hugo’s Les Mis-erable is the first major effort to find the socialnetwork from narratives. Sack (2012) deduced219

Page 2: A computational analysis of Mahabharata · epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related

the plot from network by using concepts of struc-tural balance theory. Elson et al.(2010) proposeddialogue based method to extract social network.Jayannavar et al. (2015) updated Elson’s approachby broadening the scope of conversation to so-cial events. Rydberg-Cox (2011) extracted so-cial networks from Greek tragedies. Agarwal etal.(2012) showed that a dynamic network analy-sis can present more subtle facts. Beveridge andShan (2016) built the underlying social networkfor the third book (“A storm of swords”) of the TVseries “Game of Thrones” with a co-occurrencewindow of 15 words. Stiller et al. analyzed tenof Shakespeare’s plays (2003) also based on theco-occurrence logic. Carron and Kenna (2012)provided a quantitative approach to compare net-works. Mac Carron et al.(2014) did a structuralanalysis of Iliad, English poem Beowulf and Irishepic Tain Bo Cuailnge. P. J. Miranda et al.(2013)has done a structural analysis of underlying so-cial network of Homer’s Odyssey. Alberich etal.(2002) have built a social network from Marvelcomics.

As Mahabharata is an epic, we must mentionPoetics by Aristotle and an excellent commentaryprovided by Lucas (1968). Aristotle defined lit-erary genres such as poetry, tragedy, comedy andepic. Poetry mimics life. Tragedy is a type of po-etry that showcase noble men and their noble qual-ities as well as values. Epics such as Mahabharataare a type of tragedy and are built around noblemen in the form of narratives. A tragedy typicallyhas a plot with a beginning, a middle and an endand other constituents of the text are secondary tothe plot. The beginning of the plot typically is ascenario of stability which gets disturbed by someevents. The middle is where the disequilibriumcomes in along with lot of events and actions bythe characters. All the events and actions are to-wards achieving the end where the problem getsresolved and stability sets in again. Plots have var-ious constituents i.e. suffering, reversal, recogni-tion of new knowledge, surprise. An epic is differ-ent from a more recent literary genre like a noveland will have lot of negative sentiment across itsbreadth but in spite of that conveys a noble themein the minds of its audience.

One can measure sentence polarity by refer-ring to some standard thesaurus where polar-ity measures are preassigned by researchers.Thisapproach uses a resource like SentiWordnet

(http://sentiwordnet.isti.cnr.it/). Alternatively, ina supervised classification approach labelled datasets from similar domains are utilised. How-ever, this approach works where the trainingdataset from similar domain is available and thismethod is not suitable for sentiment analysis foran epic. Emotion analysis finds causes of senti-ment. Robert Plutchik(1980) defined the eight ba-sic emotion types. Mohammad and Turney (2010)created the NRC emotion lexicon which is an as-sociation of a list of words with these eight basictypes of emotion and two types of sentiment. Mo-hammad (2011) presented an emotion analyzer asa visualization exercise of these emotions in liter-ary text.

Table 1: Key Attributes of Mahabharata Text

Attributes Value RemarksSize inbytes

15,175 K English translation

Size inbytes

13,947 KAfter removingcomments

Numberof words

28,58,609 Using NLTK

Numberof uniquewords

32,506 Using NLTK

Numberof sen-tences

1,18,087 Using NLTK

Numberof chap-ters

18 “parva”

Numberof char-acters

210appearing at least10 times

For our research, we have used theEnglish translation of Mahabharataavailable at Project Gutenberg site(http://www.gutenberg.org/ebooks/7864). Thisis a translation by Kisari Mohan Ganguli donebetween 1883-1896. Mahabharata is larger thanIliad and Odyssey together, compiled many yearsago. This has 18 “parva”s or chapters and each“parva” has many sections.

3 The methodology

Mahabharata is not dialogue heavy and is mostlynarrative. So, identifying relations between char-220

Page 3: A computational analysis of Mahabharata · epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related

acters is done using co-occurrence algorithm withwindow size of a sentence.The method we devisedfor a comprehensive computational analysis of theMahabharata epic is as follows:

1. Pre-processing

- Filter out supporting texts such as tablesof content, publisher details and chaptersummaries.

- Separate the text into chapters (called“parva”) using suitable regular expres-sions.

- Separate each “parva” into sectionsbased on the structural elements in thetext.

2. Identifying characters

- Identify all proper nouns using POS tag-ging

- Input a list of known characters of theMahabharata story (widely available onthe internet).

- Input a thesaurus of equivalentnames for the characters (also widelyknown, e.g. Draupadi=Panchali, Ar-juna=Phalguni etc.) to merge equivalentnames.

- Filter out a list of known place namesin ancient India and its neighbouring re-gions.

- Apply a threshold to retain names whosefrequency is above a minimum value(resulting in 210 characters for the Ma-habharata story).

- Retain only those characters which arein the top 30 percent of characters men-tioned in a given parva (resulting inabout 70 characters overall). Same logicis followed for both individual and cu-mulative analysis of each parva.

The following steps are carried out separatelyfor each “parva” and also for the entire text.

3. Co-occurrence analysis

- Compute a co-occurrence matrix forthe identified characters using sen-tence boundaries as windows of co-occurrence.

- Build a social graph from the co-occurrence matrix.

4. Network analysis

- Various network metrics are computedfor the social graph for each of the 18“parva”s in both cumulative and stan-dalone way viz. betweenness central-ity, closeness centrality, degree central-ity, size of maximal cliques, number ofdetected communities, size of ego net-works for main nodes, core peripheryanalysis, density of the core and overallnetwork etc.

- Additionally various structural metricsare computed for social graph viz. de-gree assortativity, percentage size of gi-ant component,average clustering coef-ficient, average shortest path length etc.

5. Overall sentiment analysis

- Using syntactic meta data, phrases con-taining noun, adjective, verb and ad-verbs are identified.

- The above text is tokenized using stan-dard NLP techniques.

- The tokens are POS (parts of speech)tagged and tagged tokens are mapped tosynsets in Wordnet in a word sense dis-ambiguation process.

- The sentiment scores are picked up fromSentiWordnet for each synset.

- Overall sentiment of the parva is derivedfrom these values by summing the con-stituent sentiment scores.

6. Sentiment analysis for main characters

- Similarly sentiment analysis of eachprotagonist is done by extracting thesentences where the protagonist ap-pears. This is done for each parva.

7. Emotion analysis

- Emotion analysis for the full text andeach of the protagonists is done withthe help of NRC word-emotion associ-ation lexicon. After extracting the rele-vant part of the corpus,the score is cal-culated for each POS (part of speech)tagged token for each emotion and fi-nally summed up. The obvious limita-tion with any lexicon based approach isthe limitation imposed by the size of the221

Page 4: A computational analysis of Mahabharata · epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related

lexicon itself and this limitation does ap-ply to our analysis as well.

We have used the Python, NLTK(Natural Lan-guage Toolkit), various open source libraries(TextBlob, Networkx, Stanford SNAP, Gephi) anddata analytics/visualization software Tableau inour work.

4 Analysis of results

4.1 The protagonists

We have tried out 3 different approaches to iden-tify the protagonists.

- Most frequently mentioned character: Asshown in Figure.1a, this method finds themost frequent characters. However thismisses out the protagonists who are unfortu-nately low on frequency but may be impor-tant otherwise.

- Size of the ego network: Size of ego net-work (number of nodes directly connected)calculated from Mahabharata social networkproduces different results. As shown inFigure.1b, Kripa who is a teacher of theprinces, is topping the list. Chieftains likeShalya, Virata, Drupada come towards thetop in this list. Kunti(mother of Pandavas),Indra (the king of gods) and Narada (thesage) are also in this list being well con-nected!

- Centrality metrics: The betweenness,eigenvector, closeness and degree centralityare compared. Few observations can be madeout of this from Figure.2:

- Betweenness centrality differentiatesthe main protagonists whereas othercentrality metrics are mostly equivalent.

- Arjuna, Karna, Krishna, Yudhisthira,Bhisma, Kunti and Drona are the topfew in terms of all four centrality. Theyare the most important protagonists.

- Some of the personalities with verylarge ego network are having very lowbetweenness centrality and not makinginto the top list (Kripa, Shalya, Drupada,Virata etc.) because their influence islimited to one camp i.e. Kaurava or Pan-dava. Their importance is mostly local.

- Amongst the princesses and queenmothers, Kunti turns out to be the un-derstated (in the existing literary anal-ysis) power behind the scene (having alarge ego network and high centralities).Her low eigenvector centrality leads tofalse perception that she is not impor-tant. Other main lady characters (Gand-hari, Madri, Draupadi) are low on be-tweenness as their influence is limited toone camp.

4.2 The words say a lotWord clouds show a marked difference be-tween the protagonists as shown in Figure.3a toFigure.3d. These are drawn by extracting adjec-tives from respective corpus.

- Both Arjuna and Bhima are “mighty” and“warrior”. But Arjuna has words like “great”,“excellent”, “capable”, “celestial” whereasBhima has “terrible”, “fierce” etc. So Arjunais the best in his class whereas Bhima is amighty warrior with “terrible” anger.

- Bhisma has “invincible”, “principal”, “virtu-ous” whereas Krishna has “celestial”, “beau-tiful”, “illustrious”. So, Bhisma sounds morelike an invincible warrior famous for hisvirtue, whereas Krishna is almost godly.

- For Duryodhana, “wicked”, “terrible” etc.stand out whereas for Yudhisthira, “virtuous”and “righteous” are key words. Both areleaders of their respective camps but they arepoles apart.

4.3 Sentiments across the textMahabharata takes the readers through a rollercoaster ride of sentiment as shown in Figure.4.“Aadi parva”(1) starts on a positive note but the“Sabha parva” (2) brings lot of negativity with thegame of dice. “Vana parva”(3) is again positiveas Panadavs in spite of being in exile, make lot offriends and have achievements. “Virat parva”(4)is negative as the Pandavas have to live in disguisedoing odd jobs. “Udyog Parva” (5) is again pos-itive with both sides are very hopeful of winningwar. After that as elders and leaders get killed inthe battle, it is a downward slide of sentiment withDuryodhana’s death bringing in positive emotionin “Shalya parva”(9). In “Stri parva” (11), thedestruction is complete and sentiment reaches the222

Page 5: A computational analysis of Mahabharata · epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related

(a) Frequency of occurrence (b) Size of ego network

Figure 1: Finding protagonists by number of mention and ego network

Figure 2: Finding protagonists by comparing centrality metrics

(a) Arjuna word cloud (b) Bhima word cloud (c) Duryodhana word cloud (d) Yudhisthira word cloud

Figure 3: Words say a lot

223

Page 6: A computational analysis of Mahabharata · epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related

Figure 4: Sentiment across “parvas” of Mahabharata

(a) comparing sentiment: Krishna, Dhritarashtra (b) comparing sentiment: Drona, Bhisma

Figure 5: Comparing the sentiments

(a) comparing sentiment: Kunti, Gandhari (b) comparing sentiment: Yudhisthira, Duryodhana

Figure 6: Comparing the sentiments224

Page 7: A computational analysis of Mahabharata · epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related

lowest level. The “Shanti parva” (12) brings inpeak of positive sentiment with coronation of Yud-histhira and many achievements. After that, it isagain a downward slide of sentiments with manydeaths and even death of Lord Krishna. The senti-ment sees an uptick in the last two “parva”s whenPandavas leave for Himalayas and finally attain di-vine status. Figure.5a to Figure.6b depict the netsentiment of the main protagonists according tothe “parva”. It leads to some interesting observa-tions.

- Warriors like Arjuna and Bhima have lot ofnegativity around them.

- The leaders of the two warring camps Dury-odhana and Yudhisthira are clear contrastas Yudhisthira has lot of positive sentimentaround him.

- The gods like Indra and Agni have mostlypositivity around them as they are mostlyneutral on the ground.

- The eldest warrior, Bhisma is mostly neutralwhereas Drona is committed to one camp andso is surrounded by negativity. Dhritarashtra,though elder, is mostly surrounded by nega-tive sentiments.

- The two queen mothers Gandhari and Kuntiare the sources of positive energy in bothcamps. Though understated they play pivotalroles. Compared to them, Draupadi is sur-rounded by negative sentiment.

- Lord Krishna, when he is in the thick of war,has negativity around him but once the battlegets over and larger senses prevail, he bringsin sense of karma and lot of positive senti-ments.

4.4 The emotionsWe have analyzed the emotions both at the globaland the protagonist level as shown in Figure.7 toFigure.9. Out of the eight basic emotion types,anger and trust are the key ones as expected in atragedy that has an epic battle as the mainstay. An-ticipation, disgust, fear, sadness come in almostequal proportion. In the scheming world of Ma-habharata, there is not much of surprise and joy iskind of overshadowed by the other negative emo-tions. If we consider the emotions for some of themain protagonists, interesting conclusions can bedrawn.

- Amongst the key ladies, Kunti stands out bythe richness of positive emotion (trust andjoy) and is the bedrock of strength for thePandavas when they go through all their re-versals of fate. Gandhari is relatively lowkey whereas Draupadi displays all the neg-ative emotions that are key ingredients of atragedy.

- Amongst the Pandava and Kaurava leaders(Duryodhana and Yudhisthira), Yudhisthiradisplays trust and joy more than any otheremotion. Probably that is why he is perceivedas a leader though there are many others withmuch more bravery and heroics. The con-trast between Duryodhana and Yudhisthira istelling.

- Bhima and Duryodhana are very similar inemotions i.e. anger, trust and fear. Arjunais quite unique and ambidextrous i.e. he dis-plays enough of anger and fear and also largequantity of trust and joy.

- Amongst the elders, Bhisma is a detachedpersona and he does not show much of emo-tion. Drona is more attached to one camp andcomparatively shows anger more than anyother emotion.

- Krishna shows tremendous amount of trust,anticipation and joy in spite of all thetragedies and it is no wonder that he is calledan incarnation of god.

4.5 Leadership analysisWe searched for leaders using two criteria viz.high in positive sentiments and high in cen-trality (degree and/or betweenness) as shown inFigure.10. Our assumption is leaders are not onlycentrally connected but they also show lot of pos-itivity.

- It becomes very clear why Krishna issupreme as he is the only one who is in thehigh corner of this target quadrant.

- Closely following Krishna is Yudhisthira.That explains why in spite of not being agreat warrior and known addiction for gam-bling, Yudhisthira is so well respected.

- Going by the same yardstick for leadership,Arjuna, Bhima, Drona, Karna are more ofachievers or doers rather than leaders.225

Page 8: A computational analysis of Mahabharata · epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related

Figure 7: Emotions across the text

Figure 8: Emotion Analysis of Bhisma, Dhritarashtra, Drona and Krishna

Figure 9: Emotion Analysis of Arjuna, Bhima, Duryodhana, Karna, Yudhisthira

Figure 10: Leadership226

Page 9: A computational analysis of Mahabharata · epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related

(a) Considering diameter, degree and edge

(b) Considering maximal cliques and density

Figure 11: Evolution of social network across par-vas

- Bhisma is neither great in centrality nor inpositivity. He is more of a helpless specta-tor apart from his hard to find commitment towhatever promise he makes.

- Clearly Kaurava camp lacks in leadership.Duryodhana, the Kaurava leader, shows thelack of it and it is somewhat compensated bythe combined effort of the achievers in hiscamp.

4.6 The social network of Mahabharata- The “core periphery analysis” of the social

network reveals a core of size 52 and con-sistently high density that remains compara-ble to the overall density of the network i.e.the plot is built around these members of thecore.

- Mahabharata is also the story of three campsas proved by community detection tech-niques using Louvain algorithm (Blondel etal., 2008). They are the Kauravas, Pandavasand the gods/sages who remained somewhatneutral.

- The story of Mahabharata encompasses manyyears before the battle, 18 days of battleand around thirty six years after the battle.The evolving social network of Mahabharataacross the parvas is analyzed using variousstructural metrics viz. degree, average de-gree, number of edges, number of maximalcliques and density of the main core as wellas overall density. As shown in Figure.11aand Figure.11b, various structural metrics ofthe underlying social network tend to stabi-lize towards the end after becoming desta-bilised initially following Aristotelian frame-work of stability-instability-stability.

- Mahabharata network comes out as a smallworld network(small average shortest pathand large clustering coefficient). Transitiv-ity measured is comparable to other randomgraph of similar size such as Barabassi Al-bert model. However, modularity is found tobe low (mostly 3 communities detected) com-pared to some real world networks. Also thehigh positive correlation coefficients for eachcentrality pair, large giant component andnegative degree assortativity indicate largefictional component in Mahabharata.

5 Discussion and conclusion

In this work, we have applied various NaturalLanguage Processing and Social Network Anal-ysis techniques to come up with a computationalanalysis of the “Mahabharata”. We have not onlyvalidated what the literary critics have unearthedabout the epic but also augmented their findingsby discovering subtle facts. Protagonists are iden-tified and analyzed using both statistical and so-cial network parameters such as centrality and egonetwork. The trajectory of sentiment and variousemotions across the length of the text for each pro-tagonist are examined. The findings validate whatthe literary critics have already found. Addition-ally this analysis brings out some subtle facts i.e.Kunti is understated in the existing literary analy-sis but is seen to be playing a pivotal role as dis-played by the sentiments, emotions, centrality andlarge ego network size. We figured out the influ-ence category of various protagonists in terms oflocal or global influence.

The leadership analysis explains why Yud-histhira is described in such glorious terms in spiteof his many weaknesses. We have also looked at227

Page 10: A computational analysis of Mahabharata · epics such as Ramayana and Mahabharata. Hence we have chosen Mahabharata as the target text for a computational analysis effort. 2 Related

leadership quotient of various protagonists by con-sidering their position in the centrality-positivityquadrants and have brought out the leadershipcontrast between the warring camps in this epic.

The analysis also helps to explain why Mahab-harata is an epic. Apart from the sheer number ofcharacters, events, diversity of emotion and sen-timent, it is found to conform to the Aristoteliandefinition of epics having the stability-instability-stability transitions. The analysis of the struc-tural metrics also indicate that Mahabharata is notpurely factual and has a large fictional component.

Clearly computational analysis of a literary textdoes not make the literary analysis redundant. Butthis provides an additional tool set for the studentsof literature to validate and augment their find-ings. The methods used can be easily replicatedfor other texts.

As a next step, we plan to extend similar analy-sis to the Indian epic Ramayana and perform simi-lar structural analysis of the underlying social net-works.

Acknowledgement

This work is supported in part by the WorldBank/Government of India research grant underthe TEQIP programme (subcomponent 1.2.1) tothe Centre for Knowledge Analytics and Ontolog-ical Engineering (KAnOE http://www.kanoe.org)at PES University, Bangalore, India.

ReferencesApoorv Agarwal, Augusto Corvalan, Jacob Jensen, and

Owen Rambow. 2012. Social network analysis ofalice in wonderland. In Workshop on ComputationalLinguistics for Literature, pages 88–96.

Ricardo Alberich, Joe Miro-Julia, and FrancescRossello. 2002. Marvel universe looks almostlike a real social network. arXiv preprint cond-mat/0202174.

Poetics Aristotle. 1968. Introduction, commentary andappendixes by dw lucas. Oxford, 125:16.

Andrew Beveridge and Jie Shan. 2016. Network ofthrones. Math Horizons, 23(4):18–22.

Vincent D Blondel, Jean-Loup Guillaume, RenaudLambiotte, and Etienne Lefebvre. 2008. Fast un-folding of communities in large networks. Jour-nal of statistical mechanics: theory and experiment,2008(10):P10008.

David K Elson, Nicholas Dames, and Kathleen RMcKeown. 2010. Extracting social networks from

literary fiction. In Proceedings of the 48th annualmeeting of the association for computational lin-guistics, pages 138–147. Association for Computa-tional Linguistics.

Prashant Arun Jayannavar, Apoorv Agarwal, MelodyJu, and Owen Rambow. 2015. Validating liter-ary theories using automatic social network extrac-tion. on Computational Linguistics for Literature,page 32.

Padraig Mac Carron and Ralph Kenna. 2012. Univer-sal properties of mythological networks. EPL (Eu-rophysics Letters), 99(2):28002.

P Mac Carron and R Kenna. 2014. Network analy-sis of beowulf, the iliad and the tain bo cuailnge.In Sources of mythology: Ancient and contemporarymyths. Proceedings of the Seventh Annual Interna-tional Conference on Comparative Mythology (15–17 May 2013, Tubingen), pages 125–141.

Pedro J Miranda, Murilo S Baptista, and Sandro Ede S Pinto. 2013. Analysis of communitiesin a mythological social network. arXiv preprintarXiv:1306.2537.

Saif M Mohammad and Peter D Turney. 2010. Emo-tions evoked by common words and phrases: Us-ing mechanical turk to create an emotion lexicon. InProceedings of the NAACL HLT 2010 workshop oncomputational approaches to analysis and genera-tion of emotion in text, pages 26–34. Association forComputational Linguistics.

Saif Mohammad. 2011. From once upon a timeto happily ever after: Tracking emotions in novelsand fairy tales. In Proceedings of the 5th ACL-HLT Workshop on Language Technology for Cul-tural Heritage, Social Sciences, and Humanities,pages 105–114. Association for Computational Lin-guistics.

Mark EJ Newman and Michelle Girvan. 2004. Find-ing and evaluating community structure in networks.Physical review E, 69(2):026113.

Robert Plutchik. 1980. A general psychoevolutionarytheory of emotion. Theories of emotion, 1:3–31.

Jeff Rydberg-Cox. 2011. Social networks and the lan-guage of greek tragedy. In Journal of the ChicagoColloquium on Digital Humanities and ComputerScience, volume 1.

Graham Sack. 2012. Character networks for narrativegeneration. In Intelligent Narrative Technologies:Papers from the 2012 AIIDE Workshop, AAAI Tech-nical Report WS-12-14, pages 38–43.

James Stiller, Daniel Nettle, and Robin IM Dunbar.2003. The small world of shakespeares plays. Hu-man Nature, 14(4):397–408.

228