Writing an ERG mal-rule David Mott IBM Emerging Technology Services.

30
v1 | Copyright IBM UK Ltd 2013 Writing an ERG mal-rule David Mott IBM Emerging Technology Services

Transcript of Writing an ERG mal-rule David Mott IBM Emerging Technology Services.

v1 | Copyright IBM UK Ltd 2013

Writing an ERG mal-rule

David MottIBM Emerging Technology Services

Writing a MalRule | v1 | Copyright IBM UK, 20132

IBM Emerging Technology Services

Introduction

With the ERG (1111) the following SYNCOIN sentence fails to parse: cell phone call from unidentified male (7115452376) in bayaa to an unidentified male

(7438604901) in saydiyah.

This can be simplified to the following sentence, which also does not parse: male called a woman

However the following sentences do parse: a male called a woman male called a woman (if we make “male” a mass noun) gold excited a woman

Intuitively the problem is that the original sentence is ungrammatical, and that “male”, being a count noun cannot be used as a noun phrase without a determiner, whereas a mass noun (gold) could be. we don’t want to turn “male” and other nouns into a mass noun!

How do we write a “mal-rule” that allows this construction?

Writing a MalRule | v1 | Copyright IBM UK, 20133

IBM Emerging Technology Services

Relevant ERG types

Analysing a correct count noun parse “a male called a woman” shows that the noun “male_n1” combines with the type “n_sg_ilr”; together with a determiner, it combines with sp-hd_n_c to form a valid subject: (592 sp-hd_n_c 0 0 2 (30 a_det/d_-_sg-nmd_le -0.4307 0 1 [] (25 "a" 0 0 1 <0:1>)) (322 n_sg_ilr 0 1 2 (51 male_n1/n_-_c-nocnh_le 0 1 2 [] (21 "male" 0 1 2 <2:6>)))

Analysing a correct mass noun parse “gold excited a woman” shows that the noun “gold_n1” combines with “n_ms_ilr” and thence with “hdn_bnp_c” to form a valid subject:(139 hdn_bnp_c 0 0 1 (76 n_ms_ilr 0 0 1 (22 gold_n1/n_-_m_le 0.2603 0 1 []

(20 "gold" 0 0 1 <0:4>))))

bare noun phrase

Writing a MalRule | v1 | Copyright IBM UK, 20134

IBM Emerging Technology Services

Failed composition

However “n_sg_ilr” does not combine with “hdn_bnp_c”:

(139 hdn_bnp_c 0 0 1

(76 n_sg_ilr 0 0 1

(51 male_n1/n_-_c-nocnh_le 0 1 2 []

(21 "male" 0 1 2 <2:6>)))

Why not?

Can we make a mal-rule version, mal-hdn_bnp_c to allow this?

Writing a MalRule | v1 | Copyright IBM UK, 20135

IBM Emerging Technology Services

Experimenting with hdn_bnp_c(n_sg_ilr)

Changing the definition of hdn_bnp_c and trying different versions with constraints removed shows that if only the following line is removed the combination will take place:SYNSEM.LOCAL.AGR.DIV.+ (obtained from bare_np_phrase in syntax.tdl)

ERG defines “DIV” as:DIV (divisible) distinguishes singular count nouns from plural and mass

nouns, for determiners like "some", and for bare-plural NPs.

IND (individuated) draws the relevant semantic distinction between

countable and non-countable entities, so DIV should be only a morphosyntactic

distinction.

This means that a bare noun phrase (eg hdn_bnp_c) can only be formed when the head noun is “divisible” however the noun male is a singular noun and hence on its own the phrase “male” is

not divisible

Writing a MalRule | v1 | Copyright IBM UK, 20136

IBM Emerging Technology Services

Creating a mal rule

The definition of hdn_bnp_c is based on:bare_np_phrase := reg_bare_np_phrase &

[ SYNSEM.LOCAL.AGR.DIV +,

ARGS < [ SYNSEM.LOCAL.CAT [ HEAD noun_or_nomger,

VAL.SPR.FIRST.OPT - ] ] > ].

By changing this to:mal-bare_np_phrase := reg_bare_np_phrase &

[ ARGS < [ SYNSEM.LOCAL.CAT [ HEAD noun_or_nomger,

VAL.SPR.FIRST.OPT - ] ] > ].

and redefining mal-hdn_bnp_c accordingly, then the parse of “male called a woman” provides a suitable subject from the combination of hdn_bnp_c and n_sg_ilr:(787 mal_hdn_bnp_c 0 0 1

(293 n_sg_ilr 0 0 1

(22 male_n1/n_-_c-nocnh_le 0 0 1 []

(20 "male" 0 0 1 <0:4>))))

this works, but is it linguistically

correct, and WHY does it work?

Writing a MalRule | v1 | Copyright IBM UK, 20137

IBM Emerging Technology Services

Rationale for Problem

Essentially the problem is that: hdn_bnp_c delivers a bare noun phrase, without the need for a determiner. This

requires a “divisible” (DIV + ) noun phrase as subcomponent, for example:• males …• water …• green water …• water that flows …

n_sg_ilr applied to a n_-_c-nocnh_le (such as “male”) delivers a singular noun that is not divisible (DIV -)

The question is how is this conflict detected? information is passed across the paths defined by the ERG types, together with the

constraints that are applied to these types

Writing a MalRule | v1 | Copyright IBM UK, 20138

IBM Emerging Technology Services

Approaches to Rationale in Controlled English

1) A representation based upon the paths:

the path 'hdn_bnp_c:ARGS.list.0.SYNSEM.LOCAL.AGR.DIV leads to the type +

A path is defined as a type (hdn_bnp_c) followed by a sequence of feature names (where ARGS.list.0 is equivalent to the first argument of the list contained in the ARGS feature).

A path starting with “:” is a path in the composition However this is more of a TFS “machine code” and does not show the higher level intent of the rules

2) An unstructured representation based upon a higher level description:

