Chapter 3

Phrase layers


3.1    Introduction

This chapter considers phrase layers. These are intermediate levels of organisation between a word and the clause. Each phrase is made up of a HEAD word and any DEPENDENTs. The head word is the word that the phrase is required to have in order to exist and may be the only element of the phrase. A phrase is named after the word class of the head word. There are four phrase types:


3.2    Noun phrases

The noun_phrase rule of (3.1) creates noun phrases by calling noun_phrase_top for list content NL of daughter elements for a node structure with its Label consisting of 'NP' and any extension from the Ext parameter. A contentful Ext gives role/function/indexing information. The assembled structure adds to the content collected from outside the noun phrase with list L.

(3.1)
noun_phrase(Ext,Type,[node(Label,NL)|L],L) -->
  {
    atom_concat('NP',Ext,Label)
  },
  noun_phrase_top(Type,NL,[]).

    Additional to the Ext parameter, there is a Type parameter whose value goes through to the noun_phrase_top call. This type information will determine noun phrase use as reflected by distribution. There are four possible values:

Ultimately, this type information has to match the type information of internal elements:

3.2.1    The noun phrase top rule

A call of the noun_phrase_top rule (3.2) gathers content for a noun phrase with either:

(3.2)
noun_phrase_top(Type,L,L0) -->
  noun_head_full(Type,L,L0).
noun_phrase_top(Type,L,L0) -->
  noun_phrase_initial_layer(Type,L,L0).

    Query (3.3) asks if w('PRO','him') provides content to project structure for a noun phrase.

(3.3)
| ?- tphrase_set_string([w('PRO','him')]), parse(noun_phrase('',non_privileged)).

(NP (PRO him))

yes

The affirmative response and tree output of (3.3) follows from the call structure of (3.4).

(3.4)
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_head_full non_privileged

[w('PRO','him')]

    Note how the noun phrase type information from the call of (3.4) (non_privileged) passes down the call structure to determine what can be an appropriate word for the noun phrase. In contrast to (3.3), query (3.5) fails: The noun phrase call provides non_privileged type information, but the word list contains a word with RPRO word class (a relative pronoun) requiring relative type information.

(3.5)
| ?- tphrase_set_string([w('RPRO','who')]), parse(noun_phrase('',non_privileged)).

no

3.2.2    Initial noun phrase layers

With (3.3), we have seen the simplest form for a noun phrase, which involves a single word that contributes content for noun_head_full. This section delves slightly deeper into possible noun phrase structure by considering what a noun_phrase_initial_layer call of (3.6) may return.

    Among other things, a noun_phrase_initial_layer call opens the possibility of having coordinate structures at the top level of the noun phrase. With (3.6), there are two ways to achieve this highest level of noun phrase coordination:

(3.6)
noun_phrase_initial_layer(Type,L,L0) -->
  determiner_layer(Type,L,L1),
  internal_np_higher_layer(L1,L0).
noun_phrase_initial_layer(Type,L,L0) -->
  {
    member(Type,[interrogative,non_privileged])
  },
  adjective_phrase('',interrogative,L,L1),
  internal_np_higher_layer(L1,L0).
noun_phrase_initial_layer(Type,L,L0) -->
  {
    member(Type,[non_privileged,non_interrogative])
  },
  noun_head(L,L0).
noun_phrase_initial_layer(Type,L,L0) -->
  {
    member(Type,[non_privileged,non_interrogative])
  },
  internal_np_higher_layer(L,L0).
noun_phrase_initial_layer(Type,[node('NLYR',[CONJ1,NP1,node('CONJP',[CONJ2,NP2])])|L],L) -->
  conj(CONJ1),
  noun_phrase('',Type,[NP1],[]),
  conj(CONJ2),
  noun_phrase('',Type,[NP2],[]).
noun_phrase_initial_layer(Type,[node('NLYR',[NP|CL])|L],L) -->
  noun_phrase('',Type,[NP],[]),
  noun_phrase_initial_tail(Type,CL,[]).
noun_phrase_initial_layer(Type,L,L0) -->
  noun_phrase_initial_layer(Type,L,L1),
  preposition_phrase('',non_privileged,L1,L0).
noun_phrase_initial_layer(Type,L,L0) -->
  {
    Type == relative
  },
  noun_phrase_initial_layer(non_privileged,L,L1),
  preposition_phrase('',relative,L1,L0).
noun_phrase_initial_layer(Type,L,L0) -->
  noun_phrase_initial_layer(Type,L,L1),
  relative_clause(L1,L0).
(3.7)
noun_phrase_initial_tail(Type,[node('CONJP',[CONJ,NP])|L],L) -->
  conj(CONJ),
  noun_phrase('',Type,[NP],[]).
