persian language resources based on dependency grammar

46

Upload: others

Post on 09-Feb-2022

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Persian Language Resources Based on Dependency Grammar
Page 2: Persian Language Resources Based on Dependency Grammar

2

Persian Language Resources Based on Dependency Grammar

Mohammad Sadegh [email protected]

Novermber 2012

Page 3: Persian Language Resources Based on Dependency Grammar

3

Outline

l Iran and Persian Language: An overviewl Challenges in Persian Language

Processingl Persian Resources Based on

Dependency Grammar

Page 4: Persian Language Resources Based on Dependency Grammar

4

Iran and Persian Language: An overview

Page 5: Persian Language Resources Based on Dependency Grammar

5

Meaningl Iran: Land of noblesl Persia: Land of Persian peoplel Persian (Parsi): People from Aryan (Arian)

tribe.l Arya (Aria): Noble (people lived in plateau

of Iran). l Persian language: Language spoken by

Persian people.

Page 6: Persian Language Resources Based on Dependency Grammar

6

Iran Map through History

http://en.wikipedia.org/wiki/Greater_Iran

Page 7: Persian Language Resources Based on Dependency Grammar

7

Iran Ethno-religious Distribution

Page 8: Persian Language Resources Based on Dependency Grammar

8

Persian Language in History

l First known as Pahlavi language with Pahlavi script:

Page 9: Persian Language Resources Based on Dependency Grammar

9

Persian Language in Historyl Pahlavi script is very similar to Indian

scripts.

Page 10: Persian Language Resources Based on Dependency Grammar

10

Persian Language in Historyl After Islam, Pahlavi script was replaced by

Arabic script with 4 additional characters.

Page 11: Persian Language Resources Based on Dependency Grammar

11

Persian Language in History

l Now, Arabic script is also used in Iran official flag.

l In the middle: !ا l On the horizental sides: ا% اکبر

Page 12: Persian Language Resources Based on Dependency Grammar

12

What is Farsi?l In standard Arabic there is no “p” sound.l For 2 centuries, Iran was governed by

Arab governors.l Parsi became Farsi just to be pronounced

easier by Arab people.

، ۱، بحارا%نوار - فارس منوطـاً بالثريا لتناوله رجال من العلم إذ قال رسول ا&: لو كان۱۹۵

Profit Mohammad: Even if knowledge is in the skies, people from Fars will gain that knowledge (Behar-al-anvar, 1, 195).

Page 13: Persian Language Resources Based on Dependency Grammar

13

Persian Language

l An Indo-European languagel Written with Arabic script with right-to-left

direction.l Spoken by about 100 million people.l Now, Persian is the official language in

Iran, Afghanistan and Tajikistan.l In Tajikistan, it is written with Cyrillic

script. u e.g. نزدیک /naezdik/ наздик

Page 14: Persian Language Resources Based on Dependency Grammar

14

Challenges in Persian Language Processing

Page 15: Persian Language Resources Based on Dependency Grammar

15

Challenges

l Lack of Annotated datal Colloquial Languagel Orthographyl Morphologyl Syntax

Page 16: Persian Language Resources Based on Dependency Grammar

16

Lack of Annotated Data

l For many open problems in NLP, there is no available Persian corpus.

l Rule based models in Persian did not lead to promising results.

Page 17: Persian Language Resources Based on Dependency Grammar

17

Colloquial Language

l Most of the people use it in their speakings or even their unofficial writings

u می‌خواهد /miXAhaed/ (he wants)u خواد می‌ /miXAd/

u می‌شود /miSaevaed/ (it becomes)u !"‌#$ /miSe/

Page 18: Persian Language Resources Based on Dependency Grammar

18

Orthographyl Diacritics are usually hidden (unless for manual

disambiguation)

u َ /ae/

u ِ /e/

u ُ /o/

l /s ? r/ سرu سُر /sor/: slippy

u سَر /saer/: head

u سِر /ser/: secret

Page 19: Persian Language Resources Based on Dependency Grammar

19

Orthography

l Some characters have more than one encoding.

l Affixes are written in multiple shapes (based on the writer style):

u می‌گویم / می گویم / میگویمu “I say”

u ها/ کتابخانه ها/ کتاب خانه ها خانه‌ ها / کتاب‌ کتابخانه‌u “Libraries”

Page 20: Persian Language Resources Based on Dependency Grammar

20

Orthography

l Semi-space (zero-width non-joiner) is used to attach parts of a unit word, but many people (even experts) do not use it properly.

u می‌گویم vs. می گویمu می /mey/ means “wine” in Persianu “I say” vs. “I say wine”

u خوب‌تر vs. خوب ترu تر /taer/ means “wet” is Persianu “better” vs. “good wet”