“the hdn_bnp_c in the composition has an indivisible thing as its agreement”

This represents an informal statement as a quoted string, and thus may contain any natural lnaguage whatsoever.

It is not CE and cannot therefore be broken down into finder detail suitable for further inferencing. However it does provide an informal starting point for a more formal analysis.

3) A structured CE representation based upon a higher level description:

the hdn_bnp_c #cn1 has the tfs feature divisibility as agreement

where #cn1 is an actual node in the composition (This is currently only partially successful as a representation, and could be higher level still)

Writing a MalRule | v1 | Copyright IBM UK, 20139

IBM Emerging Technology Services

Approach to generating rationale

As yet we have not automated the generation of the rationale from the workings of the TFS unification algorithm as embodied in the PET parser

Thus we manually generate the rationale for the linguistic reasoning subject to: the raw knowledge about the constraints and types are determined from the ERG

grammar the reasoning employed by each (hand-simulated) rule is backed by a CE rule that

attempts to generalise the specific reasoning steps used; this provides a semantics of the reasoning that should be implementable (or at least simulated) as part of the linguistic processing

Note that the use of “references” (see later) to represent more complex paths through the TFS types is simulated by additional “meta-reasoning” which would need to be worked out in more detail; however this is based upon the use of meta statements about attribute concepts that are already in the Prolog-based CE interpreter and CE language

Given the set of (hand-written) reasoning steps, these are parsed by the system and turned into information suitable for display by a D3 diagramming application.

Writing a MalRule | v1 | Copyright IBM UK, 201310

IBM Emerging Technology Services

Rationale for the “TFS machine code” representation

Writing a MalRule | v1 | Copyright IBM UK, 201311

IBM Emerging Technology Services

The basic inconsistency

Writing a MalRule | v1 | Copyright IBM UK, 201312

IBM Emerging Technology Services

Rationale for DIV + (basic paths)

Writing a MalRule | v1 | Copyright IBM UK, 201313

IBM Emerging Technology Services

Rationale for DIV – (basic paths)

Writing a MalRule | v1 | Copyright IBM UK, 201314

IBM Emerging Technology Services

CE rationale (basic paths)-- basic type information (note these values may not be on the actual type, but may be inherited)

the path 'sing_noun:CONT.HOOK.INDEX.DIV' leads to the tfs type '-'.