noun_phrase_initial_tail(Type,[PU,node('CONJP',[NP])|L],L0) -->
  punc(non_final,[PU],[]),
  noun_phrase('',Type,[NP],[]),
  noun_phrase_initial_tail(Type,L,L0).

    The parse of (3.8) illustrates a noun phrase with a top level coordination. The resulting noun phrase structure has an NLYR (noun phrase internal layer) as its only daughter element. The NLYR itself is comprised of three conjuncts, each with full noun phrase structure.

(3.8)
| ?- tphrase_set_string([w('PRO','you'), w('PUNC',','), w('PRO','he'), w('CONJ','and'), w('PRO','I')]), parse(noun_phrase('-SBJ',non_interrogative)).

(NP-SBJ (NLYR (NP (PRO you))
              (PUNC ,)
              (CONJP (NP (PRO he)))
              (CONJP (CONJ and)
                     (NP (PRO I)))))

yes

    Calls to reach the output of (3.8) follow (3.9). After the initial noun_phrase call, there are three further calls to noun_phrase, each for one of the three conjuncts. Also, note how the coordination arises from the creation of a sequence of calls to noun_phrase_initial_tail of (3.7). This gives a call structure that branches to the right, while leading to the return of conjuncts that are all placed under the same NLYR of the output tree structure of (3.8).

(3.9)
noun_phrase -SBJ non_interrogative
noun_phrase_top non_interrogative
noun_phrase_initial_layer non_interrogative
noun_phrase non_interrogative
noun_phrase_top non_interrogative
noun_head_full non_interrogative

[w('PRO','you')]
noun_phrase_initial_tail non_interrogative
punc non_final

[w('PUNC',',')]
noun_phrase non_interrogative
noun_phrase_top non_interrogative
noun_head_full non_interrogative

[w('PRO','he')]
noun_phrase_initial_tail non_interrogative
conj

[w('CONJ','and')]
noun_phrase non_interrogative
noun_phrase_top non_interrogative
noun_head_full non_interrogative

[w('PRO','I')]

    The recursion seen with the call structure of (3.9) when parsing conjunction is not the only opportunity for recursion created by calling noun_phrase_initial_layer of (3.6). Calls can also be recursive so that the parse is able to pick up on the left edge of the noun phrase modifiers that are either preposition phrases (discussed in section 3.5) or relative clauses (discussed in section 6.9).

Question

[This question repeats an exercise from Borsley (1996, p. 23).] There are three parse results for the parse list of (3.10), one for (3.12) and none for (3.11) and (3.13). Do these results and failures match your expectations? Why do they arise?

(3.10)
| ?- tphrase_set_string([w('CONJ','both'), w('PRO','you'), w('CONJ','and'), w('PRO','he'), w('CONJ','and'), w('PRO','I')]), parse(noun_phrase('-SBJ',non_interrogative)).

(NP-SBJ (NLYR (NP (NLYR (CONJ both)
                        (NP (PRO you))
                        (CONJP (CONJ and)
                               (NP (PRO he)))))
              (CONJP (CONJ and)
                     (NP (PRO I)))))

(NP-SBJ (NLYR (CONJ both)
              (NP (PRO you))
              (CONJP (CONJ and)
                     (NP (NLYR (NP (PRO he))
                               (CONJP (CONJ and)
                                      (NP (PRO I))))))))

(NP-SBJ (NLYR (CONJ both)
              (NP (NLYR (NP (PRO you))
                        (CONJP (CONJ and)
                               (NP (PRO he)))))
              (CONJP (CONJ and)
                     (NP (PRO I)))))

yes
(3.11)
| ?- tphrase_set_string([w('CONJ','both'), w('PRO','you'), w('PUNC',','), w('PRO','he'), w('CONJ','and'), w('PRO','I')]), parse(noun_phrase('-SBJ',non_interrogative)).

no
(3.12)
| ?- tphrase_set_string([w('PRO','you'), w('CONJ','and'), w('CONJ','both'), w('PRO','he'), w('CONJ','and'), w('PRO','I')]), parse(noun_phrase('-SBJ',non_interrogative)).

(NP-SBJ (NLYR (NP (PRO you))
              (CONJP (CONJ and)
                     (NP (NLYR (CONJ both)
                               (NP (PRO he))
                               (CONJP (CONJ and)
                                      (NP (PRO I))))))))

yes
(3.13)
| ?- tphrase_set_string([w('PRO','you'), w('PUNC',','), w('CONJ','both'), w('PRO','he'), w('CONJ','and'), w('PRO','I')]), parse(noun_phrase('-SBJ',non_interrogative)).

no

3.2.3    Internal noun phrase layers

