Classes | |
| class | Action |
| class | Condition |
| class | InstObject |
| class | Preposition |
| class | ProbabilityComparator |
Public Member Functions | |
| List< String > | askActions (List< String > evidence) |
| List< String > | askObjects (String evidence) |
| DisambiguatorKB () | |
| void | load (String fileName) throws JDOMException, IOException |
| void | save () throws IOException |
| void | saveAs (String fileName) throws IOException |
| void | tellAction (String action, List< String > evidence) |
| void | tellObject (String object, String evidence) |
| void | tellPreposition (String p) |
| String | toArrayString (List< String > list) |
Static Public Attributes | |
| static final String | ATTR_COUNT = "count" |
| static final String | ATTR_EVIDENCE = "evidence" |
| static final String | ATTR_NAME = "name" |
| static final String | TAG_ACTION = "action" |
| static final String | TAG_DEPENDENCY = "dependency" |
| static final String | TAG_DISAMBIGUATOR = "disambiguator" |
| static final String | TAG_INSTRUCTIONS = "instructions" |
| static final String | TAG_OBJECT = "object" |
| static final String | TAG_OBJECTS = "objects" |
| static final String | TAG_PREPOSITION = "preposition" |
| static final String | TAG_PREPOSITIONS = "prepositions" |
Private Member Functions | |
| List< Preposition > | getPP () |
| double | getProbabilityOfAction (String action, List< String > evidence) |
| double | getProbabilityOfObject (String object, List< String > evidence) |
Private Attributes | |
| HashMap< String, Action > | actions = new HashMap<String, Action>() |
| String | fileName = null |
| int | instructionCount = 0 |
| int | objectCount = 0 |
| HashMap< String, InstObject > | objects = new HashMap<String, InstObject>() |
| int | prepositionCount = 0 |
| HashMap< String, Preposition > | prepositions = new HashMap<String, Preposition>() |
Definition at line 20 of file DisambiguatorKB.java.
Definition at line 46 of file DisambiguatorKB.java.
| List<String> instruction.disambiguator.DisambiguatorKB.askActions | ( | List< String > | evidence | ) | [inline] |
Returns a probability-descending list of actions
| evidence |
Definition at line 140 of file DisambiguatorKB.java.
| List<String> instruction.disambiguator.DisambiguatorKB.askObjects | ( | String | evidence | ) | [inline] |
Returns a probability-descending list of objects
| evidence |
Definition at line 161 of file DisambiguatorKB.java.
| List<Preposition> instruction.disambiguator.DisambiguatorKB.getPP | ( | ) | [inline, private] |
Returns a set of prepositions that are known in the KB
Definition at line 182 of file DisambiguatorKB.java.
| double instruction.disambiguator.DisambiguatorKB.getProbabilityOfAction | ( | String | action, |
| List< String > | evidence | ||
| ) | [inline, private] |
Computes the conditional probability P(action|evidence) of a distinct action given a set of prepositions as evidence
| action | |
| evidence |
Definition at line 200 of file DisambiguatorKB.java.
| double instruction.disambiguator.DisambiguatorKB.getProbabilityOfObject | ( | String | object, |
| List< String > | evidence | ||
| ) | [inline, private] |
Computes the conditional probability P(object|evidence), where evidence has to be an action
| object | |
| evidence |
Definition at line 240 of file DisambiguatorKB.java.
| void instruction.disambiguator.DisambiguatorKB.load | ( | String | fileName | ) | throws JDOMException, IOException [inline] |
Loads a stored KB snapshot from a file
| fileName |
| IOException | |
| JDOMException |
Definition at line 269 of file DisambiguatorKB.java.
| void instruction.disambiguator.DisambiguatorKB.save | ( | ) | throws IOException [inline] |
Saves a snapshot of the KB in the file
| IOException |
Definition at line 387 of file DisambiguatorKB.java.
| void instruction.disambiguator.DisambiguatorKB.saveAs | ( | String | fileName | ) | throws IOException [inline] |
Saves a snapshot of the KB in a file
| fileName |
| IOException |
Definition at line 399 of file DisambiguatorKB.java.
| void instruction.disambiguator.DisambiguatorKB.tellAction | ( | String | action, |
| List< String > | evidence | ||
| ) | [inline] |
Tells the KB about the occurence of the action action given the prepositions evidence
| action | |
| evidence |
Definition at line 109 of file DisambiguatorKB.java.
| void instruction.disambiguator.DisambiguatorKB.tellObject | ( | String | object, |
| String | evidence | ||
| ) | [inline] |
Tells the KB about the object object given the action evidence
| object | |
| evidence |
Definition at line 75 of file DisambiguatorKB.java.
| void instruction.disambiguator.DisambiguatorKB.tellPreposition | ( | String | p | ) | [inline] |
Tells the Kb about the occurrence of a distinct preposition
| p |
Definition at line 55 of file DisambiguatorKB.java.
| String instruction.disambiguator.DisambiguatorKB.toArrayString | ( | List< String > | list | ) | [inline] |
Definition at line 490 of file DisambiguatorKB.java.
HashMap<String, Action> instruction.disambiguator.DisambiguatorKB.actions = new HashMap<String, Action>() [private] |
Definition at line 43 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.ATTR_COUNT = "count" [static] |
Definition at line 33 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.ATTR_EVIDENCE = "evidence" [static] |
Definition at line 35 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.ATTR_NAME = "name" [static] |
Definition at line 34 of file DisambiguatorKB.java.
String instruction.disambiguator.DisambiguatorKB.fileName = null [private] |
Definition at line 40 of file DisambiguatorKB.java.
int instruction.disambiguator.DisambiguatorKB.instructionCount = 0 [private] |
Definition at line 37 of file DisambiguatorKB.java.
int instruction.disambiguator.DisambiguatorKB.objectCount = 0 [private] |
Definition at line 39 of file DisambiguatorKB.java.
HashMap<String, InstObject> instruction.disambiguator.DisambiguatorKB.objects = new HashMap<String, InstObject>() [private] |
Definition at line 44 of file DisambiguatorKB.java.
int instruction.disambiguator.DisambiguatorKB.prepositionCount = 0 [private] |
Definition at line 38 of file DisambiguatorKB.java.
HashMap<String, Preposition> instruction.disambiguator.DisambiguatorKB.prepositions = new HashMap<String, Preposition>() [private] |
Definition at line 42 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.TAG_ACTION = "action" [static] |
Definition at line 29 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.TAG_DEPENDENCY = "dependency" [static] |
Definition at line 32 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.TAG_DISAMBIGUATOR = "disambiguator" [static] |
Definition at line 25 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.TAG_INSTRUCTIONS = "instructions" [static] |
Definition at line 27 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.TAG_OBJECT = "object" [static] |
Definition at line 31 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.TAG_OBJECTS = "objects" [static] |
Definition at line 30 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.TAG_PREPOSITION = "preposition" [static] |
Definition at line 28 of file DisambiguatorKB.java.
final String instruction.disambiguator.DisambiguatorKB.TAG_PREPOSITIONS = "prepositions" [static] |
Definition at line 26 of file DisambiguatorKB.java.