Page 21: Persian Language Resources Based on Dependency Grammar

21

Orthographyl People do not use punctuation between

phrases regularly.l Example (no punctuation, no diacritics):

– /to/ تو /ketAb/کتاب u /ketAb/ /e/ /to/: “Your book”u /ketAb/ , /to/: “book, you”

Page 22: Persian Language Resources Based on Dependency Grammar

22

Orthography

l Some Arabic characters have the same pronunciation in Persian:

u ص س ث /s/

u ط ت /t/

u ز ض ظ /z/

l This problem cause ambiguity in speech processing, spell checking, etc.

Page 23: Persian Language Resources Based on Dependency Grammar

23

Morphology

l It is a language with rich morphology.u Not as much as Arabic and Turkish

u هایشان تهرانی‌ /tehrAnihAyeSan/u “Theirs that are from Tehran”

u زده‌امشان /zadeaemeSAn/u “I have hit them”

– Arabic words cause irregularity in nouns and verbs

Page 24: Persian Language Resources Based on Dependency Grammar

24

Morphology

l Verbs are the most challenging problem in Persian morphology.

l Types of Persian verbs:u Simple

u Prefix verb

u Compound verbu Prefix compound verbu Prepositional phrase verb

Page 25: Persian Language Resources Based on Dependency Grammar

25

Morphology

l Usually, each verb has two lemmas:u 1) present and 2) past lemma

u گفت /goft/ -to speak- (past)u گو /gu/ -to speak- (present)

l Verbs (when inflected) can have more than one token:

u گفت /goft/: “He told”

u گفته است /gofte aest/: “He has told”

u گفته خواهد شد /gofte Xahaed Sod/: “It will be told”

Page 26: Persian Language Resources Based on Dependency Grammar

26

Morphology

l Compound verbs:

u A noun (non-verbal element) with a light verb:u ”speaking“ :صحبتu ”to do“ :کردu ”to speak“ :صحبت کرد

l Compound verbs can have long distance dependencies (other words can be present between non-verbal element and the light verb)

u کردم با تو صحبتu I spoke with you

Page 27: Persian Language Resources Based on Dependency Grammar

27

Morphology

l Non-verbal elements can also be inflected.u کردم با تو زیادی هایصحبت‌

u I spoke with you a lot

Page 28: Persian Language Resources Based on Dependency Grammar

28

Syntax

l Two major problems:u Pro-drop

u Subjects can be omitted easily.

u Free word orderu Usually SOV, but others are acceptable.u Lots of crossings in syntactic trees.

Page 29: Persian Language Resources Based on Dependency Grammar

29

Persian Resources Basedon Dependency Grammar

Page 30: Persian Language Resources Based on Dependency Grammar

30

Motivation

l We developed a spell checker, but there were no syntactic analysis.

l There were no syntactic treebank or lexicons.

l We decided to createu A verb valency lexicon (Rasooli et al.,

2011)u Each verb has what types of complements.u More than 4000 verb entries

u A syntactic treebank

Page 31: Persian Language Resources Based on Dependency Grammar

31

Syntactic Representation

l There were two main options:u Generative Grammar

u e.g. Penn Treebank (Marcus et al., 1993)

u Dependency Grammaru e.g. Prague Dependency Treebank

(Böhmová et al., 2003)

l We selected dependency grammaru WHY?

Page 32: Persian Language Resources Based on Dependency Grammar

32

Syntactic Representation

l Both of the representations have the ability to show the language structure.

l Dependency grammar is a better choice for free-word order languages (Oflazor et al., 2003).

u In most of the languages, there are dependency treebanks.u There are at least 30 languages with available

dependency treebanks (Zeman et al., 2012).

l Dependency representation is more similar to the human understanding of language (Kübler et al., 2009).

Page 33: Persian Language Resources Based on Dependency Grammar

33

Treebanking

l Phase 1: Research and annotation manual documentation.

l Phase 2: Annotating 5000 independent sentences from official online Persian news and websites.

u With bootstrapping approach.

Page 34: Persian Language Resources Based on Dependency Grammar

34

Treebanking

l Problems with Phase 2:u Most of texts are from news texts.

u From ~5000 verbs in the valency lexicon, only 20% of them were seen at least once.u It is impossible to capture all verbs in news

texts.u We also needed this data for educational

needs.

Page 35: Persian Language Resources Based on Dependency Grammar

35

Treebanking

l Phase 3:u Collecting sample sentences with unseen

verbs from web.u About 5-9 random sentences for each verb.

l Phase 4:u Collecting common errors in the

treebank and revise them manually.

Page 36: Persian Language Resources Based on Dependency Grammar

36

Statisticsl 44 dependency relations

l 17 coarse-grained POS tags

u Lemmas and some morphosyntactic features have been annotated manually.

