1 of 74

നിർമിതിബുദ്ധി മാതൃകകളിലെ മലയാളം

സന്തോഷ് തോട്ടിങ്ങൽ

Malayalam in Artificial Intelligence Models

2 of 74

Phonetics, Phonology

Morphology

Syntax

Semantics

Pragmatics

Speech Sounds, Phonemes

Words and Forms

Sentences and Phrases

Literal meaning of various kinds

Language usage, Meaning in context of discourse

3 of 74

A cognitive phenomenon

A symbolic system

A social phenomenon

As something that can be modeled and imitated by a computer

4 of 74

George Kingsley Zipf�1902 – 1950

5 of 74

Frequency of occurrence of words

Inversely proportional

to the rank in this frequency of occurrence.

6 of 74

ഒരു ഭാഷയിലെ വാക്കുകളുടെ ആവർത്തനങ്ങളുടെ അവരോഹണക്രമത്തിലുള്ള പട്ടികയിൽ,

വാക്കിന്റെ സ്ഥാനം,

അതിന്റെ ആവർത്തനത്തിന് വിപരീതാനുപതത്തിലായിരിക്കും

7 of 74

ഏറ്റവും കൂടുതൽ തവണ വരുന്ന വാക്ക് തൊട്ടുപുറകിൽ വരുന്ന വാക്കുകളെക്കാൾ ഇരട്ടി വരും

8 of 74

  • the 7%
  • of 3.5% (7 * ½)
  • and 2.3% (7 * ⅓)
  • to 1.75% (7* ¼)

ഇംഗ്ലീഷ് ഭാഷയിലെ 25% വാക്കുകളും "the," "be," "to," "of," "and," "a," "in," "that," "have," and "I." എന്നീ പത്തുവാക്കുകളിലൊന്നാണ്.

9 of 74

10 of 74

11 of 74

Claude Shannon�1916-2001

12 of 74

13 of 74

https://hedgehogreview.com/issues/markets-and-the-good/articles/language-machinery

14 of 74

89/129 അക്ഷരങ്ങളും കൃത്യമായി.

69% കൃത്യത.

Prediction and Entropy of Printed English,” Claude Shannon -1951

from Raymond Chandler’s 1936 detective story “Pickup on Noon Street”

15 of 74

16 of 74

മലയാളത്തിൽ

ഏറ്റവും കൂടുതൽ ആവർത്തിക്കപ്പെടുന്ന അക്ഷരമേത്?

ഏറ്റവും കുറവ് ആവർത്തിക്കപ്പെടുന്ന അക്ഷരമേത്?

17 of 74

Andrey Markov�4 June 1856 – 20 July 1922

18 of 74

What happens next depends only on the state of affairs now.

19 of 74

20 of 74

21 of 74

22 of 74

എന്ത് പ്രഹസനാണ് ‌______

23 of 74

അവിടെ കല്യാണം. ഇവിടെ —---

24 of 74

കർണൻ, നെപ്പോളിയൻ, —--

25 of 74

അപരാഹ്നത്തിന്റെ അനന്തപഥങ്ങളിൽ ആകാശനീലിമയിൽ അവൻ നടന്നകന്നു. �ഭീമനും യുധിഷ്ഠിരനും ബീഡി വലിച്ചു. �സീതയുടെ മാറുപിളർന്ന് രക്തം കുടിച്ചു ദുര്യോധനൻ. ഗുരുവായൂരപ്പന് ജലദോഷമായിരുന്നു അന്ന്. അമ്പലത്തിന്റെ അകാൽവിളക്കുകൾ തെളിയുന്ന സന്ധ്യയിൽ അവൾ അവനോട് ചോദിച്ചു, �"ഇനിയും നീ ഇതുവഴി വരില്ലേ, ആനകളെയും തെളിച്ചുകൊണ്ട്?"

26 of 74

27 of 74

Noam Chomsky

28 of 74

“finite-state Markov processes”, while a possibly useful engineering heuristic,�were incapable of being a complete cognitive model of human grammatical knowledge.

29 of 74

Word embeddings

30 of 74

You shall know a word by the company it keeps

John Rupert Firth�1890 - 1960

31 of 74

“words that occur in similar contexts tend to have similar meanings”

Distributional hypothesis - Harris, 1954

Zellig Harris�1909 – 1992

32 of 74

How the statistical patterns of human word usage can be used to figure out �what people mean, �at least to a level sufficient for information access

Distributional hypothesis - Harris, 1954

Statistical Semantics

33 of 74

34 of 74

  • മേശപ്പുറത്ത് ഒരു ---- ഉണ്ട്
  • രാവിലെ --- വായിച്ചു
  • ഈ --- നല്ല മധുരമുണ്ട്
  • എനിക്ക് --- ഇഷ്ടമാണ്
  • വാഹനമോടിക്കുമ്പോൾ --- കഴിക്കരുത്
  • ഈ -- ചുവന്ന നിറമാണ്
  • നാളെ ഞാൻ --- വാങ്ങാൻ പോകുന്നുണ്ട്
  • പൂച്ചക്ക് --- ഇഷ്ടമാണ്

