semantics - upc universitat politècnica de catalunyagatius/mai-inlp/semantic1.pdf · pln...

29
PLN semántica 1 SEMANTICS Introduction Meaning Representation Meaning Interpretation

Upload: duongnga

Post on 20-Jun-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 1

SEMANTICS

• Introduction

• Meaning Representation

• Meaning Interpretation

Page 2: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 2

Introduction 1

Semantics is about the meaning of the sentences. Semantic Interpretation is the process of obtaining The sentence meaning.

Sentence

in NL

Logic

Form Contextual

Information

Meaning

Representation

Determining the correct

meaning for each word

Combination of the meaning of the

words to build a logical from

Page 3: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 3

Introduction 2

• The semantic representation of an object is obtained from the semantic interpretation of its components.

• The semantic interpretation process must be based in a theory, not in an "ad-hoc" process. This theory must support:

• - lexical and syntactic ambiguity

• - complex phenomena: negation, quantification, inferences, etc.

• An interface mechanism between sintax and semantic must be defined.

Page 4: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 4

• Incorporing the feature sem to each CFG rule

• S NP loves NP

• S[sem=loves(x,y)] NP[sem=x] loves NP[sem=y]

• The meaning of S is obtained from the meaning of the NPs

Composition of meaning from the meaning of parts

NP

V

loves

VP

S

NP x

y

loves(x,y)

NP the bucket

V

kicked

VP

S

NP x

died(x)

Page 5: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 5

Adding sem feature

Example Rule 1 • S NP loves NP

• S[sem=loves(x,y)] NP[sem=x] loves NP[sem=y]

Example Rules 2 • V[sem=loves] loves

• VP[sem=v(obj)] V[sem=v] NP[sem=obj]

• S[sem=vp(subj)] NP[sem=subj] VP[sem=vp]

Example of resulting analysis • George loves Laura

• sem=loves(Laura)(George)

Composition of meaning from the meaning of parts

Page 6: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 6

• Simple semantic interpretation

• IS bottom-up

• Grammar is in CNF

• Each node two sons: 1 function & 1 argument

• To obtain semantic interpretation: application of the function to argument

Composition of meaning from the meaning of parts

Page 7: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 7

Meaning Representation1

input: ¿Who organizes the party? logical form: (question (referent (X)) ( X instance (X, persona) (el1 (Y instance(Y, party)) ( Z instance(Z, organizes) present(Z) value_prop(Z, agent, X) value_prop(Z, patient,Y)))))

Page 8: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 8

Meaning Representation 2

• This form includes four different types of knowledge:

• Logical

• Conceptual

• Speech act

• Pragmatics

• The semantic formalism must support these different types of knowledge.

Page 9: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 9

Representations Based on Logic

• A finite set of functions with arguments.

• A finite set of predicates (functions that return a boolean value)with arguments.

• A finite set of constants and variables.

• A finite set of logical connectors.

• A finite set of quantifiers, that will be applied over the predicates.

Page 10: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 10

Objects

• Three types:

• Boolean

• True or false

• Entities

• Classes and their elements. For example, NPs

• Especifications of space and time

• Functions

Page 11: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 11

Functions 1

• Use of expressions in functions

• names

•the cat

g cat(g)

• adjetives

•The cat black and fat

g cat(g) black(g) fat(g)

• Other modifiers

•Peter's cat

g cat(g) belongs_to(g,peter)

Page 12: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 12

Functions 2

• Arity of predicates

Unary predicate: over entities

g cat(g)

Binary predicate over 2 entities

g belong_to(g,pepe)

Binary predicate over 2 unary predicates over entities

• Almost all cats see.

• almost(g cat(g), g see(g))

Page 13: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 13

Basic problems of Representation

• Quantification

• Intrasentencial reference

• Subordination

• Negation

• Conjuntion

• Ambiguity

A cat eats a fish

( X:cat ( Y:fish eats (X, Y)))

Page 14: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 14

Which information has to be represented? All information that can be obtained from the sentenced and it could be useful. For example, Allen states that to represent a nominal phrase four different types of information is necessary: 1 Operator 2 Variable 3 Type 4 Modifiers

Meaning Representation 3

Page 15: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 15

The boy (DEF/SING N1 BOY)

The big boy (DEF/SING N1 BOY (BIG N1))

Each boy eat a big cake (PAST C1 EAT (AGENT C1 (EACH N1 BOY)) (THEME C1 (INDEF/SING P1 CAKE (BIG P1)))) JOHN ARRIVED AT THE STATION (PAST L1 ARRIVE (AGENT L1 (NAME J1 PERSONA "JOHN")) (TO-LOC L1 (DEF/SING E1 STATION)))

