|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Generator
Generator.java generates sentances based on TripleStacks. At this point the module will not produce random placement of the sentances within a paragraph due to its tight intergration with the VR system & parser
Constructor Summary | |
Generator(DATA info,
java.util.Random rand_in,
double threashold)
Default Constructor |
Method Summary | |
protected sets |
generate(java.util.LinkedList gstack,
int index,
TripleEntry triple,
int side_a,
int side_b,
int local_out)
internal method used for the recursive calls |
java.util.LinkedList |
generate(TripleStack ttable)
This is the public call to a recursive routine that generates sentances based on a Triplestack provided |
protected int |
hasOther(TripleEntry triple,
TripleEntry secondary_triple,
java.lang.String type)
Checks if there is an unused Threaded or Secondary link to one of the components in triple |
protected int |
hasSecondary(TripleEntry triple,
TripleEntry secondary_triple)
Interface to hasOther to check if there is an unused Secondary link to one of the components in triple |
protected int |
hasThreaded(TripleEntry triple,
TripleEntry secondary_triple)
Interface to hasOther to check if there is an unused Threaded link to one of the components in triple |
protected boolean |
lhs_filter(RuleEntryLHS rule,
DeckEntry workingnode)
|
protected boolean |
or_features(RuleEntryLHS rule,
TripleEntry triple,
int side_a)
|
protected boolean |
or_Order(RuleEntryLHS rule,
TripleEntry triple,
int side)
Checks to see if the order of the OR in the triple match that in the rule |
void |
positions(RuleEntryLHS rule,
int i,
int side,
int rule_position,
int triple_position,
java.lang.String rule_type)
get the position of where the mapped object should go in the rule |
protected boolean |
rule_choice(Triplepair toprule,
Triplepair bottomrule,
DeckEntry[] ready_nodes,
RuleEntryLHS rule)
This choices a rule to check to see if it can be applied |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Generator(DATA info, java.util.Random rand_in, double threashold)
info
- the DATA node with all the table needed to maintain consistancyrand_in
- the random generator used so that the stream is the same throughoutthreashold
- the threashold for determining if a threaded link should be followed or notMethod Detail |
public java.util.LinkedList generate(TripleStack ttable)
ttable
- the Triple stack that will be the source of triplesprotected sets generate(java.util.LinkedList gstack, int index, TripleEntry triple, int side_a, int side_b, int local_out)
gstack
- the stack that is correct at this pointindex
- the point in the deck that is being worked ontriple
- the triple that is to be incorperated in to the sentanceside_a
- the left index of the part of the triple that is to be incorperatedsied_b
- the right index of the part of the triple that is to be incorperatedprotected boolean rule_choice(Triplepair toprule, Triplepair bottomrule, DeckEntry[] ready_nodes, RuleEntryLHS rule)
toprule
- contains the index of the rule with the correct type and highest subscriptbottomrule
- contains the index of the rule with the correct type and lowest subscriptready_nodes
- creates a new array for temperary storage of the product of the rule's applicationrule
- the rule that is choosenprotected boolean lhs_filter(RuleEntryLHS rule, DeckEntry workingnode)
protected boolean or_Order(RuleEntryLHS rule, TripleEntry triple, int side)
rule
- the rule of intersttriple
- the triple of interstside
- the index into the triple of interestprotected boolean or_features(RuleEntryLHS rule, TripleEntry triple, int side_a)
protected int hasSecondary(TripleEntry triple, TripleEntry secondary_triple)
triple
- the Triple that is currently being worked onsecondary_triple
- the Triple that is a secondary link to one of the components in tripleprotected int hasThreaded(TripleEntry triple, TripleEntry secondary_triple)
triple
- the Triple that is currently being worked onsecondary_triple
- the Triple that is a threaded link to one of the components in tripleprotected int hasOther(TripleEntry triple, TripleEntry secondary_triple, java.lang.String type)
triple
- the Triple that is currently being worked onsecondary_triple
- the Triple that is a threaded or secondary link to one of the components in triplepublic void positions(RuleEntryLHS rule, int i, int side, int rule_position, int triple_position, java.lang.String rule_type)
rule
- the rule that might be used, if it passes its testsi
- the element in the mapping vector of the ruleside
- the element in the triplerule_position
- the location that the object should take in the rule. This is the output of the functiontriple_position
- the location that the object has in the triple. This is the output of the functionrule_type
- the type the rule has. This is the output of the function
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |