Difference between revisions of "Vulcan/TextualMatching"
(→Overview) |
|||
(17 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | By Stephen Soderland. | ||
+ | |||
+ | == Overview == | ||
+ | |||
+ | Rules should be human readable and based on textual tuples. They should be in a format that is easy for manual creation and editing. The human-readable rules can be automatically transformed into TUFFY format. | ||
+ | |||
+ | The set of facts used by the system are stored as textual tuples with a link to the sentence and the genre (e.g. definition, study guide, ClueWeb). These tuples may be nested or n-ary, and may have null arg2 for intransitive relations. These tuples can be automatically transformed into TUFFY format. | ||
+ | |||
+ | <pre> | ||
+ | Rule: <id> (Arg|Rel) : (<var>|<string>) => (Arg|Rel) : (<var>|<string>) <comment> | ||
+ | </pre> | ||
+ | Notes: Rule looks for exact string match in either an Arg or Rel phrase | ||
+ | <var> can be X, Y, Z, R,… and must match any other instances of same variable. | ||
+ | <comment> may be displayed in derivation | ||
+ | |||
+ | <b>Example 1</b> | ||
+ | |||
+ | Question to demonstrate: “Growth causes leaves of a plant to become large”. | ||
+ | <pre> | ||
+ | (growth, cause, (leaves of a plant, become large)) [nested, with intransitive arg2] | ||
+ | (growth, cause, (leaves of a plant, become, large)) [nested, with binary rel for arg2] | ||
+ | </pre> | ||
+ | |||
+ | Evidence from definition: “The noun growth is the process of something becoming bigger” | ||
+ | <pre> | ||
+ | (growth, is process of, (something, become bigger) | ||
+ | (growth, is process of, (something, become, bigger)) | ||
+ | </pre> | ||
+ | |||
+ | ; Rules needed | ||
+ | <pre> | ||
+ | 1. Rel: X => Rel: is process of [generalize any action to “is process of”] | ||
+ | 1a. Rel: cause => Rel: is process of [more particular version of rule 2] | ||
+ | 2. Rel: is process of => Rel: X [abductive rule, inverse of rule 1] | ||
+ | 2a. Rel: is process of => Rel: cause [abductive rule, inverse of rule 1a] | ||
+ | 3. Arg: X => Arg: something [generalize any arg value to “something”] | ||
+ | 4. Arg: something => Arg: X [abductive rule, inverse of rule 3] | ||
+ | 5. Rel: become bigger => Rel: become big [lexical substitution from verb stemmer] | ||
+ | 6. Rel: become big => Rel: become large [lexical substitution from WN synonym] | ||
+ | </pre> | ||
+ | |||
+ | Notes on rules: | ||
+ | |||
+ | We can derive abductive inverses automatically with a meta-rule. | ||
+ | Lexical substitution rules are generated on the fly as needed. | ||
+ | |||
+ | ;Derivation: | ||
+ | |||
+ | <pre> | ||
+ | Evidence: | ||
+ | (growth, is process of, (something, become bigger)) | ||
+ | Rel: become bigger => Rel: become big | ||
+ | (growth, is process of, (something, become big)) | ||
+ | Rel: become big => Rel: become large | ||
+ | (growth, is process of, (something, become large)) | ||
+ | Arg: something => Arg: X | ||
+ | (growth, is process of, (leaves of a plant, become large)) | ||
+ | Rel: is process of => Rel: X | ||
+ | (growth, cause, (leaves of a plant, become large)) QED | ||
+ | </pre> | ||
+ | |||
+ | <b>Example 2</b> | ||
+ | |||
+ | Question to demonstrate: “A sense of smell helps a fox find food” | ||
+ | <pre> | ||
+ | (sense of smell, helps, (fox, find, food)) | ||
+ | </pre> | ||
+ | |||
+ | Evidence from Study Guide: “A good sense of smell is necessary for many animals to find food.” | ||
+ | <pre> | ||
+ | (good sense of smell, is necessary for, (animal, find, food)) | ||
+ | </pre> | ||
+ | |||
+ | ;Rules needed | ||
+ | <pre> | ||
+ | 7. Rel: is necessary for => Rel: helps [a textual entailment] | ||
+ | 8. Arg: fox => Arg: animal [lexical substitution from WN hypernym] | ||
+ | 9. Arg: animal => Arg: fox [lexical specialization from WN hypernym] | ||
+ | 10. Arg: X Y => Arg: Y [generalize by dropping modifier] | ||
+ | 10a. Arg: good Y => Arg: Y [more particular version of rule 10] | ||
+ | 10b. Arg: good sense of smell => Arg: sense of smell [more particular version of rule 10a] | ||
+ | 11. Arg: Y => Arg: X Y [abductive inverse of rule 10] | ||
+ | 11a. Arg: Y => Arg: good Y [more particular version of rule 11] | ||
+ | 11b. Arg: sense of smell => Arg: good sense of smell [more particular version of rule 11a] | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | Note on rules: 10 and 10a are in the nature of meta-rules – TUFFY gets the particular rule 10b. Same with 11, 11a, 11b. | ||
+ | |||
+ | ;Derivation | ||
+ | <pre> | ||
+ | Evidence: | ||
+ | (good sense of smell, is necessary for, (animal, find, food)) | ||
+ | Arg: good Y => Arg: Y | ||
+ | (sense of smell, is necessary for, (animal, find, food)) | ||
+ | Arg: animal => Arg: fox | ||
+ | (sense of smell, is necessary for, (fox, find, food)) | ||
+ | Rel: is necessary for => Rel: helps | ||
+ | (sense of smell, helps, (fox, find, food)) | ||
+ | |||
+ | </pre> | ||
+ | <!-- | ||
+ | |||
Logic style matching can limit recall during inference. Here we discuss some examples of the types of fuzzy textual matching that we need to support. | Logic style matching can limit recall during inference. Here we discuss some examples of the types of fuzzy textual matching that we need to support. | ||
Line 37: | Line 140: | ||
(The noun growth; is the process of; something) | (The noun growth; is the process of; something) | ||
− | |||
− | + | <b>To axioms ?</b> | |
− | |||
− | |||
<b>Rules ? </b> | <b>Rules ? </b> | ||
<b>Textual Matching?</b> | <b>Textual Matching?</b> | ||
+ | |||
+ | <b> Examples of constraints in Tuffy </b> | ||
+ | |||
+ | 3 phrases(pid, str), personName(n), [contains(str,n)] => isaPerson(pid) | ||
+ | |||
+ | 2 teamScore(t1, s1), teamScore(t2, s2), s1 > s2 => winner(t1) | ||
+ | |||
+ | 8 teamScore(t, s), [s % 2 = 1 AND floor(sqrt(s)) = 0] => goodTeam(t) | ||
+ | |||
+ | 100 users(uid, name, hashedPswd), easyPasswords(p), [md5(hashedPswd) = p] => cracked(name, p). | ||
+ | --> |
Latest revision as of 19:26, 20 August 2013
By Stephen Soderland.
Overview
Rules should be human readable and based on textual tuples. They should be in a format that is easy for manual creation and editing. The human-readable rules can be automatically transformed into TUFFY format.
The set of facts used by the system are stored as textual tuples with a link to the sentence and the genre (e.g. definition, study guide, ClueWeb). These tuples may be nested or n-ary, and may have null arg2 for intransitive relations. These tuples can be automatically transformed into TUFFY format.
Rule: <id> (Arg|Rel) : (<var>|<string>) => (Arg|Rel) : (<var>|<string>) <comment>
Notes: Rule looks for exact string match in either an Arg or Rel phrase can be X, Y, Z, R,… and must match any other instances of same variable. <comment> may be displayed in derivation
Example 1
Question to demonstrate: “Growth causes leaves of a plant to become large”.
(growth, cause, (leaves of a plant, become large)) [nested, with intransitive arg2] (growth, cause, (leaves of a plant, become, large)) [nested, with binary rel for arg2]
Evidence from definition: “The noun growth is the process of something becoming bigger”
(growth, is process of, (something, become bigger) (growth, is process of, (something, become, bigger))
- Rules needed
1. Rel: X => Rel: is process of [generalize any action to “is process of”] 1a. Rel: cause => Rel: is process of [more particular version of rule 2] 2. Rel: is process of => Rel: X [abductive rule, inverse of rule 1] 2a. Rel: is process of => Rel: cause [abductive rule, inverse of rule 1a] 3. Arg: X => Arg: something [generalize any arg value to “something”] 4. Arg: something => Arg: X [abductive rule, inverse of rule 3] 5. Rel: become bigger => Rel: become big [lexical substitution from verb stemmer] 6. Rel: become big => Rel: become large [lexical substitution from WN synonym]
Notes on rules:
We can derive abductive inverses automatically with a meta-rule. Lexical substitution rules are generated on the fly as needed.
- Derivation
Evidence: (growth, is process of, (something, become bigger)) Rel: become bigger => Rel: become big (growth, is process of, (something, become big)) Rel: become big => Rel: become large (growth, is process of, (something, become large)) Arg: something => Arg: X (growth, is process of, (leaves of a plant, become large)) Rel: is process of => Rel: X (growth, cause, (leaves of a plant, become large)) QED
Example 2
Question to demonstrate: “A sense of smell helps a fox find food”
(sense of smell, helps, (fox, find, food))
Evidence from Study Guide: “A good sense of smell is necessary for many animals to find food.”
(good sense of smell, is necessary for, (animal, find, food))
- Rules needed
7. Rel: is necessary for => Rel: helps [a textual entailment] 8. Arg: fox => Arg: animal [lexical substitution from WN hypernym] 9. Arg: animal => Arg: fox [lexical specialization from WN hypernym] 10. Arg: X Y => Arg: Y [generalize by dropping modifier] 10a. Arg: good Y => Arg: Y [more particular version of rule 10] 10b. Arg: good sense of smell => Arg: sense of smell [more particular version of rule 10a] 11. Arg: Y => Arg: X Y [abductive inverse of rule 10] 11a. Arg: Y => Arg: good Y [more particular version of rule 11] 11b. Arg: sense of smell => Arg: good sense of smell [more particular version of rule 11a]
Note on rules: 10 and 10a are in the nature of meta-rules – TUFFY gets the particular rule 10b. Same with 11, 11a, 11b.
- Derivation
Evidence: (good sense of smell, is necessary for, (animal, find, food)) Arg: good Y => Arg: Y (sense of smell, is necessary for, (animal, find, food)) Arg: animal => Arg: fox (sense of smell, is necessary for, (fox, find, food)) Rel: is necessary for => Rel: helps (sense of smell, helps, (fox, find, food))