|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthultig.sumo.Rule
public class Rule
NOT YET WELL COMMENTED. This class a sentence reduction rule, obtained from Aleph, an Inductive Logic Programming (ILP) system.
| Field Summary | |
|---|---|
static int |
ALL
|
int |
COUNTER
Used for calculating the frequency of rule applicability in a set of sentences (2012/01/05). |
static int |
LEFT
|
static int |
MIDX
|
static int |
RIGHT
|
| Constructor Summary | |
|---|---|
Rule()
The default constructor. |
|
Rule(int id,
int cover,
String sconditions)
A constructor based on three parameters: the rule identification, the number of learning instances covered, and the string with the rule conditions. |
|
| Method Summary | |
|---|---|
boolean |
entails(Rule r)
Verify if a given rule is entailed by this rule. |
boolean |
equivalent(Rule r)
Verifies whether two rules are equivalent, by comparing their conditions. |
String |
genPattern(int szmid)
Pattern without chunks - it is a simpler version. |
String |
genPatternCHK(int szmid)
Pattern without chunks - it is a simpler version. |
int |
getCover()
Gives the support value for this rule, obtained from the induction process. |
int |
getID()
An ID related to the one labeled by the Aleph system, during the induction process. |
String |
getPattern(int code)
Gives the regular expression representing the conditions over a certain region, specified by code. |
String |
getStrConditions()
The string conditions |
String |
getStrFOLogic()
|
static void |
main(String[] args)
MAIN - For testing. |
boolean |
parseConditionString(String srule)
Parses a string containing a sentence reduction rule. |
void |
set(int id,
int cover,
String sconditions)
Defines the current instance upon three supplied instances. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int ALL
public static int LEFT
public static int MIDX
public static int RIGHT
public int COUNTER
| Constructor Detail |
|---|
public Rule()
public Rule(int id,
int cover,
String sconditions)
id - The rule identifier.cover - The rule coverage: number of positive learning instances
covered.sconditions - The string containing the conditions. It will be
parsed, extracting their conditions.| Method Detail |
|---|
public final void set(int id,
int cover,
String sconditions)
id - The rule identifier.cover - The rule coverage: number of positive learning
instances covered by this rule.sconditions - public boolean parseConditionString(String srule)
srule - The string holding a sentence reduction rule.
true on success.public String genPattern(int szmid)
szmid -
public String genPatternCHK(int szmid)
szmid -
public boolean entails(Rule r)
r -
public boolean equivalent(Rule r)
r - The other rule to compare with.
public String getPattern(int code)
code = ALL).
code - The region code: LEFT, MIDX, RIGHT or ALL
public int getCover()
public int getID()
public String getStrConditions()
public String getStrFOLogic()
public String toString()
toString in class Objectpublic static void main(String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||