In addition to allowing at the highest levels of noun phrase structure for recursive calls that establish coordination or add post-head modifiers, a call to noun_phrase_initial_layer of (3.6) can also be preparation for delving deeper into noun phase structure, in particular, by allowing for subsequent calls to the internal_np_higher_layer rules of (3.14) that lead through to calls of the internal_np_lower_layer rules of (3.16).

    Recursion with internal_np_higher_layer rules of (3.14) allows for:

(3.14)
internal_np_higher_layer(L,L0) -->
  adjective_phrase('',non_interrogative,L,L1),
  internal_np_higher_layer(L1,L0).
internal_np_higher_layer([node('IP-PPL',[node('VAG;~I',[node(Word,[])])])|L],L0) -->
  [w('VAG',';~I',Word)],
  internal_np_higher_layer(L,L0).
internal_np_higher_layer([node('IP-PPL',[node('NP-LGS',[node('*',[])]),node('VVN;~Tn',[node(Word,[])])])|L],L0) -->
  [w('VVN',';~Tn',Word)],
  internal_np_higher_layer(L,L0).
internal_np_higher_layer(L,L0) -->
  internal_np_lower_layer(L,L0).
internal_np_higher_layer(L,L0) -->
  internal_np_higher_layer(L,L1),
  preposition_phrase('',non_privileged,L1,L0).
internal_np_higher_layer(L,L0) -->
  internal_np_higher_layer(L,L1),
  relative_clause(L1,L0).
internal_np_higher_layer([node('NLYR',[node('NP',NL)|CL])|L],L) -->
  internal_np_higher_layer(NL,[]),
  internal_np_higher_tail(CL,[]).

    For coordinations of internal_np_higher_layer structure, conjuncts subsequent to the first are accumulated with internal_np_higher_tail of (3.15).

(3.15)
internal_np_higher_tail([node('CONJP',[CONJ,node('NP',NL)])|L],L) -->
  conj(CONJ),
  internal_np_higher_layer(NL,[]).
internal_np_higher_tail([PU,node('CONJP',[node('NP',NL)])|L],L0) -->
  punc(non_final,[PU],[]),
  internal_np_higher_layer(NL,[]),
  internal_np_higher_tail(L,L0).

    Recursion is also possible with the internal_np_lower_layer rules of (3.16) to integrate:

    The non-recursive calls of internal_np_lower_tail all involve finding a noun that will be the head noun, either:

A complement can be either:

(3.16)
internal_np_lower_layer(L,L0) -->
  noun(L,L0).
internal_np_lower_layer(L,L0) -->
  noun(L,L1),
  internal_np_lower_layer(L1,L0).
internal_np_lower_layer([node('NLYR',[NL1,NL2|NL3])|L],L0) -->
  internal_np_higher_layer([NL1,NL2|NL3],[]),
  internal_np_lower_layer(L,L0).
internal_np_lower_layer([node('NLYR',[node('NLYR',[node('NP',NL)|CL])])|L],L0) -->
  internal_np_higher_layer(NL,[]),
  internal_np_higher_tail(CL,[]),
  internal_np_lower_layer(L,L0).
internal_np_lower_layer(L,L0) -->
  noun(L,L1),
  ip_to_inf('',[],L1,L0).
internal_np_lower_layer(L,L0) -->
  noun(L,L1),
  cp_that('',with_c,[],L1,L0).
internal_np_lower_layer(L,L0) -->
  noun(L,L1),
  cp_embedded_que('',[],L1,L0).
internal_np_lower_layer([node('NLYR',[node('NP',NL)|CL])|L],L) -->
  internal_np_lower_layer(NL,[]),
  internal_np_lower_tail(CL,[]).

    For coordinations of internal_np_lower_layer structure, conjuncts subsequent to the first are accumulated with internal_np_lower_tail of (3.17).

(3.17)
internal_np_lower_tail([node('CONJP',[CONJ,node('NP',NL)])|L],L) -->
  conj(CONJ),
  internal_np_lower_layer(NL,[]).
internal_np_lower_tail([PU,node('CONJP',[node('NP',NL)])|L],L0) -->
  punc(non_final,[PU],[]),
  internal_np_lower_layer(NL,[]),
  internal_np_lower_tail(L,L0).

    In (3.18) we can see a demonstration of how a word list containing only a single common noun word gives content for the creation of a resulting noun phrase.

(3.18)
| ?- tphrase_set_string([w('NS','boys')]), parse(noun_phrase('',non_privileged)).

(NP (NS boys))

yes

Calls to reach the output of (3.18) follow (3.19), amounting to the full range of internal noun phrase structure needing to have been accessed before the head noun call is reached.

(3.19)
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
internal_np_higher_layer
internal_np_lower_layer
noun

[w('NS','boys')]

3.2.4    Nouns as noun modifiers

