Top Banner
1 The Quran & Computational The Quran & Computational Linguistics Linguistics Abdul-Baquee M. Sharaf 16 th April, 2009
39

The Quran and Computational Linguistics

Dec 14, 2014

Download

Education

Univ of Leeds

A presentation I gave to language technology group at University of Leeds, UK
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Quran and Computational Linguistics

1

The Quran & Computational The Quran & Computational LinguisticsLinguistics

Abdul-Baquee M. Sharaf16th April, 2009

Page 2: The Quran and Computational Linguistics

2

OutlineOutline

Introduction– What is Quran– Why CL of Quran

Quranic Linguistic Styles Research plan

Page 3: The Quran and Computational Linguistics

3

What is the Quran?What is the Quran?

Divine God Angel Gabriel Muhammad Classic Arabic Language Compiled over 23 years

– 13 years in Makkah, 10 years in Medinah– Different themes

114 Chapters, 77,804 words, 14,948 word types (5.2 ratio)

Content : monotheism, rulings, stories

Page 4: The Quran and Computational Linguistics

4

The Quran IndexThe Quran Index

Ch. No. Verse Words K/M Ch. No. Verse Words K/M Ch. No. Verse Words K/M Ch. No. Verse Words K/M1 7 29 K 30 60 818 K 59 24 448 M 88 26 93 K2 286 6141 M 31 34 551 K 60 13 353 M 89 30 140 K3 200 3501 M 32 30 373 K 61 14 227 M 90 20 83 K4 176 3762 M 33 73 1305 M 62 11 178 M 91 15 55 K5 120 2837 M 34 54 885 K 63 11 182 M 92 21 72 K6 165 3057 K 35 45 779 K 64 18 243 M 93 11 41 K7 206 3341 K 36 83 731 K 65 12 290 M 94 8 28 K8 75 1243 M 37 182 866 K 66 12 255 M 95 8 35 K9 129 2504 M 38 88 736 K 67 30 334 K 96 19 73 K10 109 1839 K 39 75 1178 K 68 52 302 K 97 5 31 K11 123 1948 K 40 85 1228 K 69 52 261 K 98 8 95 M12 111 1795 K 41 54 795 K 70 44 218 K 99 8 37 M13 43 855 M 42 53 861 K 71 28 228 K 100 11 41 K14 52 830 K 43 89 837 K 72 28 286 K 101 11 37 K15 99 1488 K 44 59 347 K 73 20 201 K 102 8 29 K16 128 1846 K 45 37 489 K 74 56 257 K 103 3 15 K17 111 1559 K 46 35 646 K 75 40 165 K 104 9 34 K18 110 1584 K 47 38 543 M 76 31 244 M 105 5 24 K19 98 972 K 48 29 561 M 77 50 182 K 106 4 18 K20 135 1354 K 49 18 354 K 78 40 175 K 107 7 26 K21 112 1175 K 50 45 374 K 79 46 180 K 108 3 11 K22 78 1280 M 51 60 361 K 80 42 134 K 109 6 28 K23 118 1053 K 52 49 313 K 81 29 105 K 110 3 20 M24 64 1320 M 53 62 361 K 82 19 82 K 111 5 24 K25 77 897 K 54 55 343 K 83 36 170 K 112 4 16 K26 227 1321 K 55 78 353 M 84 25 109 K 113 5 24 K27 93 1160 K 56 96 381 K 85 22 110 K 114 6 21 K

28 88 1440 K 57 29 576 M 86 17 62 K29 69 979 K 58 22 476 M 87 19 73 K

Page 5: The Quran and Computational Linguistics

5

Contrast : Quran vs Old Contrast : Quran vs Old EnglishEnglish

The Quran (chapter 1) Modern Standard Arabic-aljazeera.net

Old English (Beowulf) – approx. 10th century

Modern Translation

[1] Hwæt! wē Gār-Dena in geār-dagum,

[2] þeod-cyninga, þrym gefrunon,

[3] hu ða æþelingas ellen fremedon.

[1] What! We [of] Gar-Danes (lit. spear-danes) in yore-days [2] [of] people-kings, trim (glory) afrained(have learned of by asking),

[3] how those athelings (princes) arm-

strong feats framed (made/performed).

Page 6: The Quran and Computational Linguistics

6

The Quran: Corpus or TextThe Quran: Corpus or Text

Tognini-Bonelli 2001: 3

A TEXTA TEXT A CORPUSA CORPUS

read whole read fragmented

read horizontally read vertically

read for content read for formal patterning

read as a unique event read for repeated events

read as an individual act of will read as a sample of social practice

instance of parole gives insights into langue

coherent communicative event not coherent communicative event

"a collection of pieces of language, selected and ordered according to explicit linguistic criteria in order to be used as a sample of the language"

Sinclair 1996

Page 7: The Quran and Computational Linguistics

7

Computational Linguistics OR Corpus Computational Linguistics OR Corpus LinguisticsLinguistics

Discover pattern of the language of God

Attempt for only shallow knowledge Computer assisted “human-

understanding” vs. computer understandingWill they not then ponder on the Qur'an? If it had been from other than Allah they would have found therein much contradictions. [4:82]

Page 8: The Quran and Computational Linguistics

8

Why the QuranWhy the Quran Adherents > 1.5 billion

Page 9: The Quran and Computational Linguistics

9

globalglobal

“O Mankind” – used 22 times

This is a declaration for mankind, a guidance and an admonition unto those who ward off (evil)

Why the QuranWhy the Quran

Page 10: The Quran and Computational Linguistics

10

ChallengeChallengeSay: Verily, though mankind and the jinn should assemble to produce the like of this Qur'an, they could not produce the like thereof though they were helpers one of another [17:88]

Or they say: He hath invented it. Say: Then bring ten surahs, the like thereof, invented, and call on everyone ye can beside Allah, if ye are truthful! [11:13]

Or say they: He hath invented it ? Say: Then bring a surah like unto it, and call (for help) on all ye can besides Allah, if ye are truthful. [10:38]

Why the QuranWhy the Quran

Page 11: The Quran and Computational Linguistics

11

Source of Interesting Source of Interesting InformationInformation

002.031 And He taught Adam all the names, then showed them to the angels, saying: Inform Me of the names of these, if ye are truthful. And Solomon was David's heir. And he said: O mankind! Lo! we have been taught the language of birds [27:16]

Till, when they reached the Valley of the Ants, an ant exclaimed: O ants! Enter your dwellings lest Solomon and his armies crush you, unperceiving.[27:18]

The thunder hymneth His praise and (so do) the angels for awe of Him.[13:13]

Why QuranWhy Quran

Page 12: The Quran and Computational Linguistics

12

Computational ProjectsComputational Projects

Lo! this Qur'an narrateth unto the Children of Israel most of that concerning which they differ. [27:76]

Integration with BibleIntegration with Bible

and We have revealed unto thee the Remembrance that you may explain to mankind that which has been revealed for them, and that haply they may reflect. [16:44]

Integration with HadithIntegration with Hadith

Integration with TafsirIntegration with Tafsir

Why QuranWhy Quran

Building Quranic OntologyBuilding Quranic Ontology

Page 13: The Quran and Computational Linguistics

13

The Quran Speaks about ItselfThe Quran Speaks about ItselfWill they not then ponder on the Qur'an? If it had been from other than Allah they would have found therein much contradictions. [4:82]Had it been possible for a Lecture to cause the mountains to move, or the earth to be torn asunder, or the dead to speak, (this Qur'an would have done so) [13:31]

And We reveal of the Qur'an that which is a healing and a mercy for believers [17:82]

And verily We have displayed for mankind in this Qur'an all manner of similitudes, [18:54]

If We had caused this Qur'an to descend upon a mountain, thou (O Muhammad) verily hadst seen it humbled, rent asunder by the fear of Allah. Such similitudes coin We for mankind that haply they may reflect.

Why QuranWhy Quran

Page 14: The Quran and Computational Linguistics

14

are these contradictions!are these contradictions!They question you about wine and gambling. Say: In both is great sin, and (some) benefits for mankind; but the sin of them is greater than their usefulness. [2:219]

O ye who believe! Intoxicants and gambling, (dedication of) stones, and (divination by) arrows, are an abomination,- of Satan's handwork: eschew such (abomination), that ye may prosper. [5:90]

077.035 This is a day wherein they speak not,

006.027 If thou couldst see when they are set before the Fire and say: Oh, would that we might return! Then would we not deny the revelations of our Lord but we would be of the believers!

On that day neither man nor jinni will be questioned of his sin. [ 55:39]

And stop them, for they must be questioned. [37:24]

And on the Day when He will call unto them and say: What answer gave ye to the messengers ? [28:65]

Why QuranWhy Quran

Page 15: The Quran and Computational Linguistics

15

Characteristics: Characteristics:

Allah hath (now) revealed the fairest of statements, a Scripture who’s parts resembling each other, paired whereat doth creep the flesh of those who fear their Lord, so that their flesh and their hearts soften to Allah's reminder.. [39:23]

