SlideShare a Scribd company logo
Seman&c	
  Analysis	
  in	
  Language	
  Technology	
  
http://stp.lingfil.uu.se/~santinim/sais/2016/sais_2016.htm 



Semantics and 

Computational Semantics


Marina	
  San(ni	
  
san$nim@stp.lingfil.uu.se	
  
	
  
Department	
  of	
  Linguis(cs	
  and	
  Philology	
  
Uppsala	
  University,	
  Uppsala,	
  Sweden	
  
	
  
Spring	
  2016	
  
	
  Lecture  2:  Computational  Semantics	
 1
Acknowledgements	
  
The	
  content	
  of	
  these	
  slides	
  is	
  mostly	
  based	
  on	
  the	
  following	
  chapter:	
  	
  
	
  
•  Stone	
  M.	
  (In	
  Press)	
  Seman$cs	
  and	
  computa$onal	
  seman$cs	
  To	
  appear	
  in	
  
Paul	
  Dekker	
  and	
  Maria	
  Aloni,	
  eds.,	
  Cambridge	
  Handbook	
  of	
  Formal	
  
Seman(cs.	
  hJps://www.cs.rutgers.edu/~mdstone/pubs/compsem13.pdf	
  	
  
•  Blackburn	
  P.	
  	
  and	
  Bos	
  J.	
  (2003)	
  Computa$onal	
  Seman$cs	
  	
  
hJp://www.let.rug.nl/bos/pubs/BlackburnBos2003Theoria.pdf	
  	
  
	
  
Some	
  slides	
  are	
  borrowed	
  from	
  /	
  inspired	
  by:	
  
	
  
•  Manning	
  C.:	
  Computa(onal	
  Seman(cs,	
  CS224N	
  Stanford	
  University	
  
hJp://web.stanford.edu/class/cs224n/handouts/Computa(onal
%20Seman(cs.pdf	
  
	
  
•  Dragomir	
  Radev:	
  Introduc(on	
  to	
  NLP,	
  Coursera	
  
Lecture  2:  Computational  Semantics	
 2
Outline	
  
•  Representa(on	
  and	
  Seman(cs	
  
•  Computa(on	
  and	
  Composi(onal	
  Seman(cs	
  
– Logic	
  
– Unifica(on	
  
•  Conclusions	
  
Lecture  2:  Computational  Semantics	
 3
What	
  is	
  Seman(cs?	
  
Lecture  2:  Computational  Semantics	
 4
Generally	
  speaking…	
  
seman(cs	
  is	
  the	
  study	
  of	
  meaning	
  
that	
  is	
  used	
  for	
  understanding	
  
human	
  expressions	
  through	
  
language	
  
•  Seman&cs	
  is	
  the	
  study	
  of	
  meaning:	
  	
  
	
  accounts	
  for	
  links	
  between	
  words	
  and	
  the	
  world.	
  	
  
•  Seman(cs	
  is	
  the	
  study	
  of	
  how	
  meaning	
  is	
  conveyed	
  through	
  signs	
  
and	
  language.	
  	
  
–  Denota(ons	
  are	
  the	
  literal	
  or	
  primary	
  meanings	
  of	
  words.	
  
–  Connota(ons	
  are	
  ideas	
  or	
  feelings	
  that	
  a	
  word	
  invokes	
  for	
  a	
  person	
  in	
  
addi(on	
  to	
  its	
  literal	
  or	
  primary	
  meaning.	
  	
  
•  Seman(cs	
  focuses	
  on	
  the	
  rela(on	
  between	
  signifiers	
  (like	
  words,	
  
phrases,	
  signs,	
  and	
  symbols)	
  and	
  what	
  they	
  stand	
  for,	
  ie	
  their	
  
denota(ons	
  (concepts)	
  and	
  connota(ons	
  (seman(c	
  analysis).	
  	
  
	
   Lecture  2:  Computational  Semantics	
 5
Comput(er)-­‐a(onal	
  Seman(cs	
  
•  Seman$cs	
  is	
  the	
  study	
  of	
  meaning	
  in	
  language.	
  
•  Computer	
  science	
  is	
  the	
  study	
  of	
  precise	
  
descrip(ons	
  of	
  finite	
  processes;	
  	
  
•  Thus,	
  computa(onal	
  seman(cs	
  embraces	
  any	
  
project	
  that	
  approaches	
  the	
  phenomenon	
  of	
  
meaning	
  by	
  way	
  of	
  tasks	
  that	
  can	
  be	
  performed	
  by	
  
following	
  definite	
  sets	
  of	
  mechanical	
  instruc(ons.	
  
Lecture  2:  Computational  Semantics	
 6
We	
  can	
  start	
  by	
  saying	
  that…	
  
”The	
  aim	
  of	
  computa(onal	
  seman(cs	
  is	
  to	
  find	
  
techniques	
  for	
  automa(cally	
  construc&ng	
  
seman&c	
  representa&ons	
  for	
  expressions	
  of	
  
human	
  language,	
  representa(ons	
  that	
  be	
  used	
  
to	
  perform	
  inference.	
  ”	
  	
  
	
   	
   	
   	
   	
   	
  Blackburn	
  and	
  Bos	
  (2003).	
  
	
  
Inference	
  =	
  reasoning	
  
	
  
Lecture  2:  Computational  Semantics	
 7
Why	
  do	
  we	
  need	
  ”meaning”	
  in	
  
Language	
  Technology?	
  
•  The	
  short	
  answer	
  is:	
  because	
  ”intelligent”	
  
applica(ons	
  must	
  ”understand”	
  in	
  order	
  to	
  
act.	
  
Lecture  2:  Computational  Semantics	
 8
Ex	
  1:	
  Google	
  -­‐	
  What	
  is	
  the	
  capital	
  of	
  
Sweden?	
  
•  Answer:	
  
Lecture  2:  Computational  Semantics	
 9
Ex	
  2:	
  Siri	
  -­‐	
  Which	
  countries	
  does	
  the	
  
Danube	
  river	
  flows	
  through?	
  
Lecture  2:  Computational  Semantics	
 10
Ex	
  3:	
  Facebook	
  Graph	
  Search	
  
Facebook	
  Graph	
  Search	
  was	
  a	
  seman$c	
  search	
  
engine	
  that	
  was	
  introduced	
  by	
  Facebook	
  in	
  March	
  
2013.	
  
	
  It	
  was	
  designed	
  to	
  give	
  answers	
  to	
  user	
  natural	
  
language	
  queries	
  rather	
  than	
  a	
  list	
  of	
  links.”	
  
	
  
Examples:	
  	
  
"Friends	
  who	
  Like	
  Star	
  Wars	
  and	
  Harry	
  Po@er”	
  
"photos	
  of	
  my	
  friends	
  taken	
  at	
  Na&onal	
  Parks"	
  
	
  
hJps://en.wikipedia.org/wiki/Facebook_Graph_Search	
  	
  
Lecture  2:  Computational  Semantics	
 11
Understanding	
  Meaning	
  
If	
  an	
  agent	
  (eg.	
  a	
  robot)	
  hears	
  a	
  sentence	
  and	
  
act	
  accordingly,	
  the	
  agent	
  is	
  said	
  to	
  understand	
  
the	
  sentence:	
  	
  
Example:	
  Leave	
  the	
  book	
  on	
  the	
  table	
  
	
  
Understanding	
  may	
  involve	
  inference:	
  Which	
  
book?	
  Which	
  table?	
  
So,	
  understanding	
  may	
  involve	
  some	
  kind	
  of	
  
reasoning…	
  
Lecture  2:  Computational  Semantics	
 12
NLP/LT	
  and	
  Seman(cs	
  
•  Not	
  all	
  LT-­‐based	
  applica(ons	
  require	
  seman(cs.	
  
–  	
   Ex:	
  taggers,	
  parsers,	
  etc.	
  
•  Much	
  can	
  be	
  done	
  with	
  shallow	
  seman(cs.	
  	
  
–  Ex:	
  word	
  sense	
  disambigua(on,	
  etc.	
  
•  For	
  more	
  complex	
  tasks	
  (more	
  ”intelligent”	
  
tasks”)	
  seman(c	
  reasoning	
  is	
  needed.	
  	
  
–  Ex:	
  QAnswering,	
  Info	
  Extrac(on,	
  Ontology	
  Crea(on,	
  
etc.	
  	
  
Lecture  2:  Computational  Semantics	
 13
Tradi(onally…	
  	
  
…reasoning	
  is	
  done	
  by	
  using	
  some	
  kind	
  of	
  logic…	
  
	
  
A	
  tradi(onal	
  approach	
  is	
  to	
  use	
  FOL	
  (first	
  order	
  
logic)	
  to	
  ”formalize”	
  meaning	
  (see	
  Formal	
  
Seman(cs	
  Theories).	
  
	
  
…	
  before	
  start	
  studying	
  how	
  seman(cs	
  is	
  used	
  in	
  
Language	
  Technology-­‐based	
  applica(ons,	
  let’s	
  
summarise	
  how	
  seman(cs	
  has	
  been	
  brought	
  into	
  
computer	
  science	
  and	
  ar(ficial	
  intelligence.	
  
Lecture  2:  Computational  Semantics	
 14
REPRESENTATION	
  AND	
  SEMANTICS	
  
Lecture  2:  Computational  Semantics	
 15
Proper(es	
  of	
  Meaning	
  in	
  Logic	
  
•  Verifiability	
  
–  Can	
  a	
  statement	
  be	
  verified	
  against	
  a	
  knowledge	
  base	
  (KB)	
  
–  Example:	
  does	
  my	
  cat	
  Mar(n	
  have	
  whiskers?	
  
•  Unambiguousness	
  
–  Give	
  me	
  the	
  book	
  
–  Which	
  book?	
  
•  Canonical	
  form	
  (standard/abstract	
  form	
  of	
  an	
  expression)	
  
•  Expressiveness	
  
–  Can	
  the	
  formalism	
  express	
  temporal	
  rela(ons,	
  beliefs,	
  …?	
  
–  Is	
  it	
  domain-­‐independent?	
  
•  Inference	
  
Lecture  2:  Computational  Semantics	
 16
Represen(ng	
  Meaning	
  
•  A	
  tradi(onal	
  approach	
  to	
  meaning	
  is	
  to	
  
– 	
  use	
  proposi(onal	
  logic	
  
– predicate/first	
  order	
  logic	
  (FOL)	
  
– use	
  theorem	
  proving	
  (inference)	
  to	
  determine	
  
whether	
  a	
  statement	
  entails	
  another	
  
Lecture  2:  Computational  Semantics	
 17
Proposi(onal	
  Logic	
  :	
  proposi(ons	
  are	
  
represented	
  by	
  leJers	
  	
  
•  In	
  proposi(onal	
  logic,	
  we	
  use	
  leJers	
  to	
  
symbolize	
  en(re	
  proposi(ons.	
  	
  
•  Proposi(ons	
  are	
  statements	
  of	
  the	
  form	
  "x	
  is	
  
y"	
  where	
  x	
  is	
  a	
  subject	
  and	
  y	
  is	
  a	
  predicate.	
  	
  
•  For	
  example,	
  "Socrates	
  is	
  a	
  Man"	
  is	
  a	
  
proposi(on	
  and	
  might	
  be	
  represented	
  in	
  
proposi(onal	
  logic	
  as	
  "S".	
  
Lecture  2:  Computational  Semantics	
 18
True	
  and	
  False	
  
•  Proposi(onal	
  Logic	
  studies	
  proposi(ons,	
  whether	
  they	
  are	
  true	
  or	
  false.	
  
•  A	
  sentence	
  might	
  contain	
  several	
  proposi(ons	
  that	
  are	
  linked	
  together	
  by	
  
logical	
  connec(ves.	
  	
  
•  Logical	
  connec(ves	
  are	
  found	
  in	
  natural	
  languages.	
  In	
  English	
  for	
  example,	
  
some	
  examples	
  are	
  "and"	
  (conjunc(on),	
  "or"	
  (disjunc(on),	
  
"not”	
  (nega(on)	
  and	
  "if"	
  (but	
  only	
  when	
  used	
  to	
  denote	
  material	
  
condi(onal).	
  
•  Ex	
  (wikipedia):	
  simple	
  inference	
  within	
  the	
  scope	
  of	
  proposi(onal	
  logic:	
  
•  Premise	
  1:	
  If	
  it's	
  raining	
  then	
  it's	
  cloudy.	
  
•  Premise	
  2:	
  It's	
  raining.	
  
•  Conclusion:	
  It's	
  cloudy.	
  
Both	
  premises	
  and	
  the	
  conclusion	
  are	
  proposi(ons.	
  The	
  premises	
  are	
  taken	
  
for	
  granted	
  and	
  then	
  with	
  the	
  applica(on	
  of	
  modus	
  ponens	
  (an	
  inference	
  
rule)	
  the	
  conclusion	
  follows.	
  
Lecture  2:  Computational  Semantics	
 19
Syntax	
  of	
  Proposi(onal	
  Logic	
  
•  The	
  simplest	
  type	
  of	
  logic	
  	
  
	
  
–	
  If	
  S	
  is	
  a	
  sentence,	
  ¬S	
  is	
  a	
  sentence	
  (nega(on)	
  
–	
  If	
  S1	
  and	
  S2	
  are	
  sentences,	
  S1	
  ∧	
  S2	
  is	
  a	
  sentence	
  
(conjunc(on)	
  
–	
  If	
  S1	
  and	
  S2	
  are	
  sentences,	
  S1	
  ∨	
  S2	
  is	
  a	
  sentence	
  
(disjunc(on)	
  
–	
  If	
  S1	
  and	
  S2	
  are	
  sentences,	
  S1	
  ⇒	
  S2	
  is	
  a	
  sentence	
  
(implica(on)	
  
–	
  If	
  S1	
  and	
  S2	
  are	
  sentences,	
  S1	
  ⇔	
  S2	
  is	
  a	
  
sentence(bicondi(onal)	
  
Lecture  2:  Computational  Semantics	
 20
Proposi(onal	
  Logic	
  and	
  Natural	
  Language	
  
Operator	
  Precedence	
  
¬	
  (highest)	
  =	
  nega(on	
  
∧	
  =	
  conjunc(on	
  
∨	
  =	
  disjunc(on	
  
⇒	
  =	
  implica(on	
  
⇔	
  (lowest)	
  =	
  bicondi(onal*	
  
	
  
*A	
  bicondi(onal	
  statement	
  is	
  
defined	
  to	
  be	
  true	
  whenever	
  
both	
  parts	
  have	
  the	
  same	
  truth	
  
value.	
  
Logic	
  and	
  Language	
  
A	
  =	
  Today	
  is	
  a	
  holiday.	
  
B	
  =	
  We	
  are	
  going	
  to	
  the	
  park.	
  
A	
  ⇒	
  B	
  
A	
  ∧	
  ¬	
  B	
  
¬	
  A	
  ⇒	
  B	
  
¬	
  B	
  ⇒	
  A	
  
B	
  ⇒	
  A	
  
Lecture  2:  Computational  Semantics	
 21
Truth	
  table	
  
Lecture  2:  Computational  Semantics	
 22
Proposi(onal	
  Logic	
  and	
  Seman(cs	
  
Transla$ng	
  propos$ons	
  to	
  Eng	
   Seman$cs	
  of	
  Proposi$onal	
  Logic	
  
Lecture  2:  Computational  Semantics	
 23
Proposi(onal	
  logic	
  vs	
  FOL/Predicate	
  Logic	
  
•  Proposi(onal	
  logic	
  (also	
  called	
  senten(al	
  logic)	
  is	
  logic	
  that	
  includes	
  
sentence	
  leJers	
  (A,B,C	
  …	
  )	
  and	
  logical	
  connec(ves,	
  but	
  not	
  
quan(fiers.	
  The	
  seman(cs	
  of	
  proposi(onal	
  logic	
  uses	
  truth	
  
assignments	
  to	
  the	
  leJers	
  to	
  determine	
  whether	
  a	
  compound	
  
proposi(onal	
  sentence	
  is	
  true.	
  
•  Predicate	
  logic	
  is	
  usually	
  used	
  as	
  a	
  synonym	
  for	
  first-­‐order	
  logic.	
  
Syntac(cally,	
  first-­‐order	
  logic	
  has	
  the	
  same	
  connec(ves	
  as	
  
proposi(onal	
  logic,	
  but	
  it	
  also	
  has	
  variables	
  for	
  individual	
  objects,	
  
quan(fiers,	
  symbols	
  for	
  func(ons,	
  and	
  symbols	
  for	
  rela(ons.	
  	
  
•  Its	
  seman(cs	
  includes	
  a	
  domain	
  of	
  discourse	
  for	
  the	
  variables	
  and	
  
quan(fiers	
  to	
  range	
  over,	
  along	
  with	
  interpreta(ons	
  of	
  the	
  rela(on	
  
and	
  func(on	
  symbols.	
  
Lecture  2:  Computational  Semantics	
 24
Predicate	
  Logic:	
  more	
  expressive	
  than	
  
Proposi(onal	
  Logic	
  
•  In	
  predicate	
  logic,	
  we	
  symbolize	
  subject	
  and	
  predicate	
  
separately.	
  	
  
•  The	
  important	
  difference	
  is	
  that	
  you	
  can	
  use	
  predicate	
  
logic	
  to	
  say	
  something	
  about	
  a	
  set	
  of	
  objects.	
  	
  
•  By	
  introducing	
  the	
  universal	
  quan(fier	
  ("∀"),	
  the	
  
existen(al	
  quan(fier	
  ("∃")	
  and	
  variables	
  ("x",	
  "y"	
  or	
  
"z"),	
  we	
  can	
  use	
  predicate	
  logic	
  to	
  represent	
  thing	
  like:	
  	
  
–  "Everything	
  is	
  green"	
  as	
  "∀Gx”	
  ”	
  
–  Something	
  is	
  blue"	
  as	
  "∃Bx”	
  
Lecture  2:  Computational  Semantics	
 25
Used	
  to	
  represent	
  
•  Objects	
  –	
  Mar(n	
  the	
  cat	
  
•  Rela(ons	
  –	
  Mar(n	
  and	
  Moses	
  are	
  brothers	
  
•  Func(ons	
  –	
  Mar(n’s	
  age	
  
Lecture  2:  Computational  Semantics	
 26
FOL	
  elements	
  (short	
  version)	
  	
  
•  Constant	
  
•  Variables	
  
•  Predicates	
  
•  Boolean	
  connec(ves	
  
•  Quan(fiers	
  
•  Brackets	
  and	
  comma	
  to	
  group	
  the	
  symbols	
  
together	
  
•  Ex:	
  A	
  woman	
  crosses	
  Sunset	
  Boulevard	
  
Lecture  2:  Computational  Semantics	
 27
FOL	
  elements	
  (long	
  version)	
  
Formula	
  →	
  AtomicFormula	
  or	
  Formula	
  
Connec(ve	
  Formula	
  or	
  Quan(fier	
  Variable	
  
Formula	
  or	
  ¬	
  Formula	
  	
  
(Formula):	
  
	
  
Lecture  2:  Computational  Semantics	
 28
FOL’s	
  most	
  important	
  feature:	
  
quan(fiers	
  à	
  generaliza(on	
  
Lecture  2:  Computational  Semantics	
 29	
To  ace  a  test  =  
to  get  a  very  
high  score  on  a  
test
Proper(es	
  of	
  Predicate	
  Logic	
  
•  Pros	
  
– Composi(onal	
  
– Declara(ve	
  
•  Cons	
  
– Limited	
  expressive	
  power	
  
– Represents	
  facts	
  
Lecture  2:  Computational  Semantics	
 30
Lambda	
  calculus	
  à	
  Variable	
  subs(tu(on	
  	
  
Useful	
  for	
  expressing	
  computa(on	
  by	
  way	
  of	
  variable	
  binding	
  and	
  subs(tu(on.	
  
Variables	
  are	
  just	
  names	
  that	
  are	
  bound	
  as	
  arguments.	
  	
  
	
  
Lambda	
  calculus	
  is	
  important	
  in	
  programming	
  language	
  theory.	
  	
  
	
  
	
  
Example	
  
–	
  inc(x)	
  =	
  λx	
  x+1	
  
–	
  then	
  inc(4)	
  =	
  (λx	
  x+1)(4)	
  =	
  5	
  
	
  
Example	
  
–	
  add(x,y)	
  =	
  λx,λy(x+y)	
  
–	
  then	
  add(3,4)	
  =	
  (λx,λy(x+y))(3)(4)=	
  (λy	
  3+y)(4)	
  =3+4	
  =	
  12	
  
Lecture  2:  Computational  Semantics	
 31
Stages	
  of	
  Seman(c	
  Parsing	
  
•  Input	
  
– Sentence	
  
•  	
  Syntac(c	
  Analysis	
  
– 	
  Syntac(c	
  structure	
  
•  Seman(c	
  Analysis	
  
– Seman(c	
  representa(on	
  
Lecture  2:  Computational  Semantics	
 32
Composi(onal	
  Seman(cs	
  
•  Add	
  seman(c	
  aJachments	
  to	
  syntac(c	
  rules	
  
•  	
  Composi(onal	
  seman(cs	
  
– Parse	
  the	
  sentence	
  syntac(cally	
  
– Associate	
  some	
  seman(cs	
  to	
  each	
  word	
  
– Combine	
  the	
  seman(cs	
  of	
  words	
  and	
  non	
  
terminals	
  recursively	
  
– Un(l	
  the	
  root	
  of	
  the	
  sentence	
  
Lecture  2:  Computational  Semantics	
 33
Example	
   •  Input	
  
– Javier	
  likes	
  pizza	
  
•  Output	
  
– like(Javier,	
  
pizza)	
  
Lecture  2:  Computational  Semantics	
 34	
Associate  a  
semantic  
expression  
with  each  
node
Seman(c	
  Parsing	
  
•  Conver(ng	
  natural	
  language	
  to	
  a	
  logical	
  form	
  
– e.g.,	
  executable	
  code	
  for	
  a	
  specific	
  applica(on	
  
– 	
  Example:	
  
•  Airline	
  reserva(ons	
  
•  Geographical	
  query	
  systems	
  
Lecture  2:  Computational  Semantics	
 35
What	
  about	
  ”kick	
  the	
  bucket”?	
  
•  What	
  happens	
  when	
  the	
  meaning	
  of	
  single	
  
words	
  does	
  not	
  lead	
  to	
  the	
  meaning	
  of	
  the	
  
whole?	
  	
  
Lecture  2:  Computational  Semantics	
 36
COMPUTATION	
  AND	
  
COMPOSITIONAL	
  SEMANTICS	
  
Lecture  2:  Computational  Semantics	
 37
Unifica(on	
  Grammar	
  
•  Unifica(on	
  grammar	
  is	
  a	
  formalism	
  that	
  derives	
  
seman(c	
  representa(ons	
  by	
  accumula(ng	
  
constraints	
  in	
  tandem	
  with	
  a	
  syntac(c	
  deriva(on.	
  	
  
•  The	
  constraints	
  take	
  the	
  form	
  of	
  equa(ons	
  
between	
  terms	
  which	
  may	
  contain	
  variables.	
  	
  
•  The	
  formalism	
  gets	
  its	
  name	
  from	
  the	
  process,	
  
unifica$on,	
  which	
  determines	
  values	
  for	
  
variables	
  to	
  solve	
  the	
  equa(ons.	
  
Lecture  2:  Computational  Semantics	
 38
Example:	
  ”everybody	
  walks”	
  
The	
  meaning	
  representa(on	
  of	
  ∀x.walks(x)	
  is	
  
assembled	
  as	
  the	
  solu(on	
  to	
  a	
  set	
  of	
  constraints	
  
and	
  not	
  through	
  the	
  func(on–argument	
  
maninupula(on	
  of	
  the	
  lambda	
  calculus.	
  
Lecture  2:  Computational  Semantics	
 39
More	
  flexibility	
  
•  Lambda-­‐calculus	
  techniques	
  expect	
  each	
  element	
  in	
  a	
  meaning	
  
representa(on	
  to	
  be	
  specified	
  exactly	
  once.	
  
•  Unifica(on:	
  we	
  model	
  sentence	
  meaning	
  as	
  the	
  solu(on	
  to	
  a	
  set	
  of	
  
equa(ons	
  à	
  we	
  might	
  	
  find	
  elements	
  of	
  meaning	
  that	
  are	
  
simultaneously	
  determined	
  by	
  mul(ple	
  equa(ons,	
  and	
  elements	
  of	
  
meaning	
  that	
  are	
  lev	
  unconstrained	
  and	
  must	
  be	
  resolved	
  by	
  
context.	
  	
  
•  Constraint	
  techniques	
  offer	
  new	
  ways	
  to	
  analyze	
  idioms	
  and	
  mul(-­‐
word	
  expressions.	
  Each	
  cons(tuent	
  can	
  not	
  only	
  specify	
  its	
  own	
  
meaning	
  but	
  can	
  impose	
  a	
  constraint	
  on	
  the	
  meaning	
  of	
  the	
  whole.	
  	
  
Lecture  2:  Computational  Semantics	
 40
Limita(ons	
  
•  Composi(onal	
  seman(cs	
  (any	
  formalisms)	
  
gives	
  us	
  representa(ons	
  that	
  capture	
  aspects	
  
of	
  the	
  logical	
  structure	
  of	
  meaning.	
  	
  
•  But:	
  what	
  specific	
  en((es	
  and	
  concepts	
  does	
  a	
  
sentence	
  describe,	
  and	
  what	
  specific	
  claim	
  
does	
  it	
  make	
  about	
  them?	
  
Lecture  2:  Computational  Semantics	
 41
CONCLUSIONS	
  
Lecture  2:  Computational  Semantics	
 42
Basically…	
  
•  We	
  need	
  to	
  (e	
  together:	
  
– Grammar	
  (grammar	
  and	
  composi(onal	
  meaning	
  is	
  
not	
  enough)	
  
– Speaker’s	
  kowledge	
  about	
  the	
  wolrd	
  
– PaBerns	
  of	
  use	
  à	
  unique	
  insights	
  given	
  by	
  large	
  
corpora	
  of	
  linguis$c	
  evidence	
  
Lecture  2:  Computational  Semantics	
 43
In	
  this	
  course…	
  
•  We	
  review	
  research	
  about	
  different	
  aspects	
  of	
  
word	
  meaning	
  that	
  are	
  needed	
  for	
  LT-­‐based	
  
applica(ons.	
  
Lecture  2:  Computational  Semantics	
 44
How	
  is	
  *meaning*	
  handled	
  in	
  
Seman(c-­‐Based	
  LT-­‐Applica(ons	
  
•  Seman(c	
  Role	
  Labelling/Predicate-­‐Argument	
  
Structure	
  (???)	
  
•  Sen(ment	
  Analysis	
  (???)	
  
•  Word	
  sense	
  disambigua(on	
  (???)	
  
•  Informa(on	
  extrac(on	
  (???)	
  
•  Ques(on	
  Answering	
  (???)	
  
•  Ontologies	
  (???)	
  
Lecture  2:  Computational  Semantics	
 45
Reminder:	
  Glossary	
  Entries	
  
•  Which	
  concepts	
  are	
  the	
  most	
  salient	
  in	
  this	
  
lecture?	
  
•  Start	
  crea(ng	
  your	
  Glossary	
  now…	
  
Lecture  2:  Computational  Semantics	
 46
The	
  End	
  
	
  
	
  
Lecture  2:  Computational  Semantics	
 47

More Related Content

What's hot (20)

PPTX
Psychology of SLA.
SakarHussein
 
PPT
Semantic vs Pragmatics
A. Tenry Lawangen Aspat Colle
 
PPTX
Syntax- introduction to syntax
Lampung University
 
PPTX
Corpus linguistics
Irum Malik
 
PPT
Transformational generative grammar
Baishakhi Amin
 
PPTX
Machine Translation
Skilrock Technologies
 
PPTX
SEMANTICS
Hameel Khan
 
PPTX
Designing a-syllabus-group-7 (for memory)
Dieu Hien
 
PPTX
Phonotactics
Gabby Villamagua
 
PPTX
APPRAISAL THEORY
Matthew Bediako
 
PPTX
Phrase structure grammar
SubramanianMuthusamy3
 
PPT
Natural language processing
Basha Chand
 
PPTX
Phrase Structure Grammar
Anusha Das
 
PPTX
Types of corpus linguistics Parallel ,aligned...
RajpootBhatti5
 
PDF
Lecture: Word Senses
Marina Santini
 
PDF
Discourse analysis-by-gillian-brown-george-yule
Hina Honey
 
PDF
Morphological typology
galymzhanova
 
PPTX
NLP_KASHK:Smoothing N-gram Models
Hemantha Kulathilake
 
PPTX
Lesson 1. linguistics and applied linguistics 2
Prisci Jara
 
PDF
Syntax & syntactic analysis,lec.1, dr. shadia.ppt [compatibility mode]
Dr. Shadia Banjar
 
Psychology of SLA.
SakarHussein
 
Semantic vs Pragmatics
A. Tenry Lawangen Aspat Colle
 
Syntax- introduction to syntax
Lampung University
 
Corpus linguistics
Irum Malik
 
Transformational generative grammar
Baishakhi Amin
 
Machine Translation
Skilrock Technologies
 
SEMANTICS
Hameel Khan
 
Designing a-syllabus-group-7 (for memory)
Dieu Hien
 
Phonotactics
Gabby Villamagua
 
APPRAISAL THEORY
Matthew Bediako
 
Phrase structure grammar
SubramanianMuthusamy3
 
Natural language processing
Basha Chand
 
Phrase Structure Grammar
Anusha Das
 
Types of corpus linguistics Parallel ,aligned...
RajpootBhatti5
 
Lecture: Word Senses
Marina Santini
 
Discourse analysis-by-gillian-brown-george-yule
Hina Honey
 
Morphological typology
galymzhanova
 
NLP_KASHK:Smoothing N-gram Models
Hemantha Kulathilake
 
Lesson 1. linguistics and applied linguistics 2
Prisci Jara
 
Syntax & syntactic analysis,lec.1, dr. shadia.ppt [compatibility mode]
Dr. Shadia Banjar
 

Viewers also liked (20)

PPSX
Semantics
Kocaeli University
 
PPT
Semantics
Dr. Cupid Lucid
 
PDF
Semantics: Meanings of Language
JESSIE GRACE RUBRICO
 
PPT
Semantics: Seven types of meaning
Miftadia Laula
 
PDF
Lecture: Vector Semantics (aka Distributional Semantics)
Marina Santini
 
PDF
Lecture 2: Computational Semantics
Marina Santini
 
PDF
Semantic Role Labeling
Marina Santini
 
PPT
Semantic Modelling of User Interests Based on Cross-Folksonomy Analysis @ IS...
Martin Szomszor
 
PPTX
Answer if you can..?
Sapna Mahajan
 
PDF
HTML5 Semantics, Accessibility & Forms [Carsonified HTML5 Online Conference]
Aaron Gustafson
 
PDF
Lecture: Semantic Word Clouds
Marina Santini
 
PDF
Lecture 3b: Decision Trees (1 part)
Marina Santini
 
PPT
Semanticfieldtosemanticchange
Asst Prof Wichian Sunitham
 
PPTX
Semantic and other disciplines
Gustina Savhira
 
PPTX
SEMANTICS
MALIA SABRINA
 
KEY
'Meaning is its use' - Towards the use of distributional semantics for conten...
Cataldo Musto
 
PPTX
Meaning
Ika Hentihu
 
PPTX
Translation session
Bassiouny99
 
PPTX
SSAS 2012 : Multidimensionnel et tabulaire au banc d'essai
Microsoft Technet France
 
PPTX
Analytics Education in the era of Big Data
Gregory Piatetsky-Shapiro
 
Semantics
Dr. Cupid Lucid
 
Semantics: Meanings of Language
JESSIE GRACE RUBRICO
 
Semantics: Seven types of meaning
Miftadia Laula
 
Lecture: Vector Semantics (aka Distributional Semantics)
Marina Santini
 
Lecture 2: Computational Semantics
Marina Santini
 
Semantic Role Labeling
Marina Santini
 
Semantic Modelling of User Interests Based on Cross-Folksonomy Analysis @ IS...
Martin Szomszor
 
Answer if you can..?
Sapna Mahajan
 
HTML5 Semantics, Accessibility & Forms [Carsonified HTML5 Online Conference]
Aaron Gustafson
 
Lecture: Semantic Word Clouds
Marina Santini
 
Lecture 3b: Decision Trees (1 part)
Marina Santini
 
Semanticfieldtosemanticchange
Asst Prof Wichian Sunitham
 
Semantic and other disciplines
Gustina Savhira
 
SEMANTICS
MALIA SABRINA
 
'Meaning is its use' - Towards the use of distributional semantics for conten...
Cataldo Musto
 
Meaning
Ika Hentihu
 
Translation session
Bassiouny99
 
SSAS 2012 : Multidimensionnel et tabulaire au banc d'essai
Microsoft Technet France
 
Analytics Education in the era of Big Data
Gregory Piatetsky-Shapiro
 
Ad

Similar to Semantics and Computational Semantics (20)

PPT
NLP introduced and in 47 slides Lecture 1.ppt
OlusolaTop
 
DOC
REPORT.doc
IswaryaPurushothaman1
 
PPTX
Lecture 1: Semantic Analysis in Language Technology
Marina Santini
 
PPTX
Lecture 2: From Semantics To Semantic-Oriented Applications
Marina Santini
 
PPTX
Lecture 1-3-Logics-In-computer-science.pptx
PriyalMayurManvar
 
PDF
Probabilistic content models,
Bryan Gummibearehausen
 
PDF
FinalReport
Vinh Xuan Ho
 
PPT
Novakian mapping for argument work
Lawrie Hunter
 
PPTX
Artificial Intelligence Notes Unit 4
DigiGurukul
 
PPTX
LEC 1oral pathology by lecture 23jn yh.pptx
SamanArshad11
 
PDF
22PCOAM11_IAI_Unit III Notes Full Notesmerged.pdf
Guru Nanak Technical Institutions
 
PDF
Parsing techniques
Latchezar Tzvetkoff
 
PDF
Natural Language Processing
Toine Bogers
 
PPTX
Volodymyr Getmanskyi - “First steps from NLP to NLU” AI&BigDataDay 2017
Lviv Startup Club
 
PDF
Ijetcas14 458
Iasir Journals
 
PPTX
Topic Extraction on Domain Ontology
Keerti Bhogaraju
 
PPT
Dimensions of Media Object Comprehensibility
Lawrie Hunter
 
PPTX
Coding as a (second) Language
Kenneth Ronkowitz
 
PPTX
Different Semantic Perspectives for Question Answering Systems
Andre Freitas
 
PDF
A survey on parallel corpora alignment
andrefsantos
 
NLP introduced and in 47 slides Lecture 1.ppt
OlusolaTop
 
Lecture 1: Semantic Analysis in Language Technology
Marina Santini
 
Lecture 2: From Semantics To Semantic-Oriented Applications
Marina Santini
 
Lecture 1-3-Logics-In-computer-science.pptx
PriyalMayurManvar
 
Probabilistic content models,
Bryan Gummibearehausen
 
FinalReport
Vinh Xuan Ho
 
Novakian mapping for argument work
Lawrie Hunter
 
Artificial Intelligence Notes Unit 4
DigiGurukul
 
LEC 1oral pathology by lecture 23jn yh.pptx
SamanArshad11
 
22PCOAM11_IAI_Unit III Notes Full Notesmerged.pdf
Guru Nanak Technical Institutions
 
Parsing techniques
Latchezar Tzvetkoff
 
Natural Language Processing
Toine Bogers
 
Volodymyr Getmanskyi - “First steps from NLP to NLU” AI&BigDataDay 2017
Lviv Startup Club
 
Ijetcas14 458
Iasir Journals
 
Topic Extraction on Domain Ontology
Keerti Bhogaraju
 
Dimensions of Media Object Comprehensibility
Lawrie Hunter
 
Coding as a (second) Language
Kenneth Ronkowitz
 
Different Semantic Perspectives for Question Answering Systems
Andre Freitas
 
A survey on parallel corpora alignment
andrefsantos
 
Ad

More from Marina Santini (20)

PDF
Can We Quantify Domainhood? Exploring Measures to Assess Domain-Specificity i...
Marina Santini
 
PDF
Towards a Quality Assessment of Web Corpora for Language Technology Applications
Marina Santini
 
PDF
A Web Corpus for eCare: Collection, Lay Annotation and Learning -First Results-
Marina Santini
 
PDF
An Exploratory Study on Genre Classification using Readability Features
Marina Santini
 
PDF
Lecture: Ontologies and the Semantic Web
Marina Santini
 
PDF
Lecture: Summarization
Marina Santini
 
PDF
Relation Extraction
Marina Santini
 
PDF
Lecture: Question Answering
Marina Santini
 
PDF
IE: Named Entity Recognition (NER)
Marina Santini
 
PDF
Lecture: Word Sense Disambiguation
Marina Santini
 
PDF
Sentiment Analysis
Marina Santini
 
PDF
Lecture 9: Machine Learning in Practice (2)
Marina Santini
 
PDF
Lecture 8: Machine Learning in Practice (1)
Marina Santini
 
PDF
Lecture 5: Interval Estimation
Marina Santini
 
PDF
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
Marina Santini
 
PDF
Lecture 3: Basic Concepts of Machine Learning - Induction & Evaluation
Marina Santini
 
PDF
Lecture 2: Preliminaries (Understanding and Preprocessing data)
Marina Santini
 
PDF
Lecture 1: What is Machine Learning?
Marina Santini
 
PDF
Lecture 1: Introduction to the Course (Practical Information)
Marina Santini
 
PDF
Lecture: Joint, Conditional and Marginal Probabilities
Marina Santini
 
Can We Quantify Domainhood? Exploring Measures to Assess Domain-Specificity i...
Marina Santini
 
Towards a Quality Assessment of Web Corpora for Language Technology Applications
Marina Santini
 
A Web Corpus for eCare: Collection, Lay Annotation and Learning -First Results-
Marina Santini
 
An Exploratory Study on Genre Classification using Readability Features
Marina Santini
 
Lecture: Ontologies and the Semantic Web
Marina Santini
 
Lecture: Summarization
Marina Santini
 
Relation Extraction
Marina Santini
 
Lecture: Question Answering
Marina Santini
 
IE: Named Entity Recognition (NER)
Marina Santini
 
Lecture: Word Sense Disambiguation
Marina Santini
 
Sentiment Analysis
Marina Santini
 
Lecture 9: Machine Learning in Practice (2)
Marina Santini
 
Lecture 8: Machine Learning in Practice (1)
Marina Santini
 
Lecture 5: Interval Estimation
Marina Santini
 
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
Marina Santini
 
Lecture 3: Basic Concepts of Machine Learning - Induction & Evaluation
Marina Santini
 
Lecture 2: Preliminaries (Understanding and Preprocessing data)
Marina Santini
 
Lecture 1: What is Machine Learning?
Marina Santini
 
Lecture 1: Introduction to the Course (Practical Information)
Marina Santini
 
Lecture: Joint, Conditional and Marginal Probabilities
Marina Santini
 

Recently uploaded (20)

PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
Horarios de distribución de agua en julio
pegazohn1978
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 

Semantics and Computational Semantics

  • 1. Seman&c  Analysis  in  Language  Technology   http://stp.lingfil.uu.se/~santinim/sais/2016/sais_2016.htm 
 
 Semantics and 
 Computational Semantics
 Marina  San(ni   [email protected]fil.uu.se     Department  of  Linguis(cs  and  Philology   Uppsala  University,  Uppsala,  Sweden     Spring  2016    Lecture  2:  Computational  Semantics 1
  • 2. Acknowledgements   The  content  of  these  slides  is  mostly  based  on  the  following  chapter:       •  Stone  M.  (In  Press)  Seman$cs  and  computa$onal  seman$cs  To  appear  in   Paul  Dekker  and  Maria  Aloni,  eds.,  Cambridge  Handbook  of  Formal   Seman(cs.  hJps://www.cs.rutgers.edu/~mdstone/pubs/compsem13.pdf     •  Blackburn  P.    and  Bos  J.  (2003)  Computa$onal  Seman$cs     hJp://www.let.rug.nl/bos/pubs/BlackburnBos2003Theoria.pdf       Some  slides  are  borrowed  from  /  inspired  by:     •  Manning  C.:  Computa(onal  Seman(cs,  CS224N  Stanford  University   hJp://web.stanford.edu/class/cs224n/handouts/Computa(onal %20Seman(cs.pdf     •  Dragomir  Radev:  Introduc(on  to  NLP,  Coursera   Lecture  2:  Computational  Semantics 2
  • 3. Outline   •  Representa(on  and  Seman(cs   •  Computa(on  and  Composi(onal  Seman(cs   – Logic   – Unifica(on   •  Conclusions   Lecture  2:  Computational  Semantics 3
  • 4. What  is  Seman(cs?   Lecture  2:  Computational  Semantics 4
  • 5. Generally  speaking…   seman(cs  is  the  study  of  meaning   that  is  used  for  understanding   human  expressions  through   language   •  Seman&cs  is  the  study  of  meaning:      accounts  for  links  between  words  and  the  world.     •  Seman(cs  is  the  study  of  how  meaning  is  conveyed  through  signs   and  language.     –  Denota(ons  are  the  literal  or  primary  meanings  of  words.   –  Connota(ons  are  ideas  or  feelings  that  a  word  invokes  for  a  person  in   addi(on  to  its  literal  or  primary  meaning.     •  Seman(cs  focuses  on  the  rela(on  between  signifiers  (like  words,   phrases,  signs,  and  symbols)  and  what  they  stand  for,  ie  their   denota(ons  (concepts)  and  connota(ons  (seman(c  analysis).       Lecture  2:  Computational  Semantics 5
  • 6. Comput(er)-­‐a(onal  Seman(cs   •  Seman$cs  is  the  study  of  meaning  in  language.   •  Computer  science  is  the  study  of  precise   descrip(ons  of  finite  processes;     •  Thus,  computa(onal  seman(cs  embraces  any   project  that  approaches  the  phenomenon  of   meaning  by  way  of  tasks  that  can  be  performed  by   following  definite  sets  of  mechanical  instruc(ons.   Lecture  2:  Computational  Semantics 6
  • 7. We  can  start  by  saying  that…   ”The  aim  of  computa(onal  seman(cs  is  to  find   techniques  for  automa(cally  construc&ng   seman&c  representa&ons  for  expressions  of   human  language,  representa(ons  that  be  used   to  perform  inference.  ”                Blackburn  and  Bos  (2003).     Inference  =  reasoning     Lecture  2:  Computational  Semantics 7
  • 8. Why  do  we  need  ”meaning”  in   Language  Technology?   •  The  short  answer  is:  because  ”intelligent”   applica(ons  must  ”understand”  in  order  to   act.   Lecture  2:  Computational  Semantics 8
  • 9. Ex  1:  Google  -­‐  What  is  the  capital  of   Sweden?   •  Answer:   Lecture  2:  Computational  Semantics 9
  • 10. Ex  2:  Siri  -­‐  Which  countries  does  the   Danube  river  flows  through?   Lecture  2:  Computational  Semantics 10
  • 11. Ex  3:  Facebook  Graph  Search   Facebook  Graph  Search  was  a  seman$c  search   engine  that  was  introduced  by  Facebook  in  March   2013.    It  was  designed  to  give  answers  to  user  natural   language  queries  rather  than  a  list  of  links.”     Examples:     "Friends  who  Like  Star  Wars  and  Harry  Po@er”   "photos  of  my  friends  taken  at  Na&onal  Parks"     hJps://en.wikipedia.org/wiki/Facebook_Graph_Search     Lecture  2:  Computational  Semantics 11
  • 12. Understanding  Meaning   If  an  agent  (eg.  a  robot)  hears  a  sentence  and   act  accordingly,  the  agent  is  said  to  understand   the  sentence:     Example:  Leave  the  book  on  the  table     Understanding  may  involve  inference:  Which   book?  Which  table?   So,  understanding  may  involve  some  kind  of   reasoning…   Lecture  2:  Computational  Semantics 12
  • 13. NLP/LT  and  Seman(cs   •  Not  all  LT-­‐based  applica(ons  require  seman(cs.   –    Ex:  taggers,  parsers,  etc.   •  Much  can  be  done  with  shallow  seman(cs.     –  Ex:  word  sense  disambigua(on,  etc.   •  For  more  complex  tasks  (more  ”intelligent”   tasks”)  seman(c  reasoning  is  needed.     –  Ex:  QAnswering,  Info  Extrac(on,  Ontology  Crea(on,   etc.     Lecture  2:  Computational  Semantics 13
  • 14. Tradi(onally…     …reasoning  is  done  by  using  some  kind  of  logic…     A  tradi(onal  approach  is  to  use  FOL  (first  order   logic)  to  ”formalize”  meaning  (see  Formal   Seman(cs  Theories).     …  before  start  studying  how  seman(cs  is  used  in   Language  Technology-­‐based  applica(ons,  let’s   summarise  how  seman(cs  has  been  brought  into   computer  science  and  ar(ficial  intelligence.   Lecture  2:  Computational  Semantics 14
  • 15. REPRESENTATION  AND  SEMANTICS   Lecture  2:  Computational  Semantics 15
  • 16. Proper(es  of  Meaning  in  Logic   •  Verifiability   –  Can  a  statement  be  verified  against  a  knowledge  base  (KB)   –  Example:  does  my  cat  Mar(n  have  whiskers?   •  Unambiguousness   –  Give  me  the  book   –  Which  book?   •  Canonical  form  (standard/abstract  form  of  an  expression)   •  Expressiveness   –  Can  the  formalism  express  temporal  rela(ons,  beliefs,  …?   –  Is  it  domain-­‐independent?   •  Inference   Lecture  2:  Computational  Semantics 16
  • 17. Represen(ng  Meaning   •  A  tradi(onal  approach  to  meaning  is  to   –   use  proposi(onal  logic   – predicate/first  order  logic  (FOL)   – use  theorem  proving  (inference)  to  determine   whether  a  statement  entails  another   Lecture  2:  Computational  Semantics 17
  • 18. Proposi(onal  Logic  :  proposi(ons  are   represented  by  leJers     •  In  proposi(onal  logic,  we  use  leJers  to   symbolize  en(re  proposi(ons.     •  Proposi(ons  are  statements  of  the  form  "x  is   y"  where  x  is  a  subject  and  y  is  a  predicate.     •  For  example,  "Socrates  is  a  Man"  is  a   proposi(on  and  might  be  represented  in   proposi(onal  logic  as  "S".   Lecture  2:  Computational  Semantics 18
  • 19. True  and  False   •  Proposi(onal  Logic  studies  proposi(ons,  whether  they  are  true  or  false.   •  A  sentence  might  contain  several  proposi(ons  that  are  linked  together  by   logical  connec(ves.     •  Logical  connec(ves  are  found  in  natural  languages.  In  English  for  example,   some  examples  are  "and"  (conjunc(on),  "or"  (disjunc(on),   "not”  (nega(on)  and  "if"  (but  only  when  used  to  denote  material   condi(onal).   •  Ex  (wikipedia):  simple  inference  within  the  scope  of  proposi(onal  logic:   •  Premise  1:  If  it's  raining  then  it's  cloudy.   •  Premise  2:  It's  raining.   •  Conclusion:  It's  cloudy.   Both  premises  and  the  conclusion  are  proposi(ons.  The  premises  are  taken   for  granted  and  then  with  the  applica(on  of  modus  ponens  (an  inference   rule)  the  conclusion  follows.   Lecture  2:  Computational  Semantics 19
  • 20. Syntax  of  Proposi(onal  Logic   •  The  simplest  type  of  logic       –  If  S  is  a  sentence,  ¬S  is  a  sentence  (nega(on)   –  If  S1  and  S2  are  sentences,  S1  ∧  S2  is  a  sentence   (conjunc(on)   –  If  S1  and  S2  are  sentences,  S1  ∨  S2  is  a  sentence   (disjunc(on)   –  If  S1  and  S2  are  sentences,  S1  ⇒  S2  is  a  sentence   (implica(on)   –  If  S1  and  S2  are  sentences,  S1  ⇔  S2  is  a   sentence(bicondi(onal)   Lecture  2:  Computational  Semantics 20
  • 21. Proposi(onal  Logic  and  Natural  Language   Operator  Precedence   ¬  (highest)  =  nega(on   ∧  =  conjunc(on   ∨  =  disjunc(on   ⇒  =  implica(on   ⇔  (lowest)  =  bicondi(onal*     *A  bicondi(onal  statement  is   defined  to  be  true  whenever   both  parts  have  the  same  truth   value.   Logic  and  Language   A  =  Today  is  a  holiday.   B  =  We  are  going  to  the  park.   A  ⇒  B   A  ∧  ¬  B   ¬  A  ⇒  B   ¬  B  ⇒  A   B  ⇒  A   Lecture  2:  Computational  Semantics 21
  • 22. Truth  table   Lecture  2:  Computational  Semantics 22
  • 23. Proposi(onal  Logic  and  Seman(cs   Transla$ng  propos$ons  to  Eng   Seman$cs  of  Proposi$onal  Logic   Lecture  2:  Computational  Semantics 23
  • 24. Proposi(onal  logic  vs  FOL/Predicate  Logic   •  Proposi(onal  logic  (also  called  senten(al  logic)  is  logic  that  includes   sentence  leJers  (A,B,C  …  )  and  logical  connec(ves,  but  not   quan(fiers.  The  seman(cs  of  proposi(onal  logic  uses  truth   assignments  to  the  leJers  to  determine  whether  a  compound   proposi(onal  sentence  is  true.   •  Predicate  logic  is  usually  used  as  a  synonym  for  first-­‐order  logic.   Syntac(cally,  first-­‐order  logic  has  the  same  connec(ves  as   proposi(onal  logic,  but  it  also  has  variables  for  individual  objects,   quan(fiers,  symbols  for  func(ons,  and  symbols  for  rela(ons.     •  Its  seman(cs  includes  a  domain  of  discourse  for  the  variables  and   quan(fiers  to  range  over,  along  with  interpreta(ons  of  the  rela(on   and  func(on  symbols.   Lecture  2:  Computational  Semantics 24
  • 25. Predicate  Logic:  more  expressive  than   Proposi(onal  Logic   •  In  predicate  logic,  we  symbolize  subject  and  predicate   separately.     •  The  important  difference  is  that  you  can  use  predicate   logic  to  say  something  about  a  set  of  objects.     •  By  introducing  the  universal  quan(fier  ("∀"),  the   existen(al  quan(fier  ("∃")  and  variables  ("x",  "y"  or   "z"),  we  can  use  predicate  logic  to  represent  thing  like:     –  "Everything  is  green"  as  "∀Gx”  ”   –  Something  is  blue"  as  "∃Bx”   Lecture  2:  Computational  Semantics 25
  • 26. Used  to  represent   •  Objects  –  Mar(n  the  cat   •  Rela(ons  –  Mar(n  and  Moses  are  brothers   •  Func(ons  –  Mar(n’s  age   Lecture  2:  Computational  Semantics 26
  • 27. FOL  elements  (short  version)     •  Constant   •  Variables   •  Predicates   •  Boolean  connec(ves   •  Quan(fiers   •  Brackets  and  comma  to  group  the  symbols   together   •  Ex:  A  woman  crosses  Sunset  Boulevard   Lecture  2:  Computational  Semantics 27
  • 28. FOL  elements  (long  version)   Formula  →  AtomicFormula  or  Formula   Connec(ve  Formula  or  Quan(fier  Variable   Formula  or  ¬  Formula     (Formula):     Lecture  2:  Computational  Semantics 28
  • 29. FOL’s  most  important  feature:   quan(fiers  à  generaliza(on   Lecture  2:  Computational  Semantics 29 To  ace  a  test  =   to  get  a  very   high  score  on  a   test
  • 30. Proper(es  of  Predicate  Logic   •  Pros   – Composi(onal   – Declara(ve   •  Cons   – Limited  expressive  power   – Represents  facts   Lecture  2:  Computational  Semantics 30
  • 31. Lambda  calculus  à  Variable  subs(tu(on     Useful  for  expressing  computa(on  by  way  of  variable  binding  and  subs(tu(on.   Variables  are  just  names  that  are  bound  as  arguments.       Lambda  calculus  is  important  in  programming  language  theory.         Example   –  inc(x)  =  λx  x+1   –  then  inc(4)  =  (λx  x+1)(4)  =  5     Example   –  add(x,y)  =  λx,λy(x+y)   –  then  add(3,4)  =  (λx,λy(x+y))(3)(4)=  (λy  3+y)(4)  =3+4  =  12   Lecture  2:  Computational  Semantics 31
  • 32. Stages  of  Seman(c  Parsing   •  Input   – Sentence   •   Syntac(c  Analysis   –   Syntac(c  structure   •  Seman(c  Analysis   – Seman(c  representa(on   Lecture  2:  Computational  Semantics 32
  • 33. Composi(onal  Seman(cs   •  Add  seman(c  aJachments  to  syntac(c  rules   •   Composi(onal  seman(cs   – Parse  the  sentence  syntac(cally   – Associate  some  seman(cs  to  each  word   – Combine  the  seman(cs  of  words  and  non   terminals  recursively   – Un(l  the  root  of  the  sentence   Lecture  2:  Computational  Semantics 33
  • 34. Example   •  Input   – Javier  likes  pizza   •  Output   – like(Javier,   pizza)   Lecture  2:  Computational  Semantics 34 Associate  a   semantic   expression   with  each   node
  • 35. Seman(c  Parsing   •  Conver(ng  natural  language  to  a  logical  form   – e.g.,  executable  code  for  a  specific  applica(on   –   Example:   •  Airline  reserva(ons   •  Geographical  query  systems   Lecture  2:  Computational  Semantics 35
  • 36. What  about  ”kick  the  bucket”?   •  What  happens  when  the  meaning  of  single   words  does  not  lead  to  the  meaning  of  the   whole?     Lecture  2:  Computational  Semantics 36
  • 37. COMPUTATION  AND   COMPOSITIONAL  SEMANTICS   Lecture  2:  Computational  Semantics 37
  • 38. Unifica(on  Grammar   •  Unifica(on  grammar  is  a  formalism  that  derives   seman(c  representa(ons  by  accumula(ng   constraints  in  tandem  with  a  syntac(c  deriva(on.     •  The  constraints  take  the  form  of  equa(ons   between  terms  which  may  contain  variables.     •  The  formalism  gets  its  name  from  the  process,   unifica$on,  which  determines  values  for   variables  to  solve  the  equa(ons.   Lecture  2:  Computational  Semantics 38
  • 39. Example:  ”everybody  walks”   The  meaning  representa(on  of  ∀x.walks(x)  is   assembled  as  the  solu(on  to  a  set  of  constraints   and  not  through  the  func(on–argument   maninupula(on  of  the  lambda  calculus.   Lecture  2:  Computational  Semantics 39
  • 40. More  flexibility   •  Lambda-­‐calculus  techniques  expect  each  element  in  a  meaning   representa(on  to  be  specified  exactly  once.   •  Unifica(on:  we  model  sentence  meaning  as  the  solu(on  to  a  set  of   equa(ons  à  we  might    find  elements  of  meaning  that  are   simultaneously  determined  by  mul(ple  equa(ons,  and  elements  of   meaning  that  are  lev  unconstrained  and  must  be  resolved  by   context.     •  Constraint  techniques  offer  new  ways  to  analyze  idioms  and  mul(-­‐ word  expressions.  Each  cons(tuent  can  not  only  specify  its  own   meaning  but  can  impose  a  constraint  on  the  meaning  of  the  whole.     Lecture  2:  Computational  Semantics 40
  • 41. Limita(ons   •  Composi(onal  seman(cs  (any  formalisms)   gives  us  representa(ons  that  capture  aspects   of  the  logical  structure  of  meaning.     •  But:  what  specific  en((es  and  concepts  does  a   sentence  describe,  and  what  specific  claim   does  it  make  about  them?   Lecture  2:  Computational  Semantics 41
  • 42. CONCLUSIONS   Lecture  2:  Computational  Semantics 42
  • 43. Basically…   •  We  need  to  (e  together:   – Grammar  (grammar  and  composi(onal  meaning  is   not  enough)   – Speaker’s  kowledge  about  the  wolrd   – PaBerns  of  use  à  unique  insights  given  by  large   corpora  of  linguis$c  evidence   Lecture  2:  Computational  Semantics 43
  • 44. In  this  course…   •  We  review  research  about  different  aspects  of   word  meaning  that  are  needed  for  LT-­‐based   applica(ons.   Lecture  2:  Computational  Semantics 44
  • 45. How  is  *meaning*  handled  in   Seman(c-­‐Based  LT-­‐Applica(ons   •  Seman(c  Role  Labelling/Predicate-­‐Argument   Structure  (???)   •  Sen(ment  Analysis  (???)   •  Word  sense  disambigua(on  (???)   •  Informa(on  extrac(on  (???)   •  Ques(on  Answering  (???)   •  Ontologies  (???)   Lecture  2:  Computational  Semantics 45
  • 46. Reminder:  Glossary  Entries   •  Which  concepts  are  the  most  salient  in  this   lecture?   •  Start  crea(ng  your  Glossary  now…   Lecture  2:  Computational  Semantics 46
  • 47. The  End       Lecture  2:  Computational  Semantics 47