Title: COMP 4060 Natural Language Processing
1COMP 4060 Natural Language Processing
2Semantics What do we need?
- Distinguish between
- surface structure (syntactic structure) and
- deep structure (semantic structure) of sentences.
- Different forms of semantic representation
- logic formalisms
- ontology / semantic representation languages
- Case Frame Structures (Filmore)
- Conceptual Dependy Theory (Schank)
- Description Logic (DL) and similar KR languages
- Ontologies
3Constructing a Semantic Representation
- General approach
- Start with surface structure derived from parser.
- Map surface structure to semantic structure
- Use phrases as sub-structures.
- Find concepts and representations for central
phrases (e.g. VP, NP, then PP) - Assign phrases to appropriate roles around
central concepts (e.g. bind PP into VP
representation).
4Semantic Representation
- Semantic Representations are based on some form
of (formal) Representation Language. - Semantics Networks
- Conceptual Dependency Graphs
- Case Frames
- Ontologies
- DL and similar KR languages
5Ontology (Interlingua) approach
- Ontology a language-independent classification
of objects, events, relations - A Semantic Lexicon, which connects lexical items
to nodes (concepts) in the ontology - An analyzer that constructs Interlingua
representations and selects an appropriate one
6Semantic Lexicon
- Provides a syntactic context for the appearance
of the lexical item - Provides a mapping for the lexical item to a node
in the ontology (or more complex associations) - Provides connections from the syntactic context
to semantic roles and constraints on these roles
7Constructing an InterLingua Representation
- For each syntactic analysis
- Access all semantic mappings and contexts for
each lexical item. - Create all possible semantic representations.
- Test them for coherency of structure and content.
8Basic Semantic Dependency - Example
Input John makes tools Syntactic Analysis
cat verb root make tense present subject
root john cat noun-proper object roo
t tool cat noun number plural
9Lexicon Entries for John and tool
John-n1 syn-struc root john cat noun-proper
sem-struc human name john gender
male
tool-n1 syn-struc root tool cat n sem-struc
tool
10Ontological Representation - Example
Relevant extract from the specification of the
ontological concept used to describe the
appropriate meaning of make manufacturing-activi
ty... agent human theme artifact
11Semantic Dependency Component
The basic semantic dependency component of the
Text Meaning Representation (TMR) for John
makes tools manufacturing-activity-7 agent human
-3 theme set-1 element tool cardinality gt
1
12semantic representation of try-v3
try-v3 syn-struc root try cat v subj
root var1 cat n xcomp root
var2 cat v form OR infinitive
gerund sem-struc set-1 element-type refsem-1
cardinality gt1 refsem-1 sem event agent
var1 effect refsem-2 modality modality-
type epiteuctic modality-scope refsem-2 mod
ality-value lt 1 refsem-2 value var2 sem ev
ent
Means non finished action outcome unclear
13Why is Iraq developing weapons of mass
destruction?
14Wordsense Disambiguation
- Methods
- Constraint checking
- make sure the constraints imposed on context are
met - Graph traversal
- is-a links are inexpensive
- other links are more expensive
- the cheapest structure is the most coherent one
- Hunter-gatherer processing
- find (hunt) and eliminate (kill) unlikely
interpretations - collect (gather) remaining interpretations
15Logic Formalisms
16Semantics - Lambda Calculus 1
- Logic representations often involve
Lambda(?)-Calculus - ?-expressions represent central phrases (e.g. VP)
- They are like functions which can be applied to
terms - We replace variables in ?-expression with
semantic representations of complements or
modifier phrases
?x,y loves (x, y) FOPL sentence ?x?y loves (x,
y) ?-expression ?x?y loves (x, y) (John) ? ?y
loves (John, y) function
17Semantics - Lambda Calculus 2
- Transform sentence into lambda-expression
- AI Caramba is close to ICSI.
- specific close-to (AI Caramba, ICSI)
- general ?x,y close-to (x, y) ? xAI Caramba ?
yICSI - Lambda Conversion
- ?x?y close-to (x, y) (AI Caramba)
- Lambda Reduction
- ?y close-to (AI Caramba, y)
- close-to (AI Caramba, ICSI)
18Semantics - Lambda Calculus 3
- Lambda-expressions can be constructed from
central expression (VP), inserting semantic
representations for complement phrases - verb ? serves
- ?x?y ??e IS-A(e, Serving) ? Server(e,y) ?
Served(e,x) - Represents general semantics for the verb serve.
Sentence represents concrete event e. - Fill in appropriate expressions for x, y derived
from the complements / syntactic features of verb
serve in sentence. - For example,AI Caramba serves meat.
- - object-NP meat for x and
- - subject-NP Al Caramba for y.
19References
- Jurafsky, D. J. H. Martin, Speech and Language
Processing, Prentice-Hall, 2000. (Chapters 9 and
10) - Helmreich, S., From Syntax to Semantics,
Presentation in the 74.419 Course, November 2003. - Nirenburg, S. V. Raskin, Ontological Semantics,
MIT Press, 2004. - Wordnet, http//wordnet.princeton.edu/
- Suggested Upper Merged Ontology (SUMO),
http//www.ontologyportal.org/