Inteligencia Artificial Interpretación semántica Primavera 2008 profesor: Luigi Ceccaroni.

Slides:



Advertisements
Presentaciones similares
Writing Definitions. Instructions Definitions should be complete and full of enough detail that one cannot mistake the word for something else. Definitions.
Advertisements

LINGÜÍSTICA FUNCIONAL
1 Las Palabras Interrogativas ¿Quién?¿Qué?¿Cuándo?
Palabras Interrogativas/Interrogative Words
Question words AKA PALABRAS INTERROGATIVAS
Las Palabras Interrogativas
Spanish Interrogatives. Who? ¿Quién? Who? (multiple people) ¿Quiénes?
Las Palabras Interrogativas
Talking about weather Discussing the weather is a very human thing to do, and every language has its own way of doing it. If you think about it, the weather.
Hoy estudiamos: Los verbos ?Donde están los verbos?
saquen la tarea en la página 57, ejercicio 1 ejemplos 4 y 5
WALT: talking about dates and saying when your birthday is WILF: To be able to write & understand months and dates in Spanish to get to a Level 2 To be.
Dónde vs. Adónde Dónde means WHERE. When dónde is used, it is usually in relation to where someone IS LOCATED RIGHT THEN. Ex: ¿Dónde estás tú? Yo estoy.
Constructions with “se”. Impersonal Constructions with “se” You can use the pronoun “se” to avoid specifying the person who is doing the action. Using.
Los verbos regulares – ar What is an infinitive? An infinitive in both Spanish and English is the base form of the verb. In English, the infinitive.
Direct Object Pronouns Bill hit the ball. "Ball" receives the action of the verb "hit." Sherry reads the book. "Book" receives the action of the verb.
Las Palabras Interrogativas ¿Quién? ¿Qué? ¿Cuándo?
Question words AKA PALABRAS INTERROGATIVAS
How to make questions en español
Future. Before learning to form the future it in English: I will speak. The future tense in English ALWAYS has the word “will” (or “shall”). It can be.
Copyright © 2008 Vista Higher Learning. All rights reserved Negative words deny the existence of people and things or contradict statements, for.
Take 2: Affirmative and Negative words Words that can only refer to a person or to people Affirmative Alguien = Someone Negative Nadie = no one; nobody;
Subjunctive with an adjective clause
Qué haces en la escuela Interview, Conjugation Practice.
Telling Time.
Spanish Interrogatives. Who? ¿Quién? Who? (multiple people) ¿Quiénes?
DIRECT OBJECT PRONOUNS. DIRECT OBJECTS The object that directly receives the action of the verb is called the direct object. Mary kicked the ball. "Ball"
GRAMÁTICA Direct Object Pronouns (pronombres de complemento directo)
First Grade – High Frequency Word Reading Competition Classroom Competition Created by: Malene Golding School Improvement Officer: Kimberly Fonteno.
¡ Hola!/¿Qué Tal? ¡Hola!/¿Qué Tal?  Objectivo: To learn how to greet people in Spanish and say how you are feeling.
El verbo ser y adjetivos en español INTRODUCCIÓN Y CONTINUACIÓN DEL GÉNERO… Ojalá que estuviera en la playa…. I wish I were at the beach…. :)
Definite & indefinite articles
¿Recuerdan? Remember: Many comparisons in English end in –er; such as bigger, smaller, taller, shorter. To relay this same meaning use the following comparisons.
Asking Questions P. 184 Realidades 1.
¿Qué haces en la escuela? Question words, objects, yo-go’s.
¿Quién?¿Qué?¿Cuándo?¿Quién?¿Qué?¿Cuándo? 1 ¿Cómo estás?How are you? ¿De dónde eres?Where are you from? ¿Quién es ella?Who is she? 2 We are already familiar.
Las Preguntas (the questions) Tengo una pregunta… Sí, Juan habla mucho con el profesor en clase. No, Juan no habla mucho en clase. s vo s vo Forming.
Talking about weather Discussing the weather is a very human thing to do, and every language has its own way of doing it. If you think about it, the weather.
Do Now What are some Spanish words you already know? Do any of them resemble English words? Get out your Do Now Sheet!
¿Cuántos años tienes tú? ¿Cuántos hermanos tienes tú?
The following slides introduce the new verb IR.
Question Words Apuntes 2.1 Exprésate pg. 52. Asking Questions ► To ask a question that may be answered with sí or no, raise the pitch of your voice at.
Spanish Sentence Structure How can we make better sentences?
Objetivo: to identify phrases that express someone must do something. Ahora: List 3 adverbs and where are they placed in a sentence.
Las Palabras Interrogativas ¿Qué?¿Qué? 1 Las palabras interrogativas ¿Cómo estás?How are you? ¿De dónde eres?Where are you from? ¿Quién es ella?Who is.
Gramática de 2A. YoINosotros/ Nosotras We TúYou ÉlHeEllosThey EllaSheEllasThey Ud.You (formal)Uds.You all Ellos is used to refer to “they” if there is.
Essential ?: How do I use these irregular verbs? How are they different than the verbs I already know?
Page 387 Realidades 1 The Personal “a” Direct Objects You know that the direct object is the person or thing that receives the action of a verb.
Copy the white notes.  There are three types of verbs in the Spanish language. Verbs that end in –ar, -er, and –ir  Example: hablar, comer, escribir.
Antes de empezar – ¿Cómo se llaman estos quehaceres? (Necesito la tarea.)
Essential question: How do I say what I like and what interests/bores me?
Los Interrogativos ¿Quién?¿Qué?¿Cuándo?¿Quién?¿Qué?¿Cuándo? 1.
Vámonos If you could combine two animals into the perfect pet, what two animals would you choose and why? Answer in inglés. Ej: elephant & tiger  elephiger.
Tener Idioms [ Ustedes tienen que estudiar y practicar. Esta presentación es interactiva… ] [ Ustedes tienen que estudiar y practicar. Esta presentación.
Las Palabras Interrogativas ¿Quién?¿Qué?¿Cuándo?¿Quién?¿Qué?¿Cuándo? 1.
Verbs like Gustar Notes/ Examples.
Palabras interrogativas Question Words. Palabras interrogativas Question words are used to request information. ALL question words have written accents.
1 There are three basic ways to ask questions in Spanish. Can you guess what they are by looking at the photos and photo captions on this page?
LAS PREGUNTAS (Question Formation). Asking “yes/no” questions To ask spoken questions that can be answered with a simple “yes” or “no,” simply raise the.
Present Tense of AR Verbs Las clases de Sra. Schwarz Realidades 1.
Saber & Conocer. saber & conocer both words mean “to know.”
Tener. Regular Verb A regular verb will follow a pattern for conjugation. Pattern: Stem + endings.
The present tense of ser (to be) (El tiempo presente del verbo ser)
SER and SUBJECT PRONOUNS
The Present Tense of ser (to be) (El tiempo presente del verbo ser)
Quasimodo: Tienes que hacer parte D de la tarea..
Interrogative Words (Las palabras interrogativas)
ANTE TODO There are three basic ways to ask questions in Spanish.
Las Preguntas (the questions) Tengo una pregunta… Sí, Juan habla mucho con el profesor en clase. No, Juan no habla mucho en clase. s vo s vo Forming.
Transcripción de la presentación:

Inteligencia Artificial Interpretación semántica Primavera 2008 profesor: Luigi Ceccaroni

Formalismos de unificación La unificación se usa como mecanismo básico de composición entre constituyentes en gramáticas lógicas. Història: –Q-Systems (Colmerauer, 1972) –Prolog (Colmerauer, 1973) –Gramàtiques de Metamorfosi (Colmerauer, 1975) –Gramàtiques de Clàusules Definides (DCGs) (Pereira, Warren, 1980)

Análisis gramatical con unificación Gramática (1) oració (X,Y) :- gnom(X,Z), gver(Z,Y) (2) gnom(X,Y):- art(X,Z), nom(Z,Y) (3) gver(X,Y) :- ver(X,Y) Lexicón (4) art(X,Y):- el(X,Y) (5) nom(X,Y) :- gos(X,Y) (6) ver(X,Y) :- borda(X,Y)

Análisis gramatical con unificación (7) el(1,2) (8) gos(2,3) (9) borda(3,4) Frase a analizar: oració(1,4) el gos borda

Análisis gramatical con unificación oració(1,4) (R1) (X  1, Y  4) por unificación gnom (1,Z), gver(Z,4) (R2) aplicada a gnom(1,Z) art(1,U), nom(U,Z), gver(Z,4) el gos borda

Análisis gramatical con unificación art(1,U), nom(U,Z), gver(Z,4) (R4) aplicada a art(1,U) el(1,U), nom(U,Z), gver(Z,4) (R7) (U  2) el(1,2), nom(2,Z), gver(Z,4) nom(2,Z), gver(Z,4) el gos borda

Análisis gramatical con unificación nom(2,Z), gver(Z,4) (R5) gos(2,Z), gver(Z,4) (R8) (Z  3) gos(2,3), gver(3,4) gver(3,4) el gos borda

Análisis gramatical con unificación gver(3,4) (R3) ver(3,4) (R6) borda(3,4) (R9): Fin el gos borda

Análisis semántico Consiste en construir una representación de las frases en algún sistema formal. En general es un problema intratable. Se simplifica suponiendo que la semántica de una frase se pueda construir a partir de la semántica de sus partes: semántica compositiva. Algunas características del lenguaje se tienen que tratar a parte: referencias, omisiones, contexto…

Estrategias de análisis Dos maneras de plantear la interpretación semántica: –Secuencial (sintáctica → semántica) –Paralela (sintáctica + semántica)

Interpretación secuencial Problemas de ambigüedad –Es posible que haya más de una interpretación sintáctica. –Hay que considerarlas todas, para poder comprobar sucesivamente cuáles son las semánticamente posibles. Principal ventaja –El análisis semántico parte de un análisis sintáctico correcto.

Interpretación paralela Principal problema –No se sabe si la interpretación sintáctica es correcta hasta el final. Principal ventaja –Poder descartar interpretaciones sintácticas correctas (o parcialmente correctas) que no tengan interpretación semántica asociada. Las reglas sintácticas incluyen la información semántica asociada –Se obtiene como resultado un árbol de análisis y una o varias interpretaciones.

Sistema de representación El sistema de representación tiene que permitir: –Manejar cuantificación, predicación, negación, modalidad (creencias) –Resolver la ambigüedad tanto léxica (polisemia) como sintáctica –Manejar inferencias (herencia, razonamiento por omisión) Importante a la hora de resolver problemas que involucren el contexto o el conocimiento del dominio.

Sistema de representación Los sistemas que no se basan en la sintaxis para la interpretación suelen utilizar sistemas tipo ontologías. Por lo general, se utiliza una variedad de la lógica de primer orden adecuada al dominio de aplicación. El elemento básico de representación es el lexema: raíz de un grupo de palabras que son diferentes formas de “la misma palabra” (ej.: ir, ido, yendo).

Sistema de representación Ejemplos –Los nombres propios corresponden a constantes. –Los verbos intransitivos a predicados unarios: Juan ríeríe(juan) –Los verbos transitivos a predicados de aridad superior: Juan lee el Quijote lee(juan, quijote) –Los nombres genéricos a predicados sobre variables: El hombrehombre(X) –Los adjetivos a predicados unarios: La casa grandegrande(X) ∧ casa(X)

Sistema de representación La representación consiste normalmente en un árbol de análisis y una función de composición que construye la interpretación de los elementos asociados. sem S = f S (sem NP, sem VP ) sem NP = f NP (sem ART, sem N ) sem ART = f ART (sem el) S NP NAME Adrià VP V menja NP ART N bacallàel

La representación del significado: ejemplo entrada: Qui dirigeix el PSOE? forma lògica: (pregunta (referent (X)) (X instancia (X, persona) (el1 (Y instancia(Y, partit_polític) nom(Y, "PSOE")) (Z instancia(Z, dirigir) present(Z) valor_prop(Z, agent, X) valor_prop(Z, pacient,Y)))))

Semántica y forma lógica 18

Semántica y forma lógica Semantics = theories of meaning Introduction of a level of context- independent meaning called the logical form. –It can be produced directly from the syntactic structure of a sentence. –It does not contain the results of any analysis that requires interpretation of the sentence in context. 19

Semántica y forma lógica Precisely defining the notions of semantics and meaning is surprisingly difficult. –The terms are used for several different purposes in natural and technical usage. –There is a use of the verb mean that has nothing to do with language: This fire means someone camped here last night. 20

Semántica y forma lógica This fire means someone camped here last night. In this example, the fire is evidence for (or implies) the conclusion. The meaning we are interested in is not this one. It is closer to the usage when defining a word. 21

Semántica y forma lógica “Amble” means to walk slowly. This defines the meaning of a word in terms of other words. We are interested in specifying meaning without having to refer back to natural language itself. But even if we can do this, defining a notion of sentence meaning is difficult. 22

Semántica y forma lógica A guard at the airport: “Do you know what gate you are going to?” If we interpret this as asking whether we know where we are going, we answer yes. But the response can be based on a misunderstanding, if the guard then asks: “Which gate is it?” 23

Semántica y forma lógica “Do you know what gate you are going to?” This sentence then appears to mean different things in different contexts. Can we define a notion of sentence meaning that is independent of context? Is there a level at which this sentence has a single meaning, but may be used for different purposes? 24

Semántica y forma lógica Separating sentence meaning from sentence usage is complex, but there are many advantages, primarily modularity. If sentences have no context-independent meaning, then we may not be able to separate: –the study of language –the study of general human reasoning and context 25

Semántica y forma lógica We use the term meaning in a context- independent sense. We use the term usage for the context- dependent aspects. The representation of context-independent meaning is called the logical form. 26

Semántica y forma lógica The process of mapping a sentence to its logical form is called semantic interpretation. The process of mapping the logical form to the final knowledge representation language is called contextual interpretation. 27

Semántica y forma lógica 28 Syntactic analysis semantic interpretation Logical form (ROJA1 ) contextual interpretation Final representation Roja(BO73) S NP VP V es ADJP ART N pelotala roja