Why QuranWhy Quran

When they listen to that which hath been revealed unto the messengers, thou seest their eyes overflow with tears because of their recognition of the Truth. [5:83]

•Sentiments•Emotions•Word Similarity•Word Association•clustering

Page 16: The Quran and Computational Linguistics

16

Logical ArgumentsLogical Arguments

Were they created by nothing, or where they the creators [of themselves]?

Originator of the heavens and the earth. How could He have a son when He does not have a companion?

And among His Signs in this: thou seest the earth barren and desolate; but when We send down rain to it, it is stirred to life and yields increase. Truly, He Who gives life to the (dead) earth can surely give life to (men) who are dead. For He has power over all things.

Page 17: The Quran and Computational Linguistics

17

Quranic Linguistic StylesQuranic Linguistic Styles

Page 18: The Quran and Computational Linguistics

18

Shift of attentionShift of attentionO Prophet! When ye (men) put away women, put them away for their (legal) period and reckon the period, and keep your duty to Allah,

2nd person singular 2nd person Plural

3rd Person plural 2nd person plural

Relationship with semantics? Sentiments? Emotions

2nd person plural 3rd person plural

Linguistic StyleLinguistic Style

They deny what We have given them. Then enjoy yourselves, for you are going to know

When you are in ships and they sail with them by a good wind and they rejoice therein

informing addressing

Page 19: The Quran and Computational Linguistics

19

Word form & MeaningWord form & Meaning

So they (Gog and Magog) were not able to pass over it, nor were they able in it any penetration [18:96]

Ist’awuIstat’awu

Linguistic StyleLinguistic Style

Page 20: The Quran and Computational Linguistics

20

Complex Complex morphologymorphology

ها و ـكـمـ

ـلـزمـ

نـ أ

It[fem]

you You[plural]

force we should

suffix root prefix

Should we force it upon you

ـهم ـكـ ـكفيـ ـيـ ـسـ فـthem you Be

sufficienthe will then

postfix root prefix

Then He will be sufficient for you against them

Linguistic StyleLinguistic Style

Page 21: The Quran and Computational Linguistics

21

Word Order and Word Order and SemanticsSemantics

Who remember Allah while standing and sitting and on their sides [3:191]

And when affliction touches man, he call upon Us on his side or sitting or standing [10:12]

Linguistic StyleLinguistic Style

Page 22: The Quran and Computational Linguistics

22

Ellipsis Ellipsis Had it been possible for a Lecture to cause the mountains to move, or the earth to be torn asunder, or the dead to speak, [13:31]

Linguistic StyleLinguistic Style

In the name of Allah the Entirely Merciful, the Especially Merciful

In the name of Allah the Entirely Merciful, the Especially Merciful [I start reading]

