Showing posts with label OpenCCG. Show all posts
Showing posts with label OpenCCG. Show all posts

Realisation problems with semantically null modifiers

It is possible to send the OpenCCG realiser into an infinite loop, if you use semantically empty modifier categories. One of our NLG students tried to handle the commas in non-restrictive relative clauses as NP postmodifiers:

  Giovanni's      ,           which       rocks          , 
  ----------  --------  ----------------  ----------  -------
     NPx      NPx\NPx   NPx\NPx/(Se\NPx)  Se\NPx      NPx\NPx
   @x Gio's                               @e rock
  -------------------<                    @e  x
    NPx : @x Gio's      --------------------------->
                        NPx\NPx : @e rock,@e  x
  -------------------------------------------------<
          NPx : @e rock, @e  x, @x Gio's

Unfortunately, these semantically null post-modifiers bamboozle the realiser:

[Is this the same for premodifiers?]

Semantic failure

In OpenCCG, it's possible for semantics to make a syntactically well-formed derivation fail. The most common way in which this happens is where two distinct proposition symbols are assigned to the same node (in other words, where the parser tries to unify two nominals with distinct labels).

For example, one student on our NLG course wanted to assign a semantics to predicative noun phrases that would have a sentence like "Giovanni's is a restaurant" associated with the following semantics:

  @x Giovanni's, @x restaurant

The underlying CCG-HLDS derivation is fine:

   Giovanni's        is       a      restaurant
  -------------  ---------  ------  -------------
       NPx       S\NPx/NPx  NPx/Nx       Nx
  @x Giovanni's                     @x restaurant
                            -------------------->
                             NPx : @x restaurant
                 ------------------------------->
                       S\NPx : @x restaurant
  ----------------------------------------------<
      S : @x restaurant, @x Giovanni's

However, OpenCCG fails on the final step: