Skip to content

TRALE: Lists and Subcategorization

Now, we’ll explore how lists are declared and used in TRALE, particularly for subcategorization in sentence parsing.

Table of Contents

Open Table of Contents

1. Declaration of Lists

In TRALE, lists are a recursive data structure that can be empty or contain elements. Here’s how you declare lists:

list sub [e_list, ne_list].
    ne_list intro [hd:bot, tl:list].

Explanation:

This recursive structure allows for lists of arbitrary length.

2. List Usage

Lists are represented with square brackets ([]). They can contain one or more elements, and the vertical bar (|) operator is used to separate the head from the tail of the list.

Examples:

Example of List Nesting

[X1|[X2|[X3, X4|[X5, X6|Rest]]]]

Here, X1 is the head, and the rest of the list (Rest) contains other nested elements.

3. Subcategorization Lists (SubCat Lists)

Lists are particularly useful for subcategorization in syntactic rules. Subcategorization lists (subcat) specify what arguments a verb can take, such as objects or subjects.

For example:

Subcategorization Example

bot sub [cat, agr, person, sem].
    cat sub [agreeable, s].
        agreeable sub [np, verbal] intro [agr:agr, sem:sem].
            np intro [sem:n_sem].
            verbal sub [v, vp, s] intro [sem:v_sem, subcat:list].
    agr intro [person:person, case:case].
    sem sub [v_sem, n_sem].
        v_sem sub [notice, give].
        n_sem sub [book, pronoun].

    list sub [e_list, ne_list].
        ne_list intro [hd:bot, tl:list].
    person sub [first, second, third].
    case sub [subjective, objective].

Key Points

Example of Pronoun and Verb Definitions

i     ---> (np, sem:pronoun, agr:(person:first, case:subjective)).
you   ---> (np, sem:pronoun, agr:(person:second, case:subjective)).
he    ---> (np, sem:pronoun, agr:(person:third, case:subjective)).
books ---> (np, sem:book).

notice  ---> (v, sem:notice, agr:person:first,
    subcat: [
        (Obj, np, agr:case:objective),
        (Subj, np, agr:case:subjective)]).

notices ---> (v, sem:notice, agr:person:third,
    subcat: [
        (Obj, np, agr:case:objective),
        (Subj, np, agr:case:subjective)]).

give    ---> (v, sem:give, agr:person:first,
    subcat: [
        (Obj1, np, agr:case:objective),
        (Obj2, np, agr:case:objective),
        (Subj, np, agr:case:subjective)]).

gives   ---> (v, sem:give, agr:person:third,
    subcat: [
        (Obj1, np, agr:case:objective),
        (Obj2, np, agr:case:objective),
        (Subj, np, agr:case:subjective)]).

Explanation:

4. Rules for Verb Phrases and Sentences

Rules are applied to combine these subcategorization lists and generate valid sentences.

Verb Phrase Rule (vp)

vp rule
(vp, sem:Sem, agr:Agr, subcat:(Rest, [_|_])) ===>
cat> (verbal, sem:Sem, agr:Agr, subcat: [Obj|Rest]),
cat> Obj.

Explanation:

Sentence Rule (s)

s rule
(s, sem:Sem, agr:Agr, subcat:([], Rest)) ===>
cat> (Subj, agr:Agr),
cat> (vp, sem:Sem, agr:Agr, subcat: [Subj|Rest]).

Explanation:

5. Key Notes

  1. Subcat List Order: The objects in the subcat list should be listed before the subject. This is because, in SVO (Subject-Verb-Object) languages, the verb phrase is built first, and the objects are consumed before the subject.

  2. List Notation: The notation [_|_] is used to indicate that there should be at least one element in the list.

Full Grammar

bot sub [cat, agr, person, sem].
    cat sub [agreeable, s].
        agreeable sub [np, verbal] intro [agr:agr, sem:sem].
            np intro [sem:n_sem].
            verbal sub [v, vp, s] intro [sem:v_sem, subcat:list].
    agr intro [person:person, case:case].
    sem sub [v_sem, n_sem].
        v_sem sub [notice, give].
        n_sem sub [book, pronoun].

    list sub [e_list, ne_list].
        ne_list intro [hd:bot, tl:list].
    person sub [first, second, third].
    case sub [subjective, objective].

i ---> (np, sem:pronoun, agr:(person:first, case:subjective)).
you ---> (np, sem:pronoun, agr:(person:second, case:subjective)).
he ---> (np, sem:pronoun, agr:(person:third, case:subjective)).
she ---> (np, sem:pronoun, agr:(person:third, case:subjective)).

me ---> (np, sem:pronoun, agr:(person:first, case:objective)).
you ---> (np, sem:pronoun, agr:(person:second, case:objective)).
him ---> (np, sem:pronoun, agr:(person:third, case:objective)).
her ---> (np, sem:pronoun, agr:(person:third, case:objective)).

books ---> (np, sem:book).

notice  ---> (v, sem:notice, agr:person:first,
    subcat: [
        (Obj, np, agr:case:objective),
        (Subj, np, agr:case:subjective)]).

notices ---> (v, sem:notice, agr:person:third,
    subcat: [
        (Obj, np, agr:case:objective),
        (Subj, np, agr:case:subjective)]).

give    ---> (v, sem:give, agr:person:first,
    subcat: [
        (Obj1, np, agr:case:objective),
        (Obj2, np, agr:case:objective),
        (Subj, np, agr:case:subjective)]).

gives   ---> (v, sem:give, agr:person:third,
    subcat: [
        (Obj1, np, agr:case:objective),
        (Obj2, np, agr:case:objective),
        (Subj, np, agr:case:subjective)]).

vp rule
(vp, sem:Sem, agr:Agr, subcat:(Rest, [_|_])) ===>
cat> (verbal, sem:Sem, agr:Agr, subcat:[Obj|Rest]),
cat> Obj.

s rule
(s, sem:Sem, agr:Agr, subcat:([], Rest)) ===>
cat> (Subj, agr:Agr),
cat> (vp, sem:Sem, agr:Agr, subcat:[Subj|Rest]).

By following these steps and examples, you can define recursive lists and use them for subcategorization in syntactic structures in TRALE. This allows for more precise and flexible parsing of complex sentence structures in natural language processing tasks.