the path 'noun_nocomp_synsem:LOCAL.CONT.HOOK.INDEX' unifies with the path 'noun_nocomp_synsem:LOCAL.AGR'.

the path ' n_-_c-nocnh_le:SYNSEM' leads to the tfs type noun_nocomp_synsem.

the path 'n_sg_ilr:SYNSEM.LOCAL' leads to the tfs type sing_noun.

the path 'n_sg_ilr:ARGS.list.0' unifies with the path 'n_sg_ilr:DTR'.

the path 'n_sg_ilr:DTR.SYNSEM' unifies with the path 'n_sg_ilr:SYNSEM'.

the path 'hdn_bnp_c:SYNSEM.LOCAL.AGR.DIV' leads to the tfs type '+'.

the path 'hdn_bnp_c:ARGS.list.0.SYNSEM.LOCAL.AGR.DIV' unifies with the path 'hdn_bnp_c:SYNSEM.LOCAL.AGR.DIV'.

-- induced relationships within a typethe path 'n_sg_ilr:SYNSEM' unifies with the path 'n_sg_ilr:ARGS.list.0.SYNSEM' becausethe path 'n_sg_ilr:ARGS.list.0' unifies with the path 'n_sg_ilr:DTR' andthe path 'n_sg_ilr:DTR.SYNSEM' unifies with the path 'n_sg_ilr:SYNSEM‘[ transitivity ].

the path 'hdn_bnp_c:ARGS.list.0.SYNSEM.LOCAL.AGR.DIV' leads to the tfs type '+' becausethe path 'hdn_bnp_c:ARGS.list.0.SYNSEM.LOCAL.AGR.DIV' unifies with the path 'hdn_bnp_c:SYNSEM.LOCAL.AGR.DIV' andthe path 'hdn_bnp_c:SYNSEM.LOCAL.AGR.DIV' leads to the tfs type '+'.

-- the compositionthe unary composition 'THIS' has the tfs type hdn_bnp_c as composed type and has the composition c1 as first subcomponent.

the unary composition c1 has the tfs type n_sg_ilr as composed type and has the composition c2 as first subcomponent.

the unary composition c2 has the tfs type n_-_c-nocnh_le as composed type.

Writing a MalRule | v1 | Copyright IBM UK, 201315

IBM Emerging Technology Services

-- the composed pathsthe path ':' leads to the tfs type hdn_bnp_c becausethe unary composition 'THIS' has the tfs type hdn_bnp_c as composed type.

the path ':ARGS.list.0' leads to the tfs type n_sg_ilr becausethe unary composition 'THIS' has the composition c1 as first subcomponent andthe unary composition c1 has the tfs type n_sg_ilr as composed type.

the path ':ARGS.list.0.ARGS.list.0' leads to the tfs type n_-_c-nocnh_le becausethe unary composition root has the composition c1 as first subcomponent andthe unary composition c1 has the composition c2 as first subcomponent and has the tfs type n_-_c-nocnh_le as composed type.

-- links across the ARGS.0the path ':ARGS.list.0.SYNSEM.LOCAL' leads to the tfs type sing_noun becausethe path ':ARGS.list.0' leads to the tfs type n_sg_ilr andthe path 'n_sg_ilr:SYNSEM.LOCAL' leads to the tfs type sing_noun [ expand ].

the path ':ARGS.list.0.SYNSEM.LOCAL.CONT.HOOK.INDEX.DIV' leads to the tfs type '-' becausethe path ':ARGS.list.0.SYNSEM.LOCAL' leads to the tfs type sing_noun andthe path 'sing_noun:CONT.HOOK.INDEX.DIV' leads to the tfs type '-' [ expand ].

the path ':ARGS.list.0.SYNSEM.LOCAL.AGR.DIV' leads to the tfs type '-' becausethe path ':ARGS.list.0.SYNSEM.LOCAL.AGR' unifies with the path ':ARGS.list.0.SYNSEM.LOCAL.CONT.HOOK.INDEX' andthe path ':ARGS.list.0.SYNSEM.LOCAL.CONT.HOOK.INDEX.DIV' leads to the tfs type '-' [ propagate ].

Writing a MalRule | v1 | Copyright IBM UK, 201316

IBM Emerging Technology Services

the path ':ARGS.list.0.SYNSEM.LOCAL.AGR' unifies with the path ':ARGS.list.0.SYNSEM.LOCAL.CONT.HOOK.INDEX' becausethe path ':ARGS.list.0.SYNSEM' leads to the tfs type noun_nocomp_synsem andthe path 'noun_nocomp_synsem:LOCAL.AGR' unifies with the path 'noun_nocomp_synsem:LOCAL.CONT.HOOK.INDEX' [ expand_unification ].

the path ':ARGS.list.0.ARGS.list.0.SYNSEM' leads to the tfs type noun_nocomp_synsem becausethe path ':ARGS.list.0.ARGS.list.0' leads to the tfs type 'n_-_c-nocnh_le' andthe path 'n_-_c-nocnh_le:SYNSEM' leads to the tfs type noun_nocomp_synsem [ expand ].

the path ':ARGS.list.0.SYNSEM' leads to the tfs type noun_nocomp_synsem becausethe path ':ARGS.list.0.SYNSEM' unifies with the path ':ARGS.list.0.ARGS.list.0.SYNSEM' andthe path ':ARGS.list.0.ARGS.list.0.SYNSEM' leads to the tfs type noun_nocomp_synsem [ unify ].

the path ':ARGS.list.0.SYNSEM' unifies with the path ':ARGS.list.0.ARGS.list.0.SYNSEM' becausethe path ':ARGS.list.0' leads to the tfs type n_sg_ilr andthe path 'n_sg_ilr:SYNSEM' unifies with the path 'n_sg_ilr:ARGS.list.0.SYNSEM' [ unify ].

the path ':ARGS.list.0.SYNSEM.LOCAL.AGR.DIV' leads to the tfs type '+' becausethe path ':' leads to the tfs type hdn_bnp_c andthe path 'hdn_bnp_c:ARGS.list.0.SYNSEM.LOCAL.AGR.DIV' leads to the tfs type '+'.

Writing a MalRule | v1 | Copyright IBM UK, 201317

IBM Emerging Technology Services

Rationale for the higher level structured CE representation

Writing a MalRule | v1 | Copyright IBM UK, 201318

IBM Emerging Technology Services

Use of “references” To handle the more complex statements about constraints:

we need to express a constraint as a CE sentence, as we must provide rationale for them more complex paths are required to define tfs structures, eg the x of y of z

Various approaches considered; current preference is to use a “reference” a reference is specification of a value that is arrived at by following a chain of attributes from a

specific tfs type instance but without actually indicating the actual value:

• the reference ‘the synsem of the n_sg_ilr #cn2’

two references may be equated in a CE sentence:

• the reference ‘the synsem of the n_sg_ilr #cn2’ equals the reference ‘the synsem of the daughter of the n_sg_ilr #cn2’

this permits reification of the equals constraint, and allows reasoning steps to create new equality statements

this also moves towards the use of full paths in attributes in a revised version of CE however the reference must be given a semantics, and a possible semantics has been sketched

out in terms of meta statements about attribute concepts (see document to follow)

Writing a MalRule | v1 | Copyright IBM UK, 201319

IBM Emerging Technology Services

Rationale for DIV + (higher level)

Here we have some extra

information from the rule comments

(in italic)

Note this refers to the specific

entities in the composition (#cn1

etc)

Writing a MalRule | v1 | Copyright IBM UK, 201320

IBM Emerging Technology Services

Rationale for DIV – (higher level)

Here a reference is expressed as < path >

for ease of reading

Writing a MalRule | v1 | Copyright IBM UK, 201321

IBM Emerging Technology Services

CE Rationale (higher level)-- the compositionthe composition #c contains the hdn_bnp_c #cn1 and contains the n_sg_ilr #cn2 and contains the n_-_c-nocnh_le #cn3.

the hdn_bnp_c #cn1 has the n_sg_ilr #cn2 as first subcomponent.

the n_sg_ilr #cn2 has the n_-_c-nocnh_le #cn3 as first subcomponent.

