public class Postprocessor
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Postprocessor.ApplyBounded |
(package private) static class |
Postprocessor.ApplyConnected |
(package private) static class |
Postprocessor.ApplyContainsNone |
(package private) static class |
Postprocessor.ApplyContainsOne |
(package private) static class |
Postprocessor.ApplyContainsOneGlobally |
(package private) static interface |
Postprocessor.ApplyFn |
(package private) static class |
Postprocessor.ApplyMustFormACycle |
Modifier and Type | Field and Description |
---|---|
(package private) PPKnowledge |
knowledge
internal rep'n of the actual rules
|
(package private) int |
n_global_rules_firing
this is diagnostic
|
(package private) int |
n_local_rules_firing
this is diagnostic
|
(package private) PPData |
pp_data
root of the pp_data tree
|
(package private) PPNode |
pp_node
root of the pp_node tree
|
(package private) int[] |
relevant_contains_none_rules
a "-1" -terminated list of index
|
(package private) int[] |
relevant_contains_one_rules
a "-1" -terminated list of index
|
(package private) PPLinkset |
set_of_links_in_an_active_rule
used in *some* linkage of sentence
|
(package private) PPLinkset |
set_of_links_of_sentence
seen in *any* linkage of sent
|
(package private) boolean[] |
visited
maintain state during a call to post_process() for the depth-first search
|
Constructor and Description |
---|
Postprocessor()
Constructor class placehoder for javadoc
|
Modifier and Type | Method and Description |
---|---|
(package private) static void |
add_link_to_domain(Postprocessor pp,
int link)
Add a link to the domain
|
(package private) static void |
alloc_pp_node(Postprocessor pp)
set up a fresh pp_node for later use
|
(package private) static boolean |
apply_relevant_rules(Postprocessor pp,
Postprocessor.ApplyFn applyfn,
Sublinkage sublinkage,
PPRule[] rule_array,
int[] relevant_rules,
java.lang.String[] msg)
accumulate link names for this sentence, and need to apply
all rules
|
(package private) static boolean |
apply_rules(Postprocessor pp,
Postprocessor.ApplyFn applyfn,
Sublinkage sublinkage,
PPRule[] rule_array,
java.lang.String[] msg) |
(package private) static void |
bad_depth_first_search(Postprocessor pp,
Sublinkage sublinkage,
int w,
int root,
int start_link) |
(package private) static void |
build_domain_forest(Postprocessor pp,
Sublinkage sublinkage) |
(package private) static void |
build_domains(Postprocessor pp,
Sublinkage sublinkage)
build the domains acociated with a sublinkage.
|
(package private) static void |
build_type_array(Postprocessor pp)
Builds and array of domain types in the named post processor.
|
(package private) static void |
connectivity_dfs(Postprocessor pp,
Sublinkage sublinkage,
int w,
PPLinkset ls) |
(package private) static boolean |
contained_in(Domain d1,
Domain d2,
Sublinkage sublinkage)
Used to determine if one domain is containd in another
|
(package private) static void |
d_depth_first_search(Postprocessor pp,
Sublinkage sublinkage,
int w,
int root,
int right,
int start_link) |
(package private) static void |
depth_first_search(Postprocessor pp,
Sublinkage sublinkage,
int w,
int root,
int start_link) |
(package private) static int |
find_domain_name(Postprocessor pp,
java.lang.String link)
utility routines (not exported)
|
(package private) static void |
free_pp_node(Postprocessor pp) |
(package private) static int |
internal_process(Postprocessor pp,
Sublinkage sublinkage,
java.lang.String[] msg)
Walk the sublinkage and apply rules.
|
(package private) static boolean |
is_connected(Postprocessor pp)
Returns true if the linkage is connected, considering words
that have at least one edge....this allows conjunctive sentences
not to be thrown out.
|
(package private) static void |
left_depth_first_search(Postprocessor pp,
Sublinkage sublinkage,
int w,
int right,
int start_link) |
(package private) static boolean |
link_in_domain(int link,
Domain d)
determine if the given link is in the given domain
|
(package private) static void |
mark_reachable_words(Postprocessor pp,
int w) |
(package private) static void |
post_process_close_sentence(Postprocessor pp) |
(package private) static void |
post_process_free_data(PPData ppd) |
(package private) static boolean |
post_process_match(java.lang.String s,
java.lang.String t)
string comparison in postprocessing.
|
(package private) static void |
reachable_without_dfs(Postprocessor pp,
Sublinkage sublinkage,
int a,
int b,
int w)
This is a depth first search of words reachable from w, excluding any direct edge
between word a and word b.
|
(package private) static void |
reset_pp_node(Postprocessor pp) |
(package private) static void |
setup_domain_array(Postprocessor pp,
int n,
java.lang.String string,
int start_link) |
(package private) static boolean |
string_in_list(java.lang.String s,
java.lang.String[] a)
returns false if the string s does not match anything in
the array.
|
PPKnowledge knowledge
int n_global_rules_firing
int n_local_rules_firing
PPLinkset set_of_links_of_sentence
PPLinkset set_of_links_in_an_active_rule
int[] relevant_contains_one_rules
int[] relevant_contains_none_rules
boolean[] visited
static boolean post_process_match(java.lang.String s, java.lang.String t)
static void post_process_close_sentence(Postprocessor pp)
pp
- static int internal_process(Postprocessor pp, Sublinkage sublinkage, java.lang.String[] msg)
pp
- sublinkage
- msg
- build_graph(Postprocessor, Sublinkage)
static boolean string_in_list(java.lang.String s, java.lang.String[] a)
s
- a
- static void mark_reachable_words(Postprocessor pp, int w)
pp
- w
- static boolean is_connected(Postprocessor pp)
pp
- static void build_domains(Postprocessor pp, Sublinkage sublinkage)
pp
- sublinkage
- static void build_domain_forest(Postprocessor pp, Sublinkage sublinkage)
pp
- sublinkage
- static int find_domain_name(Postprocessor pp, java.lang.String link)
static boolean contained_in(Domain d1, Domain d2, Sublinkage sublinkage)
d1
- d2
- sublinkage
- static boolean link_in_domain(int link, Domain d)
link
- d
- static void connectivity_dfs(Postprocessor pp, Sublinkage sublinkage, int w, PPLinkset ls)
pp
- sublinkage
- w
- ls
- static void add_link_to_domain(Postprocessor pp, int link)
pp
- link
- static void depth_first_search(Postprocessor pp, Sublinkage sublinkage, int w, int root, int start_link)
pp
- sublinkage
- w
- root
- start_link
- static void bad_depth_first_search(Postprocessor pp, Sublinkage sublinkage, int w, int root, int start_link)
pp
- sublinkage
- w
- root
- start_link
- static void d_depth_first_search(Postprocessor pp, Sublinkage sublinkage, int w, int root, int right, int start_link)
pp
- sublinkage
- w
- root
- right
- start_link
- static void left_depth_first_search(Postprocessor pp, Sublinkage sublinkage, int w, int right, int start_link)
pp
- sublinkage
- w
- right
- start_link
- static void setup_domain_array(Postprocessor pp, int n, java.lang.String string, int start_link)
pp
- n
- string
- start_link
- static void reachable_without_dfs(Postprocessor pp, Sublinkage sublinkage, int a, int b, int w)
pp
- sublinkage
- a
- b
- w
- static boolean apply_rules(Postprocessor pp, Postprocessor.ApplyFn applyfn, Sublinkage sublinkage, PPRule[] rule_array, java.lang.String[] msg)
pp
- applyfn
- sublinkage
- rule_array
- msg
- static boolean apply_relevant_rules(Postprocessor pp, Postprocessor.ApplyFn applyfn, Sublinkage sublinkage, PPRule[] rule_array, int[] relevant_rules, java.lang.String[] msg)
pp
- applyfn
- sublinkage
- rule_array
- relevant_rules
- msg
- static void free_pp_node(Postprocessor pp)
pp
- static void alloc_pp_node(Postprocessor pp)
pp
- static void reset_pp_node(Postprocessor pp)
pp
- static void post_process_free_data(PPData ppd)
ppd
- static void build_type_array(Postprocessor pp)
TODO - Should this reference this.pp_node.d_type_array? - jlr
pp
-