l 29,982 sentences

u 80% train, 10% dev., 10% test

u Average length: 16.61

l 498,081 words

u 37,618 unique words

u 22,064 unique lemmas

Page 37: Persian Language Resources Based on Dependency Grammar

37

Statistics (Verbs)

l 60,579 verbsl 4,782 unique lemmasl Average frequency: 12.67

Page 38: Persian Language Resources Based on Dependency Grammar

38

Statistics (Annotator Agreement)

l Sentences were annotated once (plus one more time revision).

l 5% of the sentences were randomly selected to be annotated twice by two different annotators:

u Labeled dependency relation: 95.32%

u Dependency relation: 97.06%

u POS tags: 98.93%

Page 39: Persian Language Resources Based on Dependency Grammar

39

Statistics (Revisions)

l After correcting common errors, the following changes have been made:

u Labeled dependency relation: 04.91%

u Dependency relation: 06.29%

u POS tags: 04.23%

Page 40: Persian Language Resources Based on Dependency Grammar

40

Parsing Accuracyl Two reported accuracies on version 0.1

(not 1.0):u (Zeman et al., 2012)

u 1.77% nonprojectivity (arc crossing) in version 0.1

u 86.84% unlabaled attachment score with Malt Parser stack-lazy algorithm (Nivre et al., 2007).

u (Khallash, 2012)u Ensemble model (Malt and MST parser)u Best labeled accuracy: 85.06

Page 41: Persian Language Resources Based on Dependency Grammar

41

Conclusions

l It is very hard to have 2 annotators agree one the same syntactic tree.

u We had 14 annotators.

l It is very hard to have a unique writing style.

u We tried to trade off between a standard style and keeping the source text writing style.

Page 42: Persian Language Resources Based on Dependency Grammar

42

Dadegan Research GroupMohammad Sadegh Rasooli

Manouchehr Kouhestani

Amirsaeid Moloodi

Farzaneh Bakhtiary

Parinaz Dadras

Maryam Faal-Hamedanchi

Saeedeh Ghadrdoost-Nakhchi

Mostafa Mahdavi

Azadeh Mirzaei

Yasser Souri

Sahar Oulapoor

Neda Poormorteza-Khameneh

Morteza Rezaei-Sharifabadi

Sude Resalatpoo

Akram Shafie

Salimeh Zamani

Seyed Mahdi Hoseini

Alireza Noorian

Page 43: Persian Language Resources Based on Dependency Grammar

43

Obtain Data

http://dadegan.ir/en

Page 44: Persian Language Resources Based on Dependency Grammar

44

با سپاس از توجه شما

Page 45: Persian Language Resources Based on Dependency Grammar

45

Referencesl Böhmová, Alena, Jan Hajic, Eva Hajicová, and Barbora Hladká. "The prague

dependency treebank: Three-level annotation scenario." Treebanks: Building and Using Parsed Corpora 20 (2003).

l Khallash, Mojtaba, "A mechanism for exploring of the effect of different morphologic and morphosyntactic features on Persian dependency parsing", Master Thesis, Iran University of Science and Technology, 2012.

l Kübler, Sandra, Ryan McDonald, and Joakim Nivre. "Dependency parsing." Synthesis Lectures on Human Language Technologies 1, no. 1 (2009): 1-127.

l Marcus, Mitchell P., Mary Ann Marcinkiewicz, and Beatrice Santorini. "Building a large annotated corpus of English: The Penn Treebank." Computational linguistics 19, no. 2 (1993): 313-330.

l Nivre, Joakim, Johan Hall, and Jens Nilsson. "Maltparser: A data-driven parser-generator for dependency parsing." In Proceedings of LREC, vol. 6, pp. 2216-2219. 2006.

Page 46: Persian Language Resources Based on Dependency Grammar

46

Referencesl Oflazer, Kemal, Bilge Say, Dilek Zeynep Hakkani-Tür, and Gökhan Tür.

"Building a Turkish treebank." Treebanks (2003): 261-277.

l Rasooli, Mohammad Sadegh, Amirsaeid Moloodi, Manouchehr Kouhestani, and Behrouz Minaei-Bidgoli. "A syntactic valency lexicon for Persian verbs: The first steps towards Persian dependency treebank." In 5th Language & Technology Conference (LTC): Human Language Technologies as a Challenge for Computer Science and Linguistics, pp. 227-231. 2011.

l Zeman, Daniel, David Mareček, Martin Popel, Loganathan Ramasamy, Jan Štěpánek, Zdeněk Žabokrtský, and Jan Hajič. "Hamledt: To parse or not to parse." In Proceedings of the Eighth Conference on International Language Resources and Evaluation (LREC’12), Istanbul, Turkey. 2012.