35 of 74

  • മേശപ്പുറത്ത് ഒരു ---- ഉണ്ട്
  • രാവിലെ --- വായിച്ചു
  • ഈ --- നല്ല മധുരമുണ്ട്
  • എനിക്ക് --- ഇഷ്ടമാണ്
  • വാഹനമോടിക്കുമ്പോൾ --- കഴിക്കരുത്
  • ഈ -- ചുവന്ന നിറമാണ്
  • നാളെ ഞാൻ --- വാങ്ങാൻ പോകുന്നുണ്ട്
  • പൂച്ചക്ക് --- ഇഷ്ടമാണ്

1

2

3

4

5

6

7

8

പത്രം

1

1

0

0.5

0

0

1

0.5

മീൻ

0.5

0

0

1

0

0.75

1

1

മദ്യം

0.25

0

0.5

0.4

1

0.5

1

0

വാഴപ്പഴം

1

0

1

0.8

0

0.2

1

0

ആപ്പിൾ

1

0

1

1

0.8

1

0

ചായ

1

0

1

1

1

0.2

0

0

36 of 74

മധുരം

ദ്രാവകം

വായിക്കാവുന്നത്

ചായ

മദ്യം

പായസം

കഞ്ഞി

പഞ്ചസാര

പത്രം

ഫോൺ

പുസ്തകം

പാൽ

വെള്ളം

37 of 74

38 of 74

39 of 74

40 of 74

41 of 74

42 of 74

പഞ്ചസാര

കഞ്ഞി

മദ്യം

വെള്ളം

മീൻ

പായസം

പാൽ

അരി

43 of 74

കഞ്ഞി + പഞ്ചസാര = പായസം

ചായ - പാൽ = കട്ടൻ ചായ

പാൽ + കഞ്ഞി = പാൽക്കഞ്ഞി

പായസം - പഞ്ചസാര = കഞ്ഞി

44 of 74

https://ig.ft.com/generative-ai/

45 of 74

46 of 74

47 of 74

കർണാടക + ( കേരളം - തിരുവനന്തപുരം) = ?

കേരളം + തലസ്ഥാനം = തിരുവനന്തപുരം

48 of 74

മേശപ്പുറത്തിരുന്ന —- പൂച്ച തട്ടിമറിച്ചു

മേശപ്പുറത്തിരുന്ന —- പറന്നുപോയി

മേശപ്പുറത്തിരുന്ന —- താഴേക്കു ചാടി

മേശപ്പുറത്തിരുന്ന —- കരയാൻ തുടങ്ങി

Context

49 of 74

50 of 74

https://ig.ft.com/generative-ai/

51 of 74

https://ig.ft.com/generative-ai/

52 of 74

53 of 74

https://ig.ft.com/generative-ai/

54 of 74

55 of 74

56 of 74

Training dataset

57 of 74

https://arxiv.org/pdf/2005.14165.pdf

ChatGPT 3 training dataset

58 of 74

93% of ChatGPT-3’s data set was in English

0.00165% was in Malayalam

https://github.com/openai/gpt-3/blob/master/dataset_statistics/languages_by_word_count.csv

59 of 74

Free Word order

60 of 74

English: Subject-Verb-Object (SVO)

Malayalam: Subject-Object-Verb (SOV)

The boy reads a book.

കുട്ടി പുസ്തകം വായിക്കുന്നു

വായിക്കുന്നു പുസ്തകം കുട്ടി

പുസ്തകം കുട്ടി വായിക്കുന്നു

വായിക്കുന്നു കുട്ടി പുസ്തകം

61 of 74

Morphological Complexity

വാക്കുകളുടെ പെരുക്കം

62 of 74

https://kavyamanohar.com/post/malayalam-morphological-complexity/

63 of 74

https://kavyamanohar.com/post/malayalam-morphological-complexity/

64 of 74

65 of 74

https://kavyamanohar.com/post/malayalam-morphological-complexity/

66 of 74

https://kavyamanohar.com/post/malayalam-morphological-complexity/

67 of 74

https://huggingface.co/spaces/yenniejun/tokenizers-languages

68 of 74

English

en-US

dollar rupees exchange rate

6

Spanish

es-ES

tipo de cambio dólar rupias

8

Malayalam

ml-IN

ഇന്ത്യൻ രൂപ എക്സ്ചേഞ്ച് നിരക്ക്

45

Tamil

ta-IN

டாலர் ரூபாய் மாற்று விகிதம்

38

69 of 74

Linguistic approaches

70 of 74

Morphological Analysis�And �Tokenization strategies

71 of 74

https://aclanthology.org/W19-6801.pdf

72 of 74

https://morph.smc.org.in

73 of 74

https://direct.mit.edu/tacl/article/doi/10.1162/tacl_a_00365/98237/Morphology-Matters-A-Multilingual-Language

74 of 74

https://aclanthology.org/D18-1029.pdf