Had it been possible for a Lecture to cause the mountains to move, or the earth to be torn asunder, or the dead to speak, (this Qur'an would have done so) [13:31]

Page 23: The Quran and Computational Linguistics

23

Disambiguation through Disambiguation through contextcontext

صومSAWMfasting

fasting Refrain from smth

O ye who believe! Fasting is prescribed for you, even as it was prescribed for those before you,

that ye may ward off (evil);

So eat and drink and be consoled. And if thou meetest any mortal, say: Lo! I have vowed a fast unto the Beneficent, and may not speak this day to any mortal.

technical literal

Linguistic StyleLinguistic Style

Page 24: The Quran and Computational Linguistics

24

Collocation and mutual Collocation and mutual informationinformation

Allah is Exalted in Might and Wise

Linguistic StyleLinguistic Style

might wise

Wisdom without mighty

Might without wisdom

Combining might with

wisdom

Page 25: The Quran and Computational Linguistics

25

Hidden AssumptionsHidden Assumptions

They stayed in their cave three hundred years, increased by nine. [18:25]

300 309Solar years

lunar years

Linguistic StyleLinguistic Style

Page 26: The Quran and Computational Linguistics

26

Imperative or not imperative: that is the Imperative or not imperative: that is the question?question?

But when ye have left the sacred territory, then go hunting (if ye will). [5:2]

Sacred territory

Allowed to hunt Allowed to huntProhibited to hunt

time

Verb tenses in Arabic:1. Past2. Present3. Imperative

Computational algorithm for detecting imperatives.

False positive or false negative

and whoever is minded to perform the pilgrimage therein there is no lewdness nor abuse nor angry conversation on the pilgrimage. [2:197]

Linguistic StyleLinguistic Style

Page 27: The Quran and Computational Linguistics

27

““except” except” resolutionresolution

O ye who believe! Draw not near unto prayer when ye are drunken, till ye know that which ye utter, nor when ye are polluted, except when journeying upon the road, till ye have bathed. [4:43]

And when Saul set out with the army, he said: Lo! Allah will try you by (the ordeal of) a river. Whosoever therefore drinketh thereof he is not of me, and whosoever tasteth it not he is of me, except him who taketh (thereof) in the hollow of his hand. [2:249]

Those who invoke not, with Allah, any other god, nor slay such life as Allah has made sacred except for just cause, nor commit fornication; - and any that does this (not only) meets punishment. The torment will be doubled to him on the Day of Judgement, and he will abide therein in disgrace; except those who repents, believes, and works righteous deeds, for Allah will change the evil of such persons into good, [25: 70]

Linguistic StyleLinguistic Style

Needs linking with other verses and Hadith/Tafsir

Page 28: The Quran and Computational Linguistics

28

in negation mention the generalin negation mention the general

Their similitude is that of a man who kindled a fire; when it lighted all around him, Allah took away their light and left them in utter darkness. So they could not see. [2:17] [Yousuf Ali Translation]

Radiant,shining

light

e.g, moon

e.g., sun

Linguistic StyleLinguistic Style

..and in confirmation ..and in confirmation mentioning the specificmentioning the specific

Be quick in the race for forgiveness from your Lord, and for a Garden whose width is that of the heavens and of the earth, prepared for the righteous,-[3:133]

paradiseWidth = Heavens + earth

Length ?

Page 29: The Quran and Computational Linguistics

29

AnalogiesAnalogies

Illumination sourceRainstorm, darkness,

thunder, lightening

Their [the hypocrites] likeness is as the likeness of one who kindleth fire, and when it sheddeth its light around him Allah taketh away their light and leaveth them in darkness, where they cannot see,…

Or like a rainstorm from the sky, wherein is darkness, thunder and the flash of lightning. They thrust their fingers in their ears by reason of the thunder-claps, for fear of death, Allah encompasseth the disbelievers (in His guidance, His omniscience and His omnipotence).

The lightning almost snatcheth away their sight from them. As often as it flasheth forth for them they walk therein, and when it darkeneth against them they stand still. If Allah willed, He could destroy their hearing and their sight. Lo! Allah is able to do all things.

Analogy of the reaction of hypocrites to Islam

heatlight

heatlightwatersound

Quran

Linguistic StyleLinguistic Style

Page 30: The Quran and Computational Linguistics

30

Association with different prepositionAssociation with different prepositionWhen they meet those who believe, they say: "We believe; but when they are alone with their evil ones, they say: "We are really with you: We(were) only jesting.“ [2:14 Yusuf Ali Translation]

Linguistic StyleLinguistic Style

are alone toLiteral translation

are alone with when they are alone with their evil ones,

leave to when they leave to their evil ones,

are alone to when they leave to their evil ones and are alone with them

Check problems with translations

Page 31: The Quran and Computational Linguistics

31

FigurativeFigurativeLinguistic StyleLinguistic Style

He said, "My Lord, the bones have turned brittle in my body, and my hair is aflame with grey. As I implore You, my Lord, I never despair.

When they came upon you from above you and from below you, and when eyes grew wild and hearts reached to the throats, and ye wereimagining vain thoughts concerning Allah.

Page 32: The Quran and Computational Linguistics

32

MetonymyMetonymyAsk the township where we were, and the caravan with which we travelledhither. [12:82]

Christ the son of Mary was no more than a messenger; many were the messengers that passed away before him. His mother was a woman of truth. They had both to eat their food. See how Allah doth make His signs clear to them; yet see in what ways they are deluded away from the truth! [5:75]

Linguistic StyleLinguistic Style

And We carried him (Noah) on planks and nails

And let not thy hand be chained to thy neck nor open it with a complete opening, lest thou sit down rebuked, denuded.

Page 33: The Quran and Computational Linguistics

33

Research PlanResearch Plan

Page 34: The Quran and Computational Linguistics

34

on

on

Linking VersesLinking Verses

Guide us to the straight path

path straightshape

The path of those upon whom You have bestowed favour

Allah

favour

bestows

WHOM?recipient

Those will be with the ones upon whom Allah has bestowed favour among the prophets, the saints, the martyrs and the righteous

prophets saints martyrs righteous

And whoever holds firmly to Allah has been guided to a straight path

Who holds firmly

to

And this is the path of your Lord straight

owner

Indeed, my Lord is on a path straight

on

Page 35: The Quran and Computational Linguistics

35

Linking verses: generate new Linking verses: generate new informationinformation

The mothers should suckle their children for two whole years [2:233]

And We have enjoined on man to be dutiful and kind to his parents. His mother bears him with hardship. And she delivers him with hardship. And (the period of) his gestation and the weaning of him is thirty months [46:15]

gestation ?

?weaning

30 months

duration

duration

total

Mathematical inference

X + Y = 30X = 24Y = 6

24 m

6 m

Page 36: The Quran and Computational Linguistics

36

inferenceinference

Nay! Surely, they (evil-doers) will be veiled from their Lord that Day.

Allah

Wrong-doersWill not see

Day of Judgement

when

Good-doersWill seeWill see when

Reverse argument

Page 37: The Quran and Computational Linguistics

37

Ch. No. Verse Words K/M Ch. No. Verse Words K/M Ch. No. Verse Words K/M Ch. No. Verse Words K/M1 7 29 K 30 60 818 K 59 24 448 M 88 26 93 K

2 286 6141 M 31 34 551 K 60 13 353 M 89 30 140 K

3 200 3501 M 32 30 373 K 61 14 227 M 90 20 83 K

4 176 3762 M 33 73 1305 M 62 11 178 M 91 15 55 K

5 120 2837 M 34 54 885 K 63 11 182 M 92 21 72 K

6 165 3057 K 35 45 779 K 64 18 243 M 93 11 41 K

7 206 3341 K 36 83 731 K 65 12 290 M 94 8 28 K

8 75 1243 M 37 182 866 K 66 12 255 M 95 8 35 K

9 129 2504 M 38 88 736 K 67 30 334 K 96 19 73 K

10 109 1839 K 39 75 1178 K 68 52 302 K 97 5 31 K

11 123 1948 K 40 85 1228 K 69 52 261 K 98 8 95 M

12 111 1795 K 41 54 795 K 70 44 218 K 99 8 37 M

13 43 855 M 42 53 861 K 71 28 228 K 100 11 41 K

14 52 830 K 43 89 837 K 72 28 286 K 101 11 37 K

15 99 1488 K 44 59 347 K 73 20 201 K 102 8 29 K

16 128 1846 K 45 37 489 K 74 56 257 K 103 3 15 K

17 111 1559 K 46 35 646 K 75 40 165 K 104 9 34 K

18 110 1584 K 47 38 543 M 76 31 244 M 105 5 24 K

19 98 972 K 48 29 561 M 77 50 182 K 106 4 18 K

20 135 1354 K 49 18 354 K 78 40 175 K 107 7 26 K

21 112 1175 K 50 45 374 K 79 46 180 K 108 3 11 K

22 78 1280 M 51 60 361 K 80 42 134 K 109 6 28 K

23 118 1053 K 52 49 313 K 81 29 105 K 110 3 20 M

24 64 1320 M 53 62 361 K 82 19 82 K 111 5 24 K

25 77 897 K 54 55 343 K 83 36 170 K 112 4 16 K

26 227 1321 K 55 78 353 M 84 25 109 K 113 5 24 K27 93 1160 K 56 96 381 K 85 22 110 K 114 6 21 K

28 88 1440 K 57 29 576 M 86 17 62 K29 69 979 K 58 22 476 M 87 19 73 K

Completing a Story scattered in many placesCompleting a Story scattered in many places

Moses is mentioned 132 times in more than 20 chapters..

Page 38: The Quran and Computational Linguistics

38

Research FrameworkResearch Framework

morphologyPOS

taggingSyntactic parsing

•Deeper Semantic Analysis•Information Extraction Tasks

IE System(e.g, QA system)Gold [hand coded] fully annotated Quran

Haifa Morphology

Analyzer

Arabic WordNet

Pilot Arabic PropBank

Machine Readable

Quran

English FrameNet

Machine Readable

Arabic Tafsir

Arabic Treebank

time

reso

urc

esre

sou

rces

Track ITrack I

Track IITrack II

QFrameNet

Novel contributionsNovel contributions

Novel contributionsNovel contributions

Semantic Analysis

WSD of the Quran

Relation detection

metonymy analysis

figurative analysis

evaluationevaluation

Automatic parsing

algorithm for Quran

Domain Specific IE System

(e.g, QA system)

F-score exceeding state-of-art results

Automatically generate valid information not captured in any Tafsir book

Automatic SRL

algorithm for Quran

?OWL ontology

Page 39: The Quran and Computational Linguistics

39

Thank YouThank You