As a demonstration of how the rules for creating lower internal noun phrase structure of (3.16) above allow for nouns to act as modifiers for subsequent nouns, consider (3.20). The results show five alternative structures, ranging from a completely flat structure with the first result to a structure with multiple NLYR (noun phrase internal layer) embeddings with the last result.

(3.20)
| ?- tphrase_set_string([w('N','phone'), w('N','card'), w('N','payment'), w('N','system')]), parse(noun_phrase('',non_privileged)).

(NP (N phone)
    (N card)
    (N payment)
    (N system))

(NP (N phone)
    (NLYR (N card)
          (N payment))
    (N system))

(NP (NLYR (N phone)
          (N card))
    (N payment)
    (N system))

(NP (NLYR (N phone)
          (N card)
          (N payment))
    (N system))

(NP (NLYR (NLYR (N phone)
                (N card))
          (N payment))
    (N system))

yes

Calls to reach the output of the last result of (3.20) follow (3.21).

(3.21)
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
internal_np_higher_layer
internal_np_lower_layer
internal_np_higher_layer
internal_np_lower_layer
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','phone')]
internal_np_lower_layer
noun

[w('N','card')]
internal_np_lower_layer
noun

[w('N','payment')]
internal_np_lower_layer
noun

[w('N','system')]

3.2.5    Determiner layer

The call structures revealed by (3.19) and (3.21) above allow for elements around the noun words of a noun phrase. Notably, a call to noun_phrase_initial_layer of (3.6) allows for placement of a determiner layer before the noun phrase head word. The determiner_layer rules of (3.22) create determiner layers which are sensitive to the type information carried by the calling noun phrase.

(3.22)
determiner_layer(Type,L,L0) -->
  det(Type,L,L0).
determiner_layer(Type,[node('NP-GENV',NL)|L],L) -->
  noun_phrase_genm_layer(Type,NL,[]).

    The word list of (3.23) contains a determiner word, followed by a common noun word that can serve as a noun phrase head, followed by a coordination word, and ending with a second common noun word that can also serve as a noun phrase head. As (3.23) shows, this leads to coordination, with each common noun word occupying its own conjunct internal to the noun phrase structure. What is most interesting is the location of the determiner word, because the results reveal two alternative placements.

(3.23)
| ?- tphrase_set_string([w('D','the'), w('N','application'), w('CONJ','and'), w('NS','results')]), parse(noun_phrase('',non_privileged)).

(NP (NLYR (NP (D the)
              (N application))
          (CONJP (CONJ and)
                 (NP (NS results)))))

(NP (D the)
    (NLYR (NP (N application))
          (CONJP (CONJ and)
                 (NP (NS results)))))

yes

    We can see why these two different placements for the determiner arise by considering the call structures involved in creating the results. The calls of (3.24) create the first result of (3.23). This has a call to noun_phrase_initial_layer that is responsible for the integration of the determiner from within the first conjunct. The first conjunct is itself introduced by an earlier call of noun_phrase_initial_layer that also calls noun_phrase_initial_tail to introduce the second conjunct.

(3.24)
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','the')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','application')]
noun_phrase_initial_tail non_privileged
conj

[w('CONJ','and')]
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
internal_np_higher_layer
internal_np_lower_layer
noun

[w('NS','results')]

    In contrast, the calls of (3.25) create the second result of (3.23). This has a call to noun_phrase_initial_layer that is responsible for the integration of the determiner from outside both conjuncts, with both conjuncts introduced by calls of internal_np_higher_layer.

(3.25)
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','the')]
internal_np_higher_layer
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','application')]
internal_np_higher_tail
conj

[w('CONJ','and')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','results')]

    Furthermore, the calls of (3.26) also create the second result of (3.23). Like (3.25), a call to noun_phrase_initial_layer is responsible for the integration of the determiner from outside both conjuncts. What is different is that both conjuncts are introduced by calls of internal_np_lower_layer.

(3.26)
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','the')]
internal_np_higher_layer
internal_np_lower_layer
internal_np_lower_layer
noun

[w('N','application')]
internal_np_lower_tail
conj

[w('CONJ','and')]
internal_np_lower_layer
noun

[w('N','results')]

    Now consider (3.27), with its word list that contains a second determiner word that occurs immediately after the conjunct word. The result shows only one resulting structure.

(3.27)
| ?- tphrase_set_string([w('D','the'), w('N','application'), w('CONJ','and'), w('D','a'), w('N','result')]), parse(noun_phrase('',non_privileged)).

(NP (NLYR (NP (D the)
             (N application))
         (CONJP (CONJ and)
                (NP (D a)
                    (N result)))))

yes

Calls to reach the single output of (3.27) follow (3.28). Notably, the conjuncts are introduced by calls of noun_phrase_initial_layer and noun_phrase_initial_tail, as was the case with (3.24). This gives structure for the second conjunct that is sufficiently high in the hierarchy of noun phrase structure to allow for determiner integration with a noun_phrase_initial_layer call.

(3.28)
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','the')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','application')]
noun_phrase_initial_tail non_privileged
conj

