public class PPKnowledge
extends java.lang.Object
In the following sentence, then, the "Urfl_Only Domain" of the G link would include only the "O" link:
+-----G----+ +---O--+ +-AI+ | | | | hitting dogs is fun.aIn the following sentence it would include the "O", the "TT", the "I", the second "O", and the "A".
+----------------G---------------+ +-----TT-----+ +-----O-----+ | +---O---+ +-I+ +---A--+ +-AI+ | | | | | | | | telling people to do stupid things is fun.aThis would allow us to judge the following:
kicking dogs bores me
kicking dogs kicks dogs
explaining the program is easy
explaining the program is running
(These are distinctions that I thought we would never be able to make, so I told myself they were semantic rather than syntactic. But with domains, they should be easy.)
Modifications
3) when postprocessing a sentence, the links of each domain are placed in a set for quick lookup, ('contains one' and 'contains none')
7) observation: the 'contains one' is, empirically, by far the most violated rule, so it should come first in applying the rules.
Modifier and Type | Field and Description |
---|---|
(package private) PPRule[] |
bounded_rules |
(package private) PPRule[] |
connected_rules |
(package private) PPRule[] |
contains_none_rules |
(package private) PPRule[] |
contains_one_rules |
(package private) PPLinkset |
domain_contains_links |
(package private) PPLinkset |
domain_starter_links
handles to sets of links specified in knowledge file.
|
(package private) PPRule[] |
form_a_cycle_rules |
(package private) PPLinkset |
ignore_these_links |
(package private) PPLinkset |
left_domain_starter_links |
(package private) PPLexTable |
lt
Internal rep'n of sets of strings from knowledge file
|
(package private) PPLinkset |
must_form_a_cycle_links |
(package private) int |
n_bounded_rules |
(package private) int |
n_connected_rules |
(package private) int |
n_contains_none_rules |
(package private) int |
n_contains_one_rules |
(package private) int |
n_form_a_cycle_rules |
(package private) int |
nStartingLinks |
(package private) java.lang.String |
path
Name of file we loaded from
|
(package private) PPLinkset |
restricted_links |
(package private) PPLinkset |
set_of_links_starting_bounded_domain |
(package private) StartingLinkAndDomain[] |
starting_link_lookup_table |
(package private) PPLinkset |
urfl_domain_starter_links |
(package private) PPLinkset |
urfl_only_domain_starter_links |
Constructor and Description |
---|
PPKnowledge(ParseOptions opts,
java.lang.String dictname,
java.lang.String path)
read knowledge from disk into PPKnowledge
|
Modifier and Type | Method and Description |
---|---|
(package private) static void |
check_domain_is_legal(java.lang.String p) |
PPLexTable lt
java.lang.String path
PPLinkset domain_starter_links
PPLinkset urfl_domain_starter_links
PPLinkset urfl_only_domain_starter_links
PPLinkset domain_contains_links
PPLinkset must_form_a_cycle_links
PPLinkset restricted_links
PPLinkset ignore_these_links
PPLinkset left_domain_starter_links
PPRule[] connected_rules
PPRule[] form_a_cycle_rules
PPRule[] contains_one_rules
PPRule[] contains_none_rules
PPRule[] bounded_rules
int n_connected_rules
int n_form_a_cycle_rules
int n_contains_one_rules
int n_contains_none_rules
int n_bounded_rules
PPLinkset set_of_links_starting_bounded_domain
StartingLinkAndDomain[] starting_link_lookup_table
int nStartingLinks
public PPKnowledge(ParseOptions opts, java.lang.String dictname, java.lang.String path) throws java.io.IOException
java.io.IOException