Fido Alpha 3.2

Class PronounResolver


public class PronounResolver
extends java.lang.Object

The PronounResolver classes works with the Discourse class to retrive nouns from the current discourse. A pronoun has the following attributes: gender, person, and plural. The Discourse class stores ResolvedNoun classes for each of the types of pronouns. If a type of pronoun is requested, but the Discourse does not have an antecedent for that type, the pronoun cannot be resolved and should produce an error condition. If a match is found, the Pronoun class should be replaced with the ResolvedNoun class in the sentence structure.

Certain pronouns cannot be dereferenced by gender only, some will need semantic context.

Pronoun Antecedent replaces either nouns or sentence fragments from the previous sentence into the current sentence. Most of the time it will be nouns, but certain sentences, such as "do it again", it will be replaced with the action from the previous sentence. This module will be first because to resolve to any nouns so ellipsis sentence structure can identify all parts of the sentence. This will only replace noun pronouns. Verb pronouns will be replaced by the ellipsis module.

First must determine how words are stored in the database. The two thoughts are all in one hierarchy or each part of speech have its own class in the dataserver. Either way, links names are not enough to identify when a word is a preposition.

Once a word has been identified as a pronoun, there will be two types: possessive and not possessive. The possessive pronouns will be adjectives helping resolve noun phrases. Non possessive pronouns are used to substitute for another word previously in discourse.

Morphology Changes

Morphology will have to change the surface pronoun (one of the above italicized pronouns in the table) to a base pronoun.

Pronoun Class

The pronoun class will contain two tables. One for the discourse variable that the pronoun refers to (only for normal pronouns, not possessives)

Inter-sentence Pronouns

In the following sentence: Open the door and walk through it. The it refers to the opening made by the door, which is in the same sentence. Also, there can be relative clauses at the beginning of the sentence that may either 1. contain a pronoun that is defined in the main clause, or 2. define a noun that the main clause uses a pronoun to reference.

  1. After he went to the store, Jack put the groceries away.
  2. After Jack went to the store, he put the groceries away.
It Pronoun

The storm blew the old oak down.. The following it will have different meanings:

  1. It was a hurricane. (the storm)
  2. It was 200 years old. (the oak)
  3. It was terrible. (the event, or the storm)
  4. It is regrettable. (the result)
Noun Centering Theory

When noun centering fails:

  1. Put the file in the trash.
  2. Empty it.
It above represents the trash, even though the previous sentence centered around the noun file The following taken from Natural Language Understanding, James Allen (p. 436) Two interacting structures are used in the centering theory: The constraints between the center and pronominalization can be stated as follows:

Centering Constraint 1 -- If any object in the local context is referred to by a pronoun in the current sentence, then the center of that sentence must also be pronominalized.
Centering Constraint 2 -- The center must be the most preferred discourse entity in the local context that is referred to by a pronoun.
Centering Constraint 3 -- Continuing with the same center from one sentence to the next is preferred over changing the center.

Reflexive Pronouns

Reflexive - John shaves himself.
Reciprocals - The men talked to each other.
Idioms - I lost my way.
Wh-antecedents - Who thinks he has been cheated.
Quantified - Everyone said he was tired.
Epithats - He stepped on my foot, the creep.

Surface Anaphora (Anaphora means antecedent)

  1. Tell me John's grade in math.
  2. Give me it in English as well. (it refers to John's grade)
  3. Give me Mike's in English too. (implied grade)
World Knowledge

Transferring knowledge from one sentence to another by knowing how objects relate to one another.

  1. John took out a match.
  2. He lit a candle. (with the match)
Using reasoning to disambiguate pronoun antecedents:
  1. Jack poisoned Sam.
  2. He died within a week.
He = Sam.

  1. Jack poisoned Sam.
  2. He was arrested within a week.
He = Jack.

For the Action class, have expected results as well as side effects: Example: for the verb remove, the Unix command would be "rm", the expected result would be the file is removed, and the side effect would be the disk space used would go down.

Also, each verb should have a list of actions that need to performed before the action:

  1. Get in the car.
If any of the above steps are not satisfied, a thread is created to perform those actions, then the parent continues.

Another example:

  1. Delete all rows from table C.
The difference between a list of commands that a verb performs and a list of preconditions, as above, is the list of preconditions have a list of conditions to check before the action is performed. Also, if the condition is false, the verb to perform the action has preconditions to meet its own needs. See Verb Constraints.

Also, have exception handing if any of the steps cannot be performed. Instead of checking for executable permission before running every binary or script, have an exception that will trigger if over an exe cannot be run because of a certain message being returned.

  1. I have two kids and George has three.

See Also:

Constructor Summary
PronounResolver(Discourse discourse)
          Creates a new PronounResolver instance.
Method Summary
 ResolvedNoun resolve(Pronoun pronoun)
          Finds the antecedant of the pronoun in the Discourse class.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public PronounResolver(Discourse discourse)
Creates a new PronounResolver instance.

discourse - Discourse object used in resolving pronouns
Method Detail


public ResolvedNoun resolve(Pronoun pronoun)
                     throws FidoException
Finds the antecedant of the pronoun in the Discourse class. The SentenceComponents module will have filled out the Pronoun class with the person, gender, and number. This is used to find the noun in the previous command with the same attributes.

pronoun - Pronoun to resolve
A ResolvedNoun class that the Pronoun represents
FidoException - Thrown if the parameters in the Pronoun class are out of range, such as fourth person.

Fido Alpha 3.2