Presentation is loading. Please wait.

Presentation is loading. Please wait.

עיבוד שפות טבעיות natural language processing יעל נצר בינה מלאכותית מכללת אשקלון.

Similar presentations


Presentation on theme: "עיבוד שפות טבעיות natural language processing יעל נצר בינה מלאכותית מכללת אשקלון."— Presentation transcript:

1 עיבוד שפות טבעיות natural language processing יעל נצר בינה מלאכותית מכללת אשקלון

2 סוגים של התקשרות בעזרת שפה שאלות query –" האם ראית את הסוס הנהדר הזה ?" יידוע inform –" מחירו של הניגון הוא חמישים רובל " בקשה request –" נא למדני את השיר " אישור acknowledge –" בסדר " ok! הבטחה promise –" חמישים שילמתי ואוסיף את מגפי !"

3 מטרות התקשורת שינוי מצב מנטאלי ופעולות עתידיות העברת מידע – השפעה על קבלת החלטות הצהרה ( דקלרטיביות ) - "I now pronounce you man and wife!"

4 אבני היסוד של השפה שפה פורמלית : מוגדרת על ידי אוסף מחרוזות. כל מחרוזת הוא שרשור של סמלים טרמינליים – מילים. שפת הלוגיקה מדרגה ראשונה first order logic: – סמלים טרמינליים : P, Q, V ~ – מחרוזות : P V Q ולא V P Q מה המבנה של שפה טבעית ? דקדוק grammar הוא אוסף סופי של חוקים המגדירים את השפה ( למשל, שפות תכנות ) לשפה טבעית – יש דקדוק, אבל מהו ?

5 הבטים שונים בשפה סמנטיקה – הקשר בין התחביר לבין המשמעות. – בשפת החשבון, X+Y – המשמעות : חיבור בין X ל -Y. פרגמטיקה – משמעות המחרוזת המדוברת בתוך הקשר. צירופים phrase structures – צירופים שמניים : הסוס הנהדר הזה, היריד, סוס כזה, כתם על המצח. – זיהוי צירופים מאפשר זיהוי משמעות ( שמות עצם מתייחסים בד " כ לישויות / אובייקטים בעולם ). – צירופים מאפשרים לנו הגדרת המבנים האפשריים בשפה ( למשל – למה " רוץ אל היריד מהר " זה בעברית, אבל לא " אל רוץ מהר היריד ").

6 הצעדים ביצירת התקשרות כוונה Intention – הדובר S מחליט להגיד הגד (proposition) P לשומע H יצירה Generation- הפיכת ההיגד P למבע utterance כך שהשומע H שיקלוט את המבע בסיטואציה הנוכחית, יוכל להסיק את משמעות P. סינתזה Synthesis- בכתב, בקול, או בכל דרך אחרת. תפיסה Perception – H קולט את הנאמר ומזהה speech recognition ניתוח Analysis- H מסיק את המשמעויות האפשריות של הנאמר : – ניתוח תחבירי parsing ( פונקציה של ארגומנט אחד – המחרוזת ) – פירוש המשמעות semantic interpretation – פירוש פרגמטי pragmatic interpretation ( פונקציה של המבע ושל ההקשר שבו נאמר )

7 יצירת משמעות - המשך Disambiguation – הסרת רב משמעות – מציאת המשמעות שאליה כנראה התכוון הדובר. הכללה incorporation - האם H מאמין ל -P?

8 Speech/Character Recognition Decomposition into words, segmentation of words into appropriate phones or letters Requires knowledge of phonological patterns: –I’m enormously proud. –I mean to make you proud. – השקפים הבאים של Bonnie Dorr

9 Morphological Analysis Inflectional –duck + s = [N duck] + [plural s] –duck + s = [V duck] + [3rd person s] Derivational –kind, kindness Spelling changes –drop, dropping –hide, hiding

10 Syntactic Analysis Associate constituent structure with string Prepare for semantic interpretation S NP VP I V NP watched det N the terrapin OR: watch Subject Object I terrapin Det the

11 Semantics A way of representing meaning Abstracts away from syntactic structure Example: –First-Order Logic: watch(I,terrapin) –Can be: “I watched the terrapin” or “The terrapin was watched by me” Real language is complex: –Who did I watch?

12 Lexical Semantics The Terrapin, is who I watched. Watch the Terrapin is what I do best. *Terrapin is what I watched the I= experiencer Watch the Terrapin = predicate The Terrapin = patient

13 Compositional Semantics Association of parts of a proposition with semantic roles Scoping Experiencer Predicate: Be (perc) I (1st pers, sg) pred patient saw the Terrapin Proposition

14 Word-Governed Semantics Any verb can add “able” to form an adjective. –I taught the class. The class is teachable –I rejected the idea. The idea is rejectable. Association of particular words with specific semantic forms. –John (masculine) –The boys ( masculine, plural, human)

15 Pragmatics Real world knowledge, speaker intention, goal of utterance. Related to sociology. Example 1: –Could you turn in your assignments now (command) –Could you finish the homework? (question, command) Example 2: –I couldn’t decide how to catch the crook. Then I decided to spy on the crook with binoculars. –To my surprise, I found out he had them too. Then I knew to just follow the crook with binoculars. [ the crook [with binoculars]] [ the crook] [ with binoculars]

16 Discourse Analysis Discourse: How propositions fit together in a conversation—multi-sentence processing. Pronoun reference: –The professor told the student to finish the assignment. –He was pretty aggravated at how long it was taking to pass it in.

17 NLP Pipeline Phonetic Analysis Morphological analysis OCR/Tokenization Syntactic analysis Semantic Interpretation Discourse Processing speechtext

18 Relation to Machine Translation Morphological analysis Syntactic analysis Semantic Interpretation Interlingua inputanalysisgeneration Morphological synthesis Syntactic realization Lexical selection output

19 רב משמעות Flying planes made her duck 1.the airplanes made her change her position 2.the act of piloting made her change her position 3.piloting turned her into a duck 4.the airplanes caused her duck (the animal) to exist 5.the act of piloting made her duck exist

20 S S NP VP NP VP I V NP VP I V NP made her V made det N duck her duck רב משמעות תחבירית ( מבנית ) Structural ambiguity:

21 תיוג חלקי דיבר part of speech tagging [verb Duck ] ! [noun Duck] is delicious for dinner I went to the bank to deposit my check. I went to the bank to look out at the river.

22 Resources for NLP Systems Dictionary Morphology and Spelling Rules Grammar Rules Semantic Interpretation Rules Discourse Interpretation Natural Language processing involves (1) learning or fashioning the rules for each component, (2) embedding the rules in the relevant automaton, (3) and using the automaton to efficiently process the input.

23 Some Applications Information Retrieval: Web search (uni-lingual or multi-lingual) Question Answering/ Dialogue Report Generation: English/French weather report Foreign Language Training: Spanish/Arabic tutorial systems for military linguists Machine Translation : The translation system on Alta Vista Automatic “Essay evaluation”. Latent Semantic indexing (Landauer et al) Babelfish


Download ppt "עיבוד שפות טבעיות natural language processing יעל נצר בינה מלאכותית מכללת אשקלון."

Similar presentations


Ads by Google