Natural Language Semantics, Lecture notes of Logic

– This assumption is not always true, especially for words/phrases which have idiomatic/non-literal meaning. • e.g. “It's raining cats and dogs”. 3. Semantic ...

Typology: Lecture notes

2022/2023

Uploaded on 03/01/2023

lalitlallit
lalitlallit 🇺🇸

4.1

(10)

226 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
1
CSC 594 Topics in AI –
Applied Natural Language Processing
Fall 2009/2010
5. Semantics
2
Natural Language Semantics
Semantics of a sentence is the meani ng of the sentence.
And the meaning comes from:
meanings of the words/phrases in the sentence; plus
(semantic) relations between the words/phrases
Underlying assumption – Compositionality
The meaning of a sentence is a composition of the meanings of
its parts.
This assumption is not always true, especially for words/phrases
which have idiomatic/non-literal meaning.
e.g. “It’s raining cats and dogs
3
Semantic Analysis
Semantic Analysis
Derive the meaning of a sentence.
Derive the meaning of a sentence.
Often applied to the result of syntactic analysis.
Often applied to the result of syntactic analysis.
John
John ate
ate the cake
the cake.
.
NP V NP
NP V NP
((action INGEST) ; syntactic verb
((action INGEST) ; syntactic verb
(actor
(actor JOHN
JOHN-
-01) ; syntactic
01) ; syntactic subj
subj
(object FOOD)) ; syntactic
(object FOOD)) ; syntactic obj
obj
To do semantic analysis, we need a (semantic)
To do semantic analysis, we need a (semantic)
dictionary (e.g.
dictionary (e.g. WordNet
WordNet,
,
http://
http://www.cogsci.princeton.edu/~wn
www.cogsci.princeton.edu/~wn/
/).
).
pf3
pf4
pf5
pf8

Partial preview of the text

Download Natural Language Semantics and more Lecture notes Logic in PDF only on Docsity!

CSC 594 Topics in AI –

Applied Natural Language Processing

Fall 2009/

5. Semantics

Natural Language Semantics

  • Semantics of a sentence is the meaning of the sentence.
  • And the meaning comes from:
    • meanings of the words/phrases in the sentence; plus
    • (semantic) relations between the words/phrases
  • Underlying assumption – Compositionality
    • The meaning of a sentence is a composition of the meanings of

its parts.

  • This assumption is not always true, especially for words/phrases

which have idiomatic/non-literal meaning.

  • e.g. “It’s raining cats and dogs”

Semantic Analysis Semantic Analysis

„„^ Derive the meaning of a sentence.Derive the meaning of a sentence.

„„ Often applied to the result of syntactic analysis.Often applied to the result of syntactic analysis.

““JohnJohn ateate the cakethe cake..””

NPNP VV NPNP

((action((action INGEST)INGEST) ; syntactic verb; syntactic verb

(actor(actor JOHN-JOHN-01)01) ; syntactic; syntactic subjsubj

(object(object FOOD))FOOD)) ; syntactic; syntactic objobj

„„ To do semantic analysis, we need a (semantic)To do semantic analysis, we need a (semantic)