[w('CONJ','and')]
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','a')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','result')]

    If the query of (3.27) had instead followed the call structure of (3.25), then an internal_np_higher_layer call would need to integrate the second conjunct with no way to include the second determiner. If the query of (3.27) had instead followed the call structure of (3.26), then an internal_np_lower_layer call would need to integrate the second conjunct, again with no way to include the second determiner.

3.2.6    Genitive noun phrase layers

The second determiner_layer rule of (3.22) leads to calling the noun_phrase_genm_layer rules of (3.29) to establish structure for a distinct internal noun phrase with genitive case role. The non-recursive rules of noun_phrase_genm_layer involves either:

(3.29)
noun_phrase_genm_layer(Type,L,L0) -->
  pronoun_genm(Type,L,L0).
noun_phrase_genm_layer(Type,L,L0) -->
  noun_phrase_initial_layer(Type,L,L1),
  genm(L1,L0).
noun_phrase_genm_layer(Type,[node('NLYR',[node('NP',NL)|CL])|L],L) -->
  noun_phrase_genm_layer(Type,NL,[]),
  noun_phrase_genm_tail(Type,CL,[]).

    Note that conjunction is possible at the top level of genitive noun phrase structure. This follows from noun_phrase_genm_layer having a recursive rule [rule 3] for picking up conjuncts, with non-initial conjuncts gathered by calls to noun_phrase_genm_tail of (3.30).

(3.30)
noun_phrase_genm_tail(Type,[node('CONJP',[CONJ,node('NP',NL)])|L],L) -->
  conj(CONJ),
  noun_phrase_genm_layer(Type,NL,[]).
noun_phrase_genm_tail(Type,[PU,node('CONJP',[node('NP',NL)])|L],L0) -->
  punc(non_final,[PU],[]),
  noun_phrase_genm_layer(Type,NL,[]),
  noun_phrase_genm_tail(Type,L,L0).

    Consider (3.31), with its word list that contains two proper noun words, followed by a genitive marker, followed by two common noun words.

(3.31)
| ?- tphrase_set_string([w('D;_nphd_','someone'), w('GENM','<apos>s'), w('N','cash'), w('N','offer')]), parse(noun_phrase('',non_privileged)).

(NP (NP-GENV (D;_nphd_ someone)
             (GENM <apos>s))
    (N cash)
    (N offer))

yes

    Calls to reach the output of (3.31) follow (3.32).

(3.32)
noun_phrase non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
noun_phrase_genm_layer non_privileged
noun_phrase_initial_layer non_privileged
noun_head

[w('D;_nphd_','someone')]
genm