there is an inconsistency named i1because the n_sg_ilr #cn2 has the tfs feature divisibility as agreement and has the tfs feature indivisibility as agreement.

-- rationale for divisiblethe n_sg_ilr #cn2 has the tfs feature divisibility as agreementbecause the hdn_bnp_c #cn1 has the tfs feature divisibility as agreement and has the n_sg_ilr #cn2 as first subcomponent [ hdn_bnp_2 ].

the hdn_bnp_c #cn1 has the tfs feature divisibility as agreementbecause there is a hdn_bnp_c named #cn1 [ hdn_bnp_1 ].

Writing a MalRule | v1 | Copyright IBM UK, 201322

IBM Emerging Technology Services

-- rationale for indivisiblethe n_sg_ilr #cn2 has the tfs feature indivisibility as agreementbecausethe n_sg_ilr #cn2 has the tfs feature indivisibility as index feature andthe reference 'the agreement of the n_sg_ilr #cn2' equals the reference 'the index feature of the n_sg_ilr #cn2' [ apply_equality ].

the reference 'the agreement of the n_sg_ilr #cn2' equals the reference 'the index feature of the n_sg_ilr #cn2'because the n_sg_ilr #cn2 has the noun_nocomp_synsem #cn5 as synsem and the reference 'the agreement of the noun_nocomp_synsem #cn5' equals the reference 'the index feature of

the noun_nocomp_synsem'[ synsem_propagate_constraint ].

the reference 'the agreement of the noun_nocomp_synsem #cn5' equals the reference 'the index feature of the noun_nocomp_synsem'

because there is a noun_nocomp_synsem named #cn5 [ noun_nocomp_synsem ].

the n_sg_ilr #cn2 has the tfs feature indivisibility as index featurebecause the n_sg_ilr #cn2 has the sing_noun #cn4 as local and the sing_noun #cn4 has the tfs feature indivisibility as index feature [ local_index ].

Writing a MalRule | v1 | Copyright IBM UK, 201323

IBM Emerging Technology Services

the n_sg_ilr #cn2 has the noun_nocomp_synsem #cn5 as synsembecausethe n_-_c-nocnh_le #cn3 has the noun_nocomp_synsem #cn5 as synsem andthe reference 'the synsem of the n_sg_ilr #cn2' equals the reference 'the synsem of the n_-_c-nocnh_le #cn3' [ apply_equality ].

the reference 'the synsem of the n_sg_ilr #cn2' equals the reference 'the synsem of the n_-_c-nocnh_le #cn3'becausethe n_sg_ilr #cn2 has the n_-_c-nocnh_le #cn3 as first subcomponent andthe reference 'the synsem of the n_sg_ilr #cn2' equals the reference 'the synsem of the first subcomponent of the n_sg_ilr #cn2'[ reference_substitution_1 ]. the reference 'the synsem of the n_sg_ilr #cn2' equals the reference 'the synsem of the first subcomponent of the n_sg_ilr #cn2'because the reference 'the daughter of the n_sg_ilr #cn2' equals the reference 'the first subcomponent of the n_sg_ilr #cn2' andthe reference 'the synsem of the n_sg_ilr #cn2' equals the reference 'the synsem of the daughter of the n_sg_ilr #cn2'[ reference_transitivity_1 ].

-- predefined information on the typesthe reference 'the daughter of the n_sg_ilr #cn2' equals the reference 'the first subcomponent of the n_sg_ilr #cn2'becausethere is a n_sg_ilr named #cn2[ n_sg_ilr_3 ].

the reference 'the synsem of the n_sg_ilr #cn2' equals the reference 'the synsem of the daughter of the n_sg_ilr #cn2' becausethere is a n_sg_ilr named #cn2[ n_sg_ilr_4 ].

the n_sg_ilr #cn2 has the sing_noun #cn4 as localbecause there is an n_sg_ilr named #cn2 [ n_sg_ilr_2 ].

the sing_noun #cn4 has the tfs feature indivisibility as index featurebecause there is a sing_noun named #cn4 [ sing_noun_1 ].

Writing a MalRule | v1 | Copyright IBM UK, 201324

IBM Emerging Technology Services

