1 Inteligenta Artificiala Universitatea Politehnica Bucuresti Anul universitar 2006-2007 Adina Magda Florea

Slides:



Advertisements
Similar presentations
Language and Grammar Unit
Advertisements

THE PARTS OF SPEECH: PREPOSITIONS, INTERJECTIONS
Prepositional Phrases as Adjectives and Adverbs
Grammar Spinner Touch any part of the screen to begin. (Or click your mouse) Touch the screen again each time you want to spin.
Identifying Parts of Speech & their Functions Nouns, Pronouns, Verbs, Prepositions, Adjectives, & Adverbs; Subjects & Objects.
1 Inteligenta Artificiala Universitatea Politehnica Bucuresti Anul universitar Adina Magda Florea
Identifying Prepositional Phrases
Used in place of a noun pronoun.
Noun. Noun - verb noun Noun - verb article- adj. - adj. - Noun - verb.
Exam Review.   Study your notes  Use the “practice” sentences and any returned tests/quizzes to review identifying certain grammatical principles.
Sentences Pasco-Hernando Community College Tutorial Series.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Fall 2005-Lecture 2.
Present Perfect Continuous prezentare. schema Afirmativ: S + have/has + been + V-ing… Negativ: S + have/has + not + been + V-ing… Interogativ: have/has.
1 CSC 594 Topics in AI – Applied Natural Language Processing Fall 2009/ Outline of English Syntax.
DGP Week Nine.
Context Free Grammars Reading: Chap 12-13, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Paul Tarau, based on Rada.
Infinitive Phrases Advanced Composition. Infinitives A verbal that functions as a noun, an adjective, or an adverb. An infinitive usually begins with.
Daily Grammar Practice
Communication and Language Chap. 22. Outline Communication Grammar Syntactic analysis Problems.
Inteligenta Artificiala
Overview Project Goals –Represent a sentence in a parse tree –Use parses in tree to search another tree containing ontology of project management deliverables.
CS : Language Technology for the Web/Natural Language Processing Pushpak Bhattacharyya CSE Dept., IIT Bombay Constituent Parsing and Algorithms (with.
The Eight Parts of Speech Establishing a common grammar vocabulary.
IVAN CAPP The 8 Parts of Speech.
Pronouns.   Common Noun  Person, place, or thing  Proper noun  The specific name of a person or place  Article  Identifies a noun as a noun  Definite:
Grammar Review Name___________ Title____________ Author _________ Parts of Speech COPY A SENTENCE FROM YOUR BOOK. Label the parts of speech of each word.
Geschke--English IV Grammar Unit--Prepositional Phrases Prepositional Phrases.
NLP. Introduction to NLP Is language more than just a “bag of words”? Grammatical rules apply to categories and groups of words, not individual words.
Natural Language Sections What the Speaker Speaks §Intention l S wants H to believe P §Generation l S chooses the words, W to convey the.
By: Hannah Gettings.  Definition of pronoun: a word used in place of a noun.  Example: She gave him the book. *say for example the names of the people.
_____________________ Definition Part of Speech (circle one) Picture Antonym (Opposite) Vocab Word Noun Pronoun Adjective Adverb Conjunction Verb Interjection.
6 TH GRADE LANGUAGE EXAM REVIEW PARTS OF SPEECH.
Agents That Communicate Chris Bourne Chris Christen Bryan Hryciw.
The Parts of Speech The 8 Parts of Speech… Nouns Adjectives Pronouns Verbs Adverbs Conjunctions Prepositions Interjections.
The man bites the dog man bites the dog bites the dog the dog dog Parse Tree NP A N the man bites the dog V N NP S VP A 1. Sentence  noun-phrase verb-phrase.
Deep structure (semantic) Structure of language Surface structure (grammatical, lexical, phonological) Semantic units have all meaning components such.
Parts of Speech Review. A Noun is a person, place, thing, or idea.
GoBack definitions Level 1 Parts of Speech GoBack is a memorization game; the teacher asks students definitions, and when someone misses one, you go back.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 2.
The Building Blocks of Sentences. The 8 Parts of Speech 1.Noun -is the name of a person, place, thing, or idea. Example: John is Tall The name John is.
◦ Process of describing the structure of phrases and sentences Chapter 8 - Phrases and sentences: grammar1.
PARTS OF SPEECH ANSWER: QUESTION: HOW MANY PARTS OF SPEECH ARE IN THE ENGLISH LANGUAGE? A.4 B.6 C.8.
Definitions Adjectives or Adverbs Conjunctions or Interjections Nouns or Prepositions Pronouns or Verbs
CS460/IT632 Natural Language Processing/Language Technology for the Web Lecture 13 (17/02/06) Prof. Pushpak Bhattacharyya IIT Bombay Top-Down Bottom-Up.
The Parts of Speech nouns verbs adjectives adverbs prepositions interjections conjunctions pronouns.
Pre positions Words that show how nouns and pronouns relate to other words within a sentence.
LANGUAGE ARTS PARTS OF SPEECH. NOUNS NOUN A noun is a word used to describe a  Person  Place  Animal  Thing.
Sentence Structure By: Amanda Garrett Bailey. What is the function of: Nouns Pronouns Verbs Adjectives Adverbs.
Phrase Definition review. Consists of an appositive and any modifiers the appositive has.
Parts of Speech By: Miaya Nischelle Sample. NOUN A noun is a person place or thing.
Grammar The “4 – Level” Analysis. The 4 - Levels Jack ate a delicious sandwich. Level 1 – parts of speech Level 2 – parts of a sentence Level 3 – phrases.
Pronoun Case Refers to:  What form a pronoun takes.  Sometimes we need to choose between I and me.  The way we determine which to use is if the pronoun.
Parts of Speech Review.
Parts of Speech How Words Function.
Daily Grammar Practice Week One Grade 8
10 Minutes of Book Love (Have your poem out on your desk, please)
English 12 Mrs. Fountain Week 2 Warm-Ups.
NOUNS person, place, thing, or idea
Grammar Review.
6A object pronouns: me, you, him, etc.
Inteligenta Artificiala
Inteligenta Artificiala
Daily Grammar Practice Week One Grade 8
Parts of Speech How Words Function.
6A object pronouns: me, you, him, etc.
Daily Grammar Practice
PREPOSITIONAL PHRASES
Week 3 Warm-Ups English 12 Mrs. Fountain.
OBJECT PRONOUNS.
Parts of Speech II.
Presentation transcript:

1 Inteligenta Artificiala Universitatea Politehnica Bucuresti Anul universitar Adina Magda Florea

2 Curs nr. 13 Prelucrarea limbajului natural 2

3 Comunicare n Definitie: schimbul intentional de informatie generat de producerea si perceperea semnelor dintr-un sistem partajat de semne conventionale n Componentele comunicarii –intentie –generare –sinteza –perceptie –analiza –desambiguare –incorporare

4 Acte de comunicare n Teoria actelor de comunicare n locutie n ilocutie n prelocutie –asertive –directive –comisive –permisive –prohibitive –declarative –expresive Tipuri de agenti care comunica

5 Definire limbaj n Lexicon n Analiza lexicala n Gramatici n Analiza (pars oratoris) n Terminale, neterminale, reguli de rescriere n simbol de inceput n LHS  RHS n Analza semantica n Analiza pragmatica

6 Lexicon Noun  breeze | wumpus | ball Verb  is | see | smell | hit Adjective  right | left | smelly … Adverb  here | there | ahead … Pronoun  me | you | I | it RelPronoun  that | who Name  John | Mary Article  the | a | an Preposition  to | in | on Conjunction  and | or | but

7 Gramatica n Neterminale – diferite categorii din propozitie –sentence S –noun phrase NP –verb phrase VP –prepositional phrase PP –relative clause RelClause

8 Exemplu S  NP VP | S Conjunction S NP  Pronoun | Noun | Article Noun | NP PP | NP RelClause VP  Verb | VP NP | VP Adjective | VP PP | VP Adverb PP  Preposition NP RelClause  RelPronoun VP

9 Analiza sintactica –top-down parsing –bottom-up parsing –in adancime –pe nivel

10 Top-Down Parsing "John hit the ball" 1. S 2. S  NP, VP 3. S  Noun, VP 4. S  John, Verb, NP 5. S  John, hit, NP 6. S  John, hit, Article, Noun 7. S  John, hit, the, Noun 8. S  John, hit, the, ball

11 Bottom-Up Parsing 1. John, hit, the, ball 2. Noun, hit, the, ball 3. Noun, Verb, the, ball 4. Noun, Verb, Article, ball 5. Noun, Verb, Article, Noun 6. NP, Verb, Article, Noun 7. NP, Verb, NP 8. NP, VP 9. S

12 Definite Clause Grammar (DCG) n Gramatici BNF - probleme n Utilizare LP n Gramatici cu clauze definite n DCG – gramatica; propozitie = clauza definita n neterminal = predicat de 1 argument n parsing = inferenta logica

13 In BNF S  NP VP In LP NP(s 1 )  VP(s 2 )  S(Append(s 1, s 2 )) BNF Noun  ball | book In LP (s = “ball”  s = “book”)  Noun(s)

BNF, DCG, Prolog BNFFOPLPROLOG S  NP VP NP  Noun Noun  stench Noun  wumpus VP  Verb Verb  smells Verb  kills NP(s1)  VP(s2)  S(append(s1,s2)) Noun(s)  NP(s) Verb(s)  VP(s) (s = “stench”  s = “wumpus”)  Noun(s) (v = “smells”  v = “kills”)  Verb(v) sentence([S1, S2]) :- np(S1), vp(S2). np(S):- noun(S). vp(S):- verb(S). noun(stench). noun(wumpus). verb(smells). verb(kills). ?- sentence([wumpus, smells]). ?-sentence([S1, S2]).

15 Imbogatire DCG n Imbogatesc neterminale cu argumente suplimentare n Verifica corectitudinea gramaticala n Ataseseaza semantica n Adauga expresii / functii care se testeaza

16 Argument pt semantica DCGFOPL PROLOG S(sem)  NP(sem1) VP(sem2) {compose(sem1, sem2, sem)} NP(s1, sem1)  VP(s2, sem2)  S(append(s1, s2)), compose(sem1, sem2, sem) slide urmator semantica compozitionala

The dog has legs.(caine parti picioare) The ball is yellow.(minge proprietate galbena) The ball is red.(mine proprietate rosie) The dog bites.(caine actiune musca) sentence(S, Sem) :- np(S1, Sem1), vp(S2, Sem2), append(S1, S2, S), Sem = [Sem1 | Sem2]. np([S1, S2], Sem) :- article(S1), noun(S2, Sem). vp([S], Sem) :- verb(S, Sem1), Sem = [actiune, Sem1]. vp([S1, S2], Sem) :- verb(S1,_), adjective(S2, Sem1), Sem = [proprietate, Sem1]. vp([S1, S2], Sem) :- verb(S1,_), noun(S2, Sem1), Sem = [parti, Sem1]. noun(dog,caine). noun(ball,ball). noun(legs,picioare). verb(bytes,musca). verb(is,este). verb(has,are). adjective(yellow,galbena). adjective(red,rosie). ?- sentence([the,ball,is,yellow],Sem). Sem = [minge, proprietate, galbena] Yes ?- sentence([the,dog,bytes],Sem). Sem = [caine, actiune, musca] Yes ?- sentence([is,dog,bytes],Sem). No ?- sentence([the,dog,has,legs],Sem). Sem = [caine, parti, picioare] Yes

18 Verificare corectitudine gramaticala n cazuri n subcategorii verbe: complementul pe care il poate accepta un verb n acord subiect predicat n etc. n Parametrizarea neterminalelor

Cazuri Nominativ (subjective) I take the busEu iau autobuzul You take the busTu iei autobuzul He takes the busEl ia autobuzul Acuzativ (objective) He gives me the bookImi da cartea S  NP(Subjective) VP NP(case)  Pronoun (case) | Noun | Article Noun //I VP  VP NP(Objective)//believe him VP  VP PP// turn to the right VP  VP Adjective VP  Verb PP  Preposition NP(Objective) Pronoun(Subjective)  I | you | he | she Pronoun(Objective)  me | you | him | her

20 sentence(S) :- np(S1,subjective), vp(S2), append(S1, S2, S). np([S], Case) :- pronoun(S, Case). np([S], _ ) :- noun(S). np([S1, S2], _ ) :- article(S1), noun(S2). pronoun(i, subjective). pronoun(you, _ ). pronoun(he, subjective). pronoun(she, subjective). pronoun(me, objective). pronoun(him, objective). pronoun(her, objective). noun(ball). noun(stick). article(a). article(the).

21 Subcategorii verbe n Lista de subcategorii: ce complemente accepta verbul n depinde de verb n S  NP(Subjective) VP(subcat) dar cazuri in care nu depinde n VP(subcat)  VP(subcat) PP n | VP(subcat) Adverb I smell the wumpus now

VP(subcat)  {subcat = np} VP(np) NP(Objective) | {subcat = adj} VP(adj) Adjective | {subcat = pp} VP (pp) PP | Verb smell[NP]smell a wumpus [Adjective]smell awfull [PP]smell like a wumpus is[Adjective]is smelly [PP]is in box [NP]is a pit give[NP, PP]give the gold in box to me [NP, NP]give me the gold died[]died

S  NP(Subjective) VP(subcat) NP(case)  Pronoun (case) | Noun | Article Noun Pronoun(Subjective)  I | you | he | she Pronoun(Objective)  me | you | him | her VP(subcat)  {subcat = np} VP(np) NP(Objective) | {subcat = adj} VP(adj) Adjective | {subcat = pp} VP (pp) PP | Verb | VP(subcat) PP | VP(subcat) Adverb

VP(subcat)  {subcat = np} VP(np) NP(Objective) | {subcat = adj} VP(adj) Adjective | {subcat = pp} VP (pp) PP | Verb | VP(subcat) PP | VP(subcat) Adverb sentence(S) :- np(S1,subjective), vp(S2, Subcat), append(S1, S2, S). VP(subcat)  VP(subcat) … !!! vp(S, Subcat) :- Subcat = np, vp1(S1, np),np(S2, objective), append(S1, S2, S). vp(S,Subcat) :- vp1(S1, Subcat), pp(S2), append(S1, S2, S). vp1([S],np):-verb(S). verb(give). verb(make).

25 Analiza pragmatica n Analiza semantica n Desambiguare n Interpretare pragmatica – utilizare si efect asupra ascultatorului n Indexical – refera situatia curenta n Anafora – refera obiecte deja mentionate

26 Ambiguitate n Lexicala – acelasi cuvant diverse intelesuri n Sintactica – arbori diferiti de analiza n Referentiala – referire la obiecte anerioare n Pragmatica – referire la loc, timp