Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Writing an ERG mal-rule David Mott IBM Emerging Technology Services."— Presentation transcript:

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

2 Writing a MalRule | v1 | Copyright IBM UK, 20132 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?

3 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 20133 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 )) (322 n_sg_ilr 0 1 2 (51 male_n1/n_-_c-nocnh_le 0 1 2 [] (21 "male" 0 1 2 )))  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 )))) bare noun phrase

4 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 20134 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 )))  Why not?  Can we make a mal-rule version, mal-hdn_bnp_c to allow this?

5 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 20135 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

6 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 20136 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 )))) this works, but is it linguistically correct, and WHY does it work?

7 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 20137 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

8 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 20138 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)

9 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 20139 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.

10 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201310 Rationale for the “TFS machine code” representation

11 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201311 The basic inconsistency

12 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201312 Rationale for DIV + (basic paths)

13 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201313 Rationale for DIV – (basic paths)

14 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201314 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 type the path 'n_sg_ilr:SYNSEM' unifies with the path 'n_sg_ilr:ARGS.list.0.SYNSEM' because the path 'n_sg_ilr:ARGS.list.0' unifies with the path 'n_sg_ilr:DTR' and the 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 '+' because the path 'hdn_bnp_c:ARGS.list.0.SYNSEM.LOCAL.AGR.DIV' unifies with the path 'hdn_bnp_c:SYNSEM.LOCAL.AGR.DIV' and the path 'hdn_bnp_c:SYNSEM.LOCAL.AGR.DIV' leads to the tfs type '+'. -- the composition the 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.

15 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201315 -- the composed paths the path ':' leads to the tfs type hdn_bnp_c because the 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 because the unary composition 'THIS' has the composition c1 as first subcomponent and the 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 because the unary composition root has the composition c1 as first subcomponent and the 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.0 the path ':ARGS.list.0.SYNSEM.LOCAL' leads to the tfs type sing_noun because the path ':ARGS.list.0' leads to the tfs type n_sg_ilr and the 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 '-' because the path ':ARGS.list.0.SYNSEM.LOCAL' leads to the tfs type sing_noun and the 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 '-' because the path ':ARGS.list.0.SYNSEM.LOCAL.AGR' unifies with the path ':ARGS.list.0.SYNSEM.LOCAL.CONT.HOOK.INDEX' and the path ':ARGS.list.0.SYNSEM.LOCAL.CONT.HOOK.INDEX.DIV' leads to the tfs type '-' [ propagate ].

16 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201316 the path ':ARGS.list.0.SYNSEM.LOCAL.AGR' unifies with the path ':ARGS.list.0.SYNSEM.LOCAL.CONT.HOOK.INDEX' because the path ':ARGS.list.0.SYNSEM' leads to the tfs type noun_nocomp_synsem and the 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 because the path ':ARGS.list.0.ARGS.list.0' leads to the tfs type 'n_-_c-nocnh_le' and the 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 because the path ':ARGS.list.0.SYNSEM' unifies with the path ':ARGS.list.0.ARGS.list.0.SYNSEM' and the 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' because the path ':ARGS.list.0' leads to the tfs type n_sg_ilr and the 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 '+' because the path ':' leads to the tfs type hdn_bnp_c and the path 'hdn_bnp_c:ARGS.list.0.SYNSEM.LOCAL.AGR.DIV' leads to the tfs type '+'.

17 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201317 Rationale for the higher level structured CE representation

18 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201318 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)

19 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201319 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)

20 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201320 Rationale for DIV – (higher level) Here a reference is expressed as for ease of reading

21 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201321 CE Rationale (higher level) -- the composition the 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 i1 because the n_sg_ilr #cn2 has the tfs feature divisibility as agreement and has the tfs feature indivisibility as agreement. -- rationale for divisible the n_sg_ilr #cn2 has the tfs feature divisibility as agreement because 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 agreement because there is a hdn_bnp_c named #cn1 [ hdn_bnp_1 ].

22 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201322 -- rationale for indivisible the n_sg_ilr #cn2 has the tfs feature indivisibility as agreement because the n_sg_ilr #cn2 has the tfs feature indivisibility as index feature and the 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 feature because 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 ].

23 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201323 the n_sg_ilr #cn2 has the noun_nocomp_synsem #cn5 as synsem because the n_-_c-nocnh_le #cn3 has the noun_nocomp_synsem #cn5 as synsem and the 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' because the n_sg_ilr #cn2 has the n_-_c-nocnh_le #cn3 as first subcomponent and 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' [ 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' and the 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 types the reference 'the daughter of the n_sg_ilr #cn2' equals the reference 'the first subcomponent of the n_sg_ilr #cn2' because there 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' because there is a n_sg_ilr named #cn2 [ n_sg_ilr_4 ]. the n_sg_ilr #cn2 has the sing_noun #cn4 as local because there is an n_sg_ilr named #cn2 [ n_sg_ilr_2 ]. the sing_noun #cn4 has the tfs feature indivisibility as index feature because there is a sing_noun named #cn4 [ sing_noun_1 ].

24 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201324 Rationale for the informal representation

25 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201325 Rationale for DIV + (informal) These are just unparsed english sentences

26 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201326 Rationale for DIV – (informal)

27 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201327 there is an inconsistency named i1 because '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' because has '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)

28 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201328 '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'.

29 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201329 What the mal-rule does  The mal-rule removes the constraint that leads to the divisibility feature

30 IBM Emerging Technology Services Writing a MalRule | v1 | Copyright IBM UK, 201330 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


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

Similar presentations


Ads by Google