dictionary (e.g.dictionary (e.g. WordNetWordNet,,

http://http://www.cogsci.princeton.edu/~wnwww.cogsci.princeton.edu/~wn//).).

Various Semantic Analyses

  • There are many aspects and levels in the meaning of a

sentence:

  • Word meanings/senses, concepts
  • Semantic relations
  • Quantifiers (e.g. “Every boy loves a dog”)
  • Truth value in a model
  • Inference
    • e.g. entailment – “He was snoring” entails “He was sleeping”
  • Various representations of meaning
  • First-order Predicate Logic (FOPL)
  • Slot-filler structures or frames
  • Semantic networks
  • Web Ontology Language (OWL) Í new
  • etc.

Word Senses

  • Many words have more than one sense ( ambiguous words)
    • an applicable sense varies depending on the context.
  • A word may also have several parts-of-speech.

Ontology

  • Word senses (not words) can be grouped into a set of

broad classes – semantic concepts.

  • The set of semantic concepts is called ontology.
  • Typical major classes:
    • substance, quantity, quality, relation, place, time, position, state,

action, affection, event, situation

  • For each class, there are many sub-classes, which are

often organized in a hierarchy.

e.g. WordNet

  • Relations between actions/events (as used in WordNet)

Source: Jurafsky & Martin “Speech and Language Processing”

Thematic Roles (1)

  • Consider the following examples:
    • John broke the window with the hammer.
    • The hammer broke the window.
    • The window broke.
  • Although in each sentence the surface position of the

three words are different, they play the same semantic

roles (deep roles; thematic roles)

  • John – AGENT
  • the window – THEME (or OBJECT)
  • the hammer -- INSTRUMENT

Thematic Roles (2)

  • There are several commonly used thematic roles:

Source: Jurafsky & Martin “Speech and Language Processing”

Some prototypical examples of various thematic roles

Source: Jurafsky & Martin “Speech and Language Processing”

But it’s difficult to come up with a standard set of roles or to define them.

Linking Syntax and Semantics

  • Same thematic role could be realized in various syntactic

positions.

  • John broke the window with the hammer.
  • The hammer broke the window.
  • The window broke.
  • To link syntax and semantics to derive a semantic

representation of a sentence, one common approach is

by Lexical Semantics – encode the semantic

constraints which a word imposes upon other words in

specific relations ( arguments ).

  • [BREAK [AGENT animate] [THEME inanimate] [INSTR utensil] ]
  • [BREAK [AGENT utensil] [THEME inanimate] ]
  • [BREAK [AGENT inanimate] ]

Selectional Restrictions

  • Specifications of the legal combinations of senses that

can co-occur are called Selectional Restrictions –

constraints which a predicate imposes on the semantic

types of its arguments.

  • e.g. [READ [AGENT person] [THEME text] ]
  • Semantic constraints (on nouns) specify the most

general types – all sub-types/hyponyms in the ontology

are legal.

thing

animate inanimate

person animal

child adult

text

book magazine

  • Unification is the operation for

* combining information (concatenation)

* checking compatibility

  • Subsumption is an ordering on feature structures
foo
w
bar
cat
F
h
f
h
h
cat
F
cat
D
foo
g
h
h
cat
F
cat
D
foo
g

w

bar
foo
f

g

foo
cat
F f

g

foo
cat
F f h
bar
p g
foo

cat

F f h
bar
p

(define-word (cat) = V (word) = “ate” (head tense) = past (head sem cat) = EAT (head sem actor) = (head subj sem) (head sem object) = (head dobj sem))

head

object cat EAT

cat

V

subj sem actorsem

dobj

sem

tense past

word

“ate”

cat

EAT

actor object instru- ment cat

cat

cat FOOD

ANIMATE
UTENSIL

(define-semcat (cat) = EAT (actor cat) = ANIMATE (object cat) = FOOD (instrument cat) = UTENSIL)

head

object cat

EAT

cat

V

subj sem actorsem

dobj

sem

tense past

word

“ate”

FOOD

cat

cat

ANIMATE

UTENSIL

instru- ment

cat

Syntax/Semantics Integrated Processing

h 1 h

2 cat E

1 cat D

cat C

Grammar

word " d"

cat D

r1:

r2:

cat

cat

C
E

cat

D

hh

“d”

cat

cat

C
E

cat

D

word

hh

τ i^ ⇒ τ j

Derivation using Unification Grammar

R

1 headagr 2 headagr
headsubj 1 head
head 2 head
2 cat VP
1 cat NP
cat S

head 1 head

1 catV

catVG

R 1 ,

headagr 3S

word"Mary"

catNP

R 5 = "Mary" ,

Grammar

headagr 3S

word"John"

catNP

R 3 = "John" ,

headtype trans

headdobj 2 head

head 1 head

2 catNP

1 catVG

catVP

R 2 ,

headtype trans

headagr3S

word"likes"

catV

R 4 = "likes" ,