Rationale for the informal representation

Writing a MalRule | v1 | Copyright IBM UK, 201325

IBM Emerging Technology Services

Rationale for DIV + (informal)

These are just unparsed english

sentences

Writing a MalRule | v1 | Copyright IBM UK, 201326

IBM Emerging Technology Services

Rationale for DIV – (informal)

Writing a MalRule | v1 | Copyright IBM UK, 201327

IBM Emerging Technology Services

there is an inconsistency named i1because 'the n_sg_ilr in the composition has a divisible thing as its agreement' and'the n_sg_ilr in the composition has an indivisible thing as its agreement'.

'the n_sg_ilr in the composition has a divisible thing as its agreement'because'the composition has n_sg_ilr as the first subcomponent of the bnp' and'the first subcomponent of the bnp in the composition has a divisible thing as its agreement'.

'the first subcomponent of the bnp in the composition has a divisible thing as its agreement‘. because'a bnp has a divisible thing as its agreement' and'a bnp matches its agreement divisibility value with that of its first subcomponent'.

'the n_sg_ilr in the composition has an indivisible thing as its agreement' because'the n_sg_ilr in the composition has an indivisible thing as its INDEX' and'the n_sg_ilr in the composition matches its agreement and its INDEX'. 'the n_sg_ilr in the composition has an indivisible thing as its INDEX' because'the n_sg_ilr in the composition has a sing_noun as its LOCAL' and'a sing_noun has an indivisible thing as its INDEX'.

'the n_sg_ilr in the composition has a sing_noun as its LOCAL' becausehas 'a n_sg_ilr has a sing_noun as its LOCAL'.

'the n_sg_ilr in the composition matches its agreement and its INDEX' because'the n_sg_ilr in the composition has a noun_nocomp_synsem as its SYNSEM' and'a noun_nocomp_synsem matches its agreement and its INDEX'. 'a noun_nocomp_synsem matches its agreement and its INDEX' because'most nouns identify their AGR and INDEX'.

Rationale (informal)

Writing a MalRule | v1 | Copyright IBM UK, 201328

IBM Emerging Technology Services

'the n_sg_ilr in the composition has a noun_nocomp_synsem as its SYNSEM' because'the n_-_c-nocnh_le in the composition has a noun_nocomp_synsem as its SYNSEM' and'the n_sg_ilr SYNSEM in the composition matches that of the n_-_c-nocnh_le in the composition'.

'the n_-_c-nocnh_le in the composition has a noun_nocomp_synsem as its SYNSEM' because'a n_-_c-nocnh_le has a noun_nocomp_synsem as its SYNSEM'.

'a n_-_c-nocnh_le has a noun_nocomp_synsem as its SYNSEM' because'noun_nocomp_synsem specifies a count noun with no complement'.

'the n_sg_ilr SYNSEM in the composition matches that of the n_-_c-nocnh_le in the composition' because'an n_sg_ilr matches its SYNSEM with that of its first subcomponent' and'the n_sg_ilr in the composition has the n_-_c-nocnh in the composition as its first subcomponent'.

'an n_sg_ilr matches its SYNSEM with that of its first subcomponent' because'an n_sg_ilr matches its first subcomponent with its DTR' and'an n_sg_ilr matches its SYNSEM with that of its DTR'.

Writing a MalRule | v1 | Copyright IBM UK, 201329

IBM Emerging Technology Services

What the mal-rule does

The mal-rule removes the constraint that leads to the divisibility feature

Writing a MalRule | v1 | Copyright IBM UK, 201330

IBM Emerging Technology Services

Possible CE representation of mal-rule

there is a linguistic frame named l1 that defines the phrase bare_np_phrase BNP and

has the sequence ( the phrase A0 ) as syntax and

has the statement that the phrase BNP is a reg_bare_np_phrase and has true as the DIV of the AGR of the LOCAL of the SYNSEM and the phrase A0 has the noun_or_nomger X as the HEAD of the CAT of the LOCAL of the SYNSEM and has false as the OPT of the FIRST of the SPR of the VAL of the CAT of the LOCAL of the SYNSEM as semantics.

remove this line to get mal-

rule