[w('GENM','<apos>s')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','cash')]
internal_np_lower_layer
noun

[w('N','offer')]

3.3    Adverb phrases

The two adverb_phrase rules of (3.33) differ in their Type setting. For [rule 1], the Type parameter can have either of the following values:

For [rule 2], the Type setting is non_privileged, with the consequence that the adverb phrase is built in accordance to having either non_interrogative or interrogative type information.

(3.33)
adverb_phrase(Ext,Type,[node(Label,AL)|L],L) -->
  {
    member(Type,[non_interrogative,interrogative,relative,particle]),
    atom_concat('ADVP',Ext,Label)
  },
  adverb_phrase_layer(Type,AL,[]).
adverb_phrase(Ext,Type1,[node(Label,AL)|L],L) -->
  {
    Type1 = non_privileged,
    member(Type2,[non_interrogative,interrogative]),
    atom_concat('ADVP',Ext,Label)
  },
  adverb_phrase_layer(Type2,AL,[]).

The rules of (3.33) will create an adverb phrase by calling adverb_phrase_layer of (3.34) to create list content (AL) to place under an ADVP labelled structure, possibly with a label extension as role/function/indexing information. There is an Ext parameter to provide any tag label extension.

    The only non-recursive rule of (3.34) [rule 1] establishes the head word as a word found with calls of adv (see section 2.6). Provided the Type setting is non_interrogative, recursive calls to adverb_phrase_layer of (3.34) are possible, allowing the parse to:

(3.34)
adverb_phrase_layer(Type,L,L0) -->
  adv(Type,L,L0).
adverb_phrase_layer(non_interrogative,L,L0) -->
  noun_phrase('',non_interrogative,L,L1),
  adverb_phrase_layer(non_interrogative,L1,L0).
adverb_phrase_layer(non_interrogative,L,L0) -->
  neg(L,L1),
  adverb_phrase_layer(non_interrogative,L1,L0).
adverb_phrase_layer(Type,L,L0) -->
  adverb_phrase('',Type,L,L1),
  adverb_phrase_layer(non_interrogative,L1,L0).
adverb_phrase_layer(non_interrogative,L,L0) -->
  adverb_phrase_layer(non_interrogative,L,L1),
  preposition_phrase('',non_interrogative,L1,L0).
adverb_phrase_layer(Type,[node('AVLYR',[ADVP|CL])|L],L) -->
  adverb_phrase('',Type,[ADVP],[]),
  adverb_phrase_tail(Type,CL,[]).

    There is also [rule 6], which is compatible with all type information values, to start a conjunction structure where adverb_phrase adds all conjuncts with calls to adverb_phrase_tail of (3.35) gathering non-initial conjuncts.

(3.35)
adverb_phrase_tail(Type,[node('CONJP',[CONJ,ADVP])|L],L) -->
  conj(CONJ),
  adverb_phrase('',Type,[ADVP],[]).
adverb_phrase_tail(Type,[PU,node('CONJP',[ADVP])|L],L0) -->
  punc(non_final,[PU],[]),
  adverb_phrase('',Type,[ADVP],[]),
  adverb_phrase_tail(Type,L,L0).

3.4    Adjective phrases

The two adjective_phrase rules of (3.36) differ in their Type setting. For [rule 1], the Type parameter can have either of the following values:

For [rule 2], the Type setting is non_privileged, with the consequence that the adjective phrase is built in accordance to having either non_interrogative or interrogative type information.

(3.36)
adjective_phrase(Ext,Type,[node(Label,AL)|L],L) -->
  {
    member(Type,[catenative,non_interrogative,interrogative,relative]),
    atom_concat('ADJP',Ext,Label)
  },
  adjective_phrase_layer(Type,AL,[]).
adjective_phrase(Ext,Type1,[node(Label,AL)|L],L) -->
  {
    Type1 = non_privileged,
    member(Type2,[non_interrogative,interrogative]),
    atom_concat('ADJP',Ext,Label)
  },
  adjective_phrase_layer(Type2,AL,[]).

The rules of (3.36) will create an adjective phrase by calling adjective_phrase_layer of (3.37) to create list content (AL) to place under an ADJP labelled structure, possibly with a label extension as role/function/indexing information. There is an Ext parameter to provide any tag label extension.

    The non-recursive rules of (3.37) [rules 1–3], establish the head word as a word found with a call of adj (see section 2.7):

    Calls to adjective_phrase_layer of (3.37) can also be recursive, allowing, when the Type setting is non_interrogative, the parse to either:

(3.37)
adjective_phrase_layer(Type,L,L0) -->
  {
    member(Type,[interrogative,relative])
  },
  adverb_phrase('',Type,L,L1),
  adjective_phrase_layer(non_interrogative,L1,L0).
adjective_phrase_layer(catenative,L,L0) -->
  adj(catenative,L,L1),
  ip_to_inf('',[],L1,L0).
adjective_phrase_layer(non_interrogative,L,L0) -->
  adj(non_interrogative,L,L0).
adjective_phrase_layer(non_interrogative,L,L0) -->
  adj(non_interrogative,L,L1),
  cp_that('',with_c,[],L1,L0).
adjective_phrase_layer(non_interrogative,L,L0) -->
  noun_phrase('',non_interrogative,L,L1),
  adjective_phrase_layer(non_interrogative,L1,L0).
adjective_phrase_layer(non_interrogative,L,L0) -->
  neg(L,L1),
  adjective_phrase_layer(non_interrogative,L1,L0).
adjective_phrase_layer(non_interrogative,L,L0) -->
  adverb_phrase('',non_interrogative,L,L1),
  adjective_phrase_layer(non_interrogative,L1,L0).
adjective_phrase_layer(non_interrogative,L,L0) -->
  adjective_phrase_layer(non_interrogative,L,L1),
  preposition_phrase('',non_interrogative,L1,L0).
adjective_phrase_layer(Type,[node('AJLYR',[ADJP|CL])|L],L) -->
  adjective_phrase('',Type,[ADJP],[]),
  adjective_phrase_tail(Type,CL,[]).

    There is also [rule 9], which is compatible with all type information values, to start a conjunction structure where adjective_phrase adds all conjuncts with calls to adjective_phrase_tail of (3.38) gathering non-initial conjuncts.

(3.38)
adjective_phrase_tail(Type,[node('CONJP',[CONJ,ADJP])|L],L) -->
  conj(CONJ),
  adjective_phrase('',Type,[ADJP],[]).
adjective_phrase_tail(Type,[PU,node('CONJP',[ADJP])|L],L0) -->
  punc(non_final,[PU],[]),
  adjective_phrase('',Type,[ADJP],[]),
  adjective_phrase_tail(Type,L,L0).

    As an example with adjective phrases, consider (3.39). The word list gives overall content for a noun phrase, while containing two adjective word instances: w('ADJ','important') and w('ADJ','difficult'). Each adjective word will require its own adjective phrase projection, which is seen in the result of (3.39) with its two adjective phrase structures, the first of which has an adverb structure as an internal modifier projected by the adverb word w('ADV','especially').

(3.39)
| ?- tphrase_set_string([w('D','one'), w('ADV','especially'), w('ADJ','important'), w('ADJ','difficult'), w('N','area')]), parse(noun_phrase('',non_privileged)).

(NP (D one)
    (ADJP (ADVP (ADV especially))
          (ADJ important))
    (ADJP (ADJ difficult))
    (N area))

yes

    We can see how the calculation of (3.39) will have worked with the call structure of (3.40).

(3.40)
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','one')]
internal_np_higher_layer
adjective_phrase non_interrogative
adjective_phrase_layer non_interrogative
adverb_phrase non_interrogative
adverb_phrase_layer non_interrogative
adv non_interrogative

[w('ADV','especially')]
adjective_phrase_layer non_interrogative
adj non_interrogative

[w('ADJ','important')]
internal_np_higher_layer
adjective_phrase non_interrogative
adjective_phrase_layer non_interrogative
adj non_interrogative

[w('ADJ','difficult')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','area')]

3.5    Preposition phrases

The first rule of (3.41) builds a preposition phrase by calling preposition_phrase_layer of (3.42) to create list content (PL) to place under a PP labelled structure, possibly with a label extension as role/function/indexing information. There is an Ext parameter to provide any tag label extension and a Type parameter for type information:

(3.41)
preposition_phrase(Ext,Type,L,L0) -->
  preposition_phrase_layer(Type,PL,[]),
  {
    atom_concat('PP',Ext,Label),
    L = [node(Label,PL)|L0]
  }.
preposition_phrase(Ext,Type,L,L0) -->
  preposition_phrase('',Type,[PP1],[]),
  preposition_phrase_tail(Type,CL,[]),
  {
    atom_concat('PP',Ext,Label),
    L = [node(Label,[PP1|CL])|L0]
  }.

    There is only one preposition_phrase_layer rule in (3.42), requiring a word list that has an initial preposition word found with role (from section 2.11). The preposition word needs to occur immediately before content for:

(3.42)
preposition_phrase_layer(Type,L,L0) -->
  role(L,L1),
  noun_phrase('',Type,L1,L0).
preposition_phrase_layer(Type,L,L0) -->
  role(L,L1),
  adverb_phrase('',Type,L1,L0).
preposition_phrase_layer(Type,L,L0) -->
  {
    member(Type,[non_privileged,non_interrogative])
  },
  role(L,[node('IP-PPL2;IP-PPL',IL)|L0]),
  ip_ppl_adverbial_layer(filled_sbj,ing_participle,IL,[]).
preposition_phrase_layer(Type,L,L0) -->
  {
    member(Type,[non_privileged,non_interrogative])
  },
  role(L,[node('IP-PPL3',IL)|L0]),
  ip_ppl_adverbial_layer(unfilled_sbj,ing_participle,IL,[]).
preposition_phrase_layer(Type,L,L0) -->
  {
    member(Type,[non_privileged,non_interrogative])
  },
  role(L,L1),
  cp_embedded_que('',[],L1,L0).
preposition_phrase_layer(Type,L,L0) -->
  {
    member(Type,[non_privileged,non_interrogative])
  },
  role(L,[node('IP-ADV',IL)|L0]),
  clause_top_layer(statement_order,[],IL,[]).

    Conjunction is also possible at the top level of preposition phrase structure. [Rule 2] of (3.41) is a recursive rule for picking up conjuncts, with non-initial conjuncts gathered by calls to preposition_phrase_tail of (3.43).

(3.43)
preposition_phrase_tail(Type,[node('CONJP',[CONJ,PP])|L],L) -->
  conj(CONJ),
  preposition_phrase('',Type,[PP],[]).
preposition_phrase_tail(Type,[PU,node('CONJP',[PP])|L],L0) -->
  punc(non_final,[PU],[]),
  preposition_phrase('',Type,[PP],[]),
  preposition_phrase_tail(Type,L,L0).

    As an example with preposition phrases, consider (3.44). The word list gives overall content for a noun phrase, while containing three preposition word instances: w('P-ROLE','of'), w('P-ROLE','from') and another w('P-ROLE','of'). Each preposition word will introduce a preposition phrase, so we should expect parse results with three contained preposition phrases.

(3.44)
| ?- tphrase_set_string([w('D','the'), w('N','ascent'), w('P-ROLE','of'), w('D','a'), w('ADJ','human'), w('N','figure'), w('P-ROLE','from'), w('D','the'), w('N','direction'), w('P-ROLE','of'), w('D','the'), w('ADJ','distant'), w('N','town')]), parse(noun_phrase('',non_privileged)).

(NP (D the)
    (N ascent)
    (PP (P-ROLE of)
        (NP (D a)
            (ADJP (ADJ human))
            (N figure)
            (PP (P-ROLE from)
                (NP (D the)
                    (N direction)
                    (PP (P-ROLE of)
                        (NP (D the)
                            (ADJP (ADJ distant))
                            (N town))))))))

(NP (D the)
    (N ascent)
    (PP (P-ROLE of)
        (NP (D a)
            (ADJP (ADJ human))
            (N figure)
            (PP (P-ROLE from)
                (NP (D the)
                    (N direction)))
            (PP (P-ROLE of)
                (NP (D the)
                    (ADJP (ADJ distant))
                    (N town))))))

(NP (D the)
    (N ascent)
    (PP (P-ROLE of)
        (NP (D a)
            (ADJP (ADJ human))
            (N figure)))
    (PP (P-ROLE from)
        (NP (D the)
            (N direction)
            (PP (P-ROLE of)
                (NP (D the)
                    (ADJP (ADJ distant))
                    (N town))))))

(NP (D the)
    (N ascent)
    (PP (P-ROLE of)
        (NP (D a)
            (ADJP (ADJ human))
            (N figure)
            (PP (P-ROLE from)
                (NP (D the)
                    (N direction)))))
    (PP (P-ROLE of)
        (NP (D the)
            (ADJP (ADJ distant))
            (N town))))

(NP (D the)
    (N ascent)
    (PP (P-ROLE of)
        (NP (D a)
            (ADJP (ADJ human))
            (N figure)))
    (PP (P-ROLE from)
        (NP (D the)
            (N direction)))
    (PP (P-ROLE of)
        (NP (D the)
            (ADJP (ADJ distant))
            (N town))))

yes

We can see that attachment ambiguity leads to five distinct structures returned in the results of (3.44). Of these, it is only the third structure where all attachments make semantic sense, but the rules we have are not sensitive to this distinction.

    In addition to the attachment ambiguity revealed in the results of (3.44), there is further parsing variation unseen in the results in regard to how the parsing rules are applied. For example, there are different ways to derive the semantically valid third structure of (3.44), e.g., from the call structure of (3.45) or the call structure of (3.46).

(3.45)
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','the')]
internal_np_higher_layer
internal_np_higher_layer
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','ascent')]
preposition_phrase non_privileged
preposition_phrase_layer non_privileged
role

[w('P-ROLE','of')]
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','a')]
internal_np_higher_layer
adjective_phrase non_interrogative
adjective_phrase_layer non_interrogative
adj non_interrogative

[w('ADJ','human')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','figure')]
preposition_phrase non_privileged
preposition_phrase_layer non_privileged
role

[w('P-ROLE','from')]
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','the')]
internal_np_higher_layer
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','direction')]
preposition_phrase non_privileged
preposition_phrase_layer non_privileged
role

[w('P-ROLE','of')]
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','the')]
internal_np_higher_layer
adjective_phrase non_interrogative
adjective_phrase_layer non_interrogative
adj non_interrogative

[w('ADJ','distant')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','town')]
(3.46)
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
noun_phrase_initial_layer non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','the')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','ascent')]
preposition_phrase non_privileged
preposition_phrase_layer non_privileged
role

[w('P-ROLE','of')]
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','a')]
internal_np_higher_layer
adjective_phrase non_interrogative
adjective_phrase_layer non_interrogative
adj non_interrogative

[w('ADJ','human')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','figure')]
preposition_phrase non_privileged
preposition_phrase_layer non_privileged
role

[w('P-ROLE','from')]
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','the')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','direction')]
preposition_phrase non_privileged
preposition_phrase_layer non_privileged
role

[w('P-ROLE','of')]
noun_phrase non_privileged
noun_phrase_top non_privileged
noun_phrase_initial_layer non_privileged
determiner_layer non_privileged
det non_privileged

[w('D','the')]
internal_np_higher_layer
adjective_phrase non_interrogative
adjective_phrase_layer non_interrogative
adj non_interrogative

[w('ADJ','distant')]
internal_np_higher_layer
internal_np_lower_layer
noun

[w('N','town')]

    Looking back at the rules for noun phrase construction, we can see that the variations in call structure between (3.45) and (3.46) arise from there being multiple opportunities within the structure of a noun phrase for integrating preposition phrases. Notably, there are recursive rules with noun_phrase_initial_layer of (3.6) and internal_np_higher_layer of (3.14) that will find a preposition phrase on the right edge of noun phrase structure.