Meaning Representation 4

Page 16: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 16

The logical forms are associated with the verb, the central part of the sentence. They included the modifiers representing the different cases: agentive, instrument, thema, patient, locative, temporal, etc...

Juan rompió la ventana con el martillo

agente

tema

instrumento

el viento rompió la ventana

instrumento (no agente)

tema

Juan murió

paciente (no agente)

Representing meaning 5

Page 17: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 17

The Semantic Networks 1

• Labeled directed graphs

• nodes ==> concepts (classes or types) / objects (instancias)

• edges ==> binary relations ( binary predicates) between concepts.

• Quillian (1968), Simmons (1973)

• Knowledge Representation Systems baseds on semantic networks

• NePS (Shapiro), Partitioned network ( Hendrix)

• KL-ONE (Brachman)

• Global organization of the Knowledge Base.

• Inference rules (basically, inheritance)

Page 18: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 18

The Semantic Networks 2

• Advantages

• Visibility.

• Associative representation. Efficient access.

• Appropiate for knowledge searching and inference.

• Representation of both general and specific knowledge.

• Supporting complex matching processes.

Page 19: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 19

The Semantic Networks 2

• Disadvantages

• Representation of relations of arity higher than two is difficult ( unary and binary relations are easily represented).

• Representation of logic operations such as negation, implication and disjuntion is difficult.

• Representation of quantification is difficult.

Page 20: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 20

Frames 1

• Representation of stereotypes

• Descriptors

• Classes and instances

• Descriptors (attributes) and relationships.

• Facetts

• trawberrys

• Semantic objects and relations predefined

• Not standard objects .

Page 21: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 21

Frames

• Inheritance of properties

• Other forms of inferences

• “The red car”: The car is not completely red but only the external part.

• “ one coffee spoon of sugar = the quantity of sugar that corresponds to that in a coffee spoon Procedimental information

• Different levels of granularity and abstraction

• 350 gr. of beans, two pieces of fruit, plenty of

Page 22: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 22

Frames2

• Sets of simple objects:

• Enumeration:

• three potatoes, salt and pepper

• Global reference:

• Fresh fruit , garlic

• Quantification:

• A tee spoon of sugar

• Disjunction:

• “one big potato or two small ones”

• Not exhaustive lists:

• Apples, bananas, oranges, etc...

Page 23: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 23

Frames

Objects not quantified.

• Mass:

• 3 Kg de rice

• Not formal metrics:

• A cup of rice

• Not specific quantities:

• A little bit of salt, some sugar

Page 24: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 24

Frames 4

• Properties

• Describing the content:

• Mature fruit

• Describing the de form:

• A big apple

• Describing what it is not:

• Olives without bones

• States, process, actions, success • Fry the sliced onion until golden brown

Page 25: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 25

Graphs of conceptual dependency

• Semantic graphs where nodes and edges belong to the set of predefined semantic objects and relationships (Schanck).

• Understanding a text ==> following (logical) causal chain

• The elements in the chain are conceptualizations and are linked by (logic) causal relationships.

• Schanck’s formalism is a dependency grammar .

• Representation based on actions and associated with deep structure based on:

• PP Names , ACT Actions

• PA Adjetives, AA Adverbs

Page 26: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 26

Conceptualizations

Actor: An actor acts ( agentivo act)

PP ACT

Goal: An action achieves a goal (objective)

O

ACT PP

R

PP

PP

ACT

Place: Change in the owner of an object:

Page 27: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 27

Conceptualizations 2

D

PP

PP

ACT

IACT

Directive: Initial and final points of an action:

Instrument:

Page 28: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 28

Predefined Semantic Actions

Phisical actions : MOVE, PROPEL, EXPEL, GRASP, INGEST Ingest : An actor X moves an object Y from an external position W to an internal postion (in a phisical body) Z .

D

Z

W

YO

INGESTX

Changes in the state: PTRANS: Physical movement ATRANS: Change in the abstract relationship Instruments: SPEAK: Making a sound ATTEND: Direct a sense towards an estimulus Mental actions: MTRANS: Transfering information MBUILD: Combination

Page 29: SEMANTICS - UPC Universitat Politècnica de Catalunyagatius/mai-inlp/semantic1.pdf · PLN semántica 2 Introduction 1 Semantics is about the meaning of the sentences. Semantic Interpretation

PLN semántica 29

PTRANSO

JUANJUANI

JUAN

MOVERrápido

O

PIERNASPOSSBY

JUAN

"Juan is running"

Example