|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaminePlatform.util.cg.CGOperations
Title : util.cg.CGOperations Class
Description : CG operations are defined in terms of the generic CG operation match. See Amine Web Site for a detailed discussion of the background behind the current implementation of CG operations.
Copyright : Copyright (c) Adil KABBAJ 2004-2009
Field Summary | |
protected boolean |
animation
|
protected BindingContext |
bindContext
|
java.util.HashMap |
conceptsMatched
it is a HashMap of Key:ConcFromG1 Value:ConcCouple= |
protected Lexicon |
lexicon
|
java.util.HashMap |
relationsMatched
It is a HashMap of Key:RelationG1 Value:RelationG2 |
boolean |
surfaceMatching
|
(package private) java.util.ArrayList |
toLocalMatchs
it is an ArrayList of ConcCouple : |
Constructor Summary | |
CGOperations()
|
|
CGOperations(BindingContext bindContext)
CGOperations(ontology) sets the proper context for the CG operation; creation and initialisation of auxiliary data structures |
|
CGOperations(BindingContext bindContext,
boolean coerce,
boolean relaxType)
|
Method Summary | |
(package private) boolean |
addSpcfcG2ToGx(CG G2,
java.lang.Object bindInf2,
CG Gx,
java.util.HashMap c2cx)
Method common to both maxJoinRslt and Specialize |
(package private) Concept |
analogicalCopy(Concept c2,
java.lang.Object bindInf)
|
(package private) Concept |
analogicalCoref(Concept conc,
java.lang.Object bindInf)
|
(package private) boolean |
analogicalTransfer(CG cgTarget,
java.lang.Object bindInf1,
CG cgSource,
java.lang.Object bindInf2)
Code for Analogical Transfer |
boolean |
analogy(CG G1,
CG G2)
analogy() determine the structural matching of the two CG and then transfer to the target CG all the elements that are specific to the source CG |
boolean |
analogy(CG G1,
Concept E1,
CG G2,
Concept E2)
analogy() determine the structural matching of the two CG and then transfer to the target CG all the elements that are specific to the source CG |
boolean |
analogy(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
analogy() determine the structural matching of the two CG and then transfer to the target CG all the elements that are specific to the source CG |
protected void |
animateConcept(int ind,
Concept concept,
boolean mode)
|
protected void |
animateRelation(int ind,
Relation relation,
boolean mode)
|
static boolean |
bagInclusion(int nbreRelsG1,
int nbreRelsG2,
java.util.HashMap allRelsG1,
java.util.HashMap allRelsG2)
bagInclusion is used by the CGOperation at the begining, especially if the operation is a projection based operation (like EQUAL, SUBSUME, SUBSUME_WITH_RSLT, and UNIFY). |
(package private) void |
clearAuxStrs()
|
void |
clearCorefMatchL()
|
(package private) void |
clearCsMatched()
|
(package private) void |
clearMatchCGStrs(int oldLastElemIdx)
|
(package private) void |
clearRelsMatched()
|
(package private) void |
clearToLocalMatchs()
|
(package private) boolean |
commonRslt(CG G1,
java.lang.Object bindInf1,
CG G3)
The resulted CG G3 is a common graph of the two input CG, modulo the nature of the operation (GENERALIZE or subsumeWithResult). |
CompareCGResult |
compare(CG cg1,
Concept entryPoint1,
CG cg2,
Concept entryPoint2)
Compare two CGs cg1 and cg2 : The operation starts by computing the generalization between the two CG cg1 and cg2. |
CompareCGResult |
compareCG(CG newCG,
Concept entryPoint,
CG currentCG,
CS fatherOntNode)
Compare two CGs : newCG and currentCG, and return the result of the comparison. |
boolean |
completeContract(CG G1,
Concept E1,
CG G2,
Concept E2)
Contract G1 from G2, using the two entry concepts E1 for G1 and E2 for G2. |
boolean |
completeContract(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
Contract G1 from G2, using the two entry concepts E1 for G1 and E2 for G2. |
(package private) boolean |
constructG3(byte matchOperation,
CG G1,
java.lang.Object bindInf1,
CG G2,
java.lang.Object bindInf2,
CG G3)
The general case of the construction of G3 from G1 and G2. |
boolean |
contractTypeDefinition(CG cg,
Concept concept)
Contract from the specified cg the definition of the type of the specified concept. |
boolean |
contractTypeDefinition(CG cg,
Concept concept,
Type type)
Contract the definition of the specified Type from the CG cg, using the specified concept as the entry point for cg. |
boolean |
contractTypeDefinition(CG cg,
java.lang.Object bindInf,
Concept concept)
Contract from the specified cg the definition of the type of the specified concept. |
boolean |
contractTypeDefinition(CG cg,
java.lang.Object bindInf,
Concept concept,
Type type)
Contract the definition of the specified Type from the CG cg, using the specified concept as the entry point for cg. |
boolean |
contractTypeDefinition(CG cg,
Type type)
Contract the definition of the specified Type from the CG cg. |
CG |
copyWithMapping(CG ante,
CG consq)
End Code for Analogical Transfer |
java.util.Enumeration |
coveredBy(CG G1,
CG G2)
coveredBy determine which part of G1 (a subgraph S1) covers a part of G2 (a subgraph S2), i.e. |
java.util.Enumeration |
coveredBy(CG G1,
Concept E1,
CG G2,
Concept E2)
coveredBy determine which part of G1 (a subgraph S1) covers a part of G2 (a subgraph S2), i.e. |
java.util.Enumeration |
coveredBy(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
coveredBy determine which part of G1 (a subgraph S1) covers a part of G2 (a subgraph S2), i.e. |
(package private) void |
createG3FromG1(CG G1,
java.lang.Object bindInf1,
CG G3)
Start code for the first Step of maxJoinRslt : First : Create G3 from G1 create the squeleton of all the Concept of G3 from G1 to make sure later that the same concept is always refered by the same pointer. |
static boolean |
eqMatchConc(int range1,
int range2,
java.util.HashMap concsMatched)
|
boolean |
equal(CG G1,
CG G2)
Perform equal operation on CG g1 and CG g2 (no entry points are provided) |
boolean |
equal(CG G1,
Concept E1,
CG G2,
Concept E2)
Perform equal operation on CG g1 and CG g2 with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
boolean |
equal(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
Perform equal operation on CG g1 and CG g2 with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
CG |
expand(CG cg,
java.lang.Object bindInf,
Concept conc)
Expand the given CG cg by the definition of the concept type of the specified conc which should be a concept in cg. |
CG |
expand(CG cg,
java.lang.Object bindInf,
Relation rel)
Expand the CG cg by the definition of the relation type of rel which is a relation in cg. |
void |
finalize()
|
void |
generalise(CG G1,
CG G2)
While generalize() perform a generalization of two CGs and produce a new CG that is a common generalization of the two CGs, this method generalizes CG g1 itself by doing a generalization of CG g2 with g1 |
Concept |
generalise(CG G1,
Concept E1,
CG G2,
Concept E2)
While generalize() perform a generalization of two CGs and produce a new CG that is a common generalization of the two CGs, this method generalizes CG g1 itself by doing a generalization of CG g2 with g1, with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
Concept |
generalise(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
While generalize() perform a generalization of two CGs and produce a new CG that is a common generalization of the two CGs, this method generalizes CG g1 itself by doing a generalization of CG g2 with g1, with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
(package private) boolean |
generalise(CG G1,
java.lang.Object bindInf1,
CG G2,
java.lang.Object bindInf2)
Generalize G1 by generalizing concepts that were matched (by the content of the concept that result from the match/generalize) and by removing from G1 what is specific to it. |
CG |
generalize(CG G1,
CG G2)
This definition of generalize has two CG as input and produce the CG that result from the generalization of the two CGs (no entry points are provided) |
ResMatchCG |
generalize(CG G1,
Concept E1,
CG G2,
Concept E2)
Perform generalization operation on CG g1 and CG g2 with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
ResMatchCG |
generalize(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
Perform generalization operation on CG g1 and CG g2 with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
CG |
generalize(CG g1,
Type pertinentType1,
CG g2,
Type pertinentType2)
|
static boolean |
getCoerceDesignator()
|
java.util.HashMap |
getConceptsMatched()
|
CorefMatchList |
getCorefMatchL()
|
(package private) java.lang.Object |
getIndividual(Concept conc,
java.lang.Object bindInf)
|
Lexicon |
getLexicon()
|
Concept |
getMatchedConcept1(Concept conc)
Get the matched concept to the specified concept conc. conc is assumed to be from the first CG and the concept to return is from the second CG. |
Concept |
getMatchedConcept2(Concept conc)
Get the matched concept to the specified concept conc. conc is assumed to be from the second CG and the concept to return is from the first CG. |
Ontology |
getOntology()
|
static boolean |
getRelaxType()
|
(package private) Concept |
impliedByMapping(CG ante,
Concept conc3)
|
(package private) java.util.HashMap |
individualDesignator(CG g1,
CG g2)
|
(package private) boolean |
individualDesignator(CG G1,
java.lang.Object bindInfG1,
CG G2,
java.lang.Object bindInfG2,
ConcCouple concCple)
|
(package private) Individual |
individualDesignator(java.lang.Object ref,
java.lang.Object bindInf)
|
boolean |
isCanonic(CG cg,
java.lang.Object bindInf)
Check if the given cg is canonic : a) for each type (concept type or relation type) in cg, search its canon (if it has) and checks that the canon subsumes cg. |
(package private) boolean |
isCanonic(CG cgTarget,
java.lang.Object bindInf1,
Concept newConcept,
java.lang.Object bindInf2)
|
(package private) boolean |
isCanonic(CG cgTarget,
java.lang.Object bindInf1,
Relation newRelation,
java.lang.Object bindInf2)
|
(package private) boolean |
isConnectingRelation(CG cg,
Relation relation)
A relation is a connecting relation if its elimination would make the CG disconnected. |
boolean |
isInDescr(CS ontNode,
CG cg)
|
(package private) boolean |
isPossibleToJoin(byte matchOperation,
Concept concG1,
java.lang.Object bindInf1,
Concept concG2,
java.lang.Object bindInf2)
First check : if concG1 and concG2 have two income relations with the same type then it isnt possible to join since the resulted CG will not be functional If income relations of the two concepts are mutually different then the Second check is done; it is similar to the first except that is done on outcome relations. |
(package private) boolean |
localMatch(byte matchOperation,
Concept conc1,
java.lang.Object bindInf1,
Concept conc2,
java.lang.Object bindInf2)
|
ResMatchCG |
match(byte matchOperation,
CG G1,
Concept E1,
CG G2,
Concept E2)
This is the main method of this class. |
ResMatchCG |
match(byte matchOperation,
CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
This is the main method of this class. |
(package private) boolean |
matchCG(byte matchOperation,
CG G1,
java.lang.Object bindInf1,
CG G2,
java.lang.Object bindInf2,
int nbreRelsG1)
Establish the matching between the two CG according to matchOperation but without constructing the CG that result from the match. |
(package private) boolean |
matchConc(byte matchOperation,
Concept conc1,
java.lang.Object bindInf1,
Concept conc2,
java.lang.Object bindInf2)
|
(package private) boolean |
matchConc1(byte matchOperation,
Concept conc1,
java.lang.Object bindInf1,
Concept conc2,
java.lang.Object bindInf2)
|
protected boolean |
matchConcept(byte matchOperation,
Concept conc1,
java.lang.Object bindInf1,
Concept conc2,
java.lang.Object bindInf2)
If the two concepts to match (conc1 and conc2) have been already matched, then nothing to do, else match the two concepts, add the result to conceptsMatched, and add a new entry to toLocalMatchs. |
(package private) boolean |
matchContexts(byte matchOperation,
java.lang.Object bindInf1,
java.lang.Object bindInf2)
Looking for all the embedded CGs of the two current CG and match them. |
(package private) boolean |
matchedCoref(byte matchOperation,
CG G1,
java.lang.Object bindInf1,
CG G2,
java.lang.Object bindInf2,
ConcCouple concCple)
|
protected boolean |
matchRelations(byte matchOperation,
java.lang.Object[] relations1,
java.lang.Object bindInf1,
java.lang.Object[] relations2,
java.lang.Object bindInf2,
boolean areIncomeRelations)
scan the list relations1 for all the relations that are not matched already (by looking at relationsMatched) and search corresponding relations in relations2 to match them. |
CG |
maximalJoin(CG G1,
CG G2)
This definition of MAXIMAL_JOIN has two CG as input and produce the CG that result from the MAXIMAL_JOIN (no entry points are provided) |
ResMatchCG |
maximalJoin(CG G1,
Concept E1,
CG G2,
Concept E2)
Perform maximal join operation on CG g1 and CG g2 with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
ResMatchCG |
maximalJoin(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
Perform maximal join operation on CG g1 and CG g2 with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
(package private) boolean |
maxJoinRslt(CG G1,
java.lang.Object bindInf1,
CG G2,
java.lang.Object bindInf2,
CG G3)
|
CG |
minimalGeneralize(CG g1,
CG g2)
|
(package private) boolean |
mutuallyDiffRels(java.util.Enumeration rels1,
java.lang.Object bindInf1,
java.lang.Object[] rels2,
java.lang.Object bindInf2)
Test for functional CG. |
static java.lang.String |
nameOfOper(byte matchOperation)
|
(package private) java.lang.Object |
objDesignator(java.lang.Object ref,
java.lang.Object bindInf)
|
static byte |
operInByte(java.lang.String idCGOper,
int nbrArgs)
|
boolean |
partialContract(CG G1,
Concept E1,
CG G2,
Concept E2)
Unlike completeContract which checks first that G1 subsumes G2, partialContract G1 from G2, using the two entry concepts E1 for G1 and E2 for G2, will check first that a subgraph of G1 subsumes a subgraph of G2. |
boolean |
partialContract(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
Unlike completeContract which checks first that G1 subsumes G2, partialContract G1 from G2, using the two entry concepts E1 for G1 and E2 for G2, will check first that a subgraph of G1 subsumes a subgraph of G2. |
boolean |
project(CG G1,
CG G2)
project checks if G1 is a subgraph of G2, according to the configuration (relational network) only. |
boolean |
project(CG G1,
Concept E1,
CG G2,
Concept E2)
project checks if G1 is a subgraph of G2, according to the configuration (relational network) only. |
(package private) static Concept |
rangeConc(int range,
Concept c1,
Concept c2,
Concept c3)
|
(package private) boolean |
removeDanglingRelation(java.lang.Object bindInf1,
CG cg2,
Relation relation,
java.lang.Object bindInf2)
A relation is dangling if either its source or target concept has no other relation and the "isolated" concept is not specific to cg; it can be recovered by definition expansion. |
(package private) void |
renameSpecCorefsOfG1(CG g1)
|
static void |
setCoerceDesignator(boolean coerce)
|
void |
setCorefMatchL(CorefMatchList crfMatchL)
|
(package private) AmineSet |
setDesignator(java.lang.Object ref,
java.lang.Object bindInf)
|
void |
setLexicon(Lexicon lex)
|
void |
setOntology(Ontology ont)
|
static void |
setRelaxType(boolean relxType)
|
protected void |
sleep()
|
boolean |
specialize(CG G1,
CG G2)
While maximalJoin() produces a new CG that is a maximalJoin of two CGs G1 and G2, this method specializes g1 itself by doing a maximalJoin of CG g2 to g1. |
Concept |
specialize(CG G1,
Concept E1,
CG G2,
Concept E2)
While maximalJoin() produces a new CG that is a maximalJoin of two CGs G1 and G2, this method specializes g1 itself by doing a maximalJoin of CG g2 to g1, with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
Concept |
specialize(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
While maximalJoin() produces a new CG that is a maximalJoin of two CGs G1 and G2, this method specializes g1 itself by doing a maximalJoin of CG g2 to g1, with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
(package private) boolean |
specialize(CG G1,
java.lang.Object bindInf1,
CG G2,
java.lang.Object bindInf2)
Specialize G1 by specializing concepts that were matched (by the content of the concept that result from the match/join) and by adding to G1 what is specific to G2. |
boolean |
specializeByExpansion(CG cg,
Concept concept)
specializeByExpansion performs the expansion in the specified cg itself; it does NOT create a new CG that represents the result of the expansion. |
boolean |
specializeByExpansion(CG cg,
java.lang.Object bindInf,
Concept concept)
specializeByExpansion performs the expansion in the specified cg itself; it does NOT create a new CG that represents the result of the expansion. |
protected void |
stopAnimation()
|
boolean |
subsume(CG G1,
CG G2)
Check that the first CG G1 subsumes (is more general than) the second CG G2. |
boolean |
subsume(CG G1,
Concept E1,
CG G2,
Concept E2)
Check that the first CG G1 subsumes (is more general than) the second CG G2. |
boolean |
subsume(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
Check that the first CG G1 subsumes (is more general than) the second CG G2. |
CG |
subsumeWithResult(CG G1,
CG G2)
Its use is similar to subsume except that the image of G1 in G2 is constructed; the image is a subgraph of G2 that is isomorphic to G1 modulo the subsumption constaint on the concepts (the concept in G1 should be more general than its image in G2). |
ResMatchCG |
subsumeWithResult(CG G1,
Concept E1,
CG G2,
Concept E2)
Its use is similar to subsume except that the image of G1 in G2 is constructed; the image is a subgraph of G2 that is isomorphic to G1 modulo the subsumption constaint on the concepts (the concept in G1 should be more general than its image in G2). |
ResMatchCG |
subsumeWithResult(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
Its use is similar to subsume except that the image of G1 in G2 is constructed; the image is a subgraph of G2 that is isomorphic to G1 modulo the subsumption constaint on the concepts (the concept in G1 should be more general than its image in G2). |
CG |
surfaceGeneralize(CG g1,
Concept e1,
CG g2,
Concept e2)
|
boolean |
unify(CG G1,
Concept E1,
java.lang.Object bindInf1,
CG G2,
Concept E2,
java.lang.Object bindInf2)
Perform unification operation of CG g1 and CG g2 with the concept E1 as an entry point for g1 and the concept E2 as an entry point for g2. |
boolean |
unify(CG G1,
java.lang.Object bindInf1,
CG G2,
java.lang.Object bindInf2)
Perform unification operation of CG g1 and CG g2 (no entry points are provided). |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean surfaceMatching
protected boolean animation
protected BindingContext bindContext
protected Lexicon lexicon
java.util.ArrayList toLocalMatchs
public java.util.HashMap conceptsMatched
public java.util.HashMap relationsMatched
Constructor Detail |
public CGOperations()
public CGOperations(BindingContext bindContext)
public CGOperations(BindingContext bindContext, boolean coerce, boolean relaxType)
Method Detail |
public static boolean getCoerceDesignator()
public static void setCoerceDesignator(boolean coerce)
public static boolean getRelaxType()
public static void setRelaxType(boolean relxType)
public Ontology getOntology()
public void setOntology(Ontology ont)
public Lexicon getLexicon()
public void setLexicon(Lexicon lex)
public CorefMatchList getCorefMatchL()
public void setCorefMatchL(CorefMatchList crfMatchL)
public java.util.HashMap getConceptsMatched()
public Concept getMatchedConcept1(Concept conc)
conc
- Concept from the first CG
public Concept getMatchedConcept2(Concept conc)
conc
- Concept from the second CG
public void finalize()
void clearAuxStrs()
void clearToLocalMatchs()
void clearCsMatched()
void clearRelsMatched()
public void clearCorefMatchL()
void clearMatchCGStrs(int oldLastElemIdx)
public static boolean bagInclusion(int nbreRelsG1, int nbreRelsG2, java.util.HashMap allRelsG1, java.util.HashMap allRelsG2)
public ResMatchCG match(byte matchOperation, CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
matchOperation
- specify the CG operation to perform : MAXIMAL_JOIN, GENERALIZE,
SPECIALIZE, GENERALISE, EQUAL, SUBSUME, SUBSUME_WITH_RSLT, and UNIFY.
Specific methods have been defined for these operations to avoid the
specification of the CG operation type (the parameter matchOperation), like
maximalJoin(), generalize(), equal(), subsume(), and subsumeWithResult().
More detail on the CG operation is given as we present the other methods,
in particular : match, matchCG, matchRelations, matchContexts and matchConcept.
Others related methods that are responsible for the construction of the result
(if a result should be constructed) are : isPossibleToJoin, constructG3
and the related methods specified in the commentary of constructG3.
G1
- is the first CGE1
- is the a concept in G1 that will be taken as the entry point,
E1 can be null, in this case on entry point is consideredbindInf1
- is the binding information for G1G2
- is the second CGE2
- is the a concept in G2 that will be taken as the entry point,
E2 can be null, in this case on entry point is consideredbindInf2
- is the binding information for G2
public ResMatchCG match(byte matchOperation, CG G1, Concept E1, CG G2, Concept E2)
matchOperation
- specify the CG operation to perform : MAXIMAL_JOIN, GENERALIZE,
SPECIALIZE, GENERALISE, EQUAL, SUBSUME, SUBSUME_WITH_RSLT, and UNIFY.
Specific methods have been defined for these operations to avoid the
specification of the CG operation type (the parameter matchOperation), like
maximalJoin(), generalize(), equal(), subsume(), and subsumeWithResult().
More detail on the CG operation is given as we present the other methods,
in particular : match, matchCG, matchRelations, matchContexts and matchConcept.
Others related methods that are responsible for the construction of the result
(if a result should be constructed) are : isPossibleToJoin, constructG3
and the related methods specified in the commentary of constructG3.G1
- is the first CGE1
- is the a concept in G1 that will be taken as the entry point,
E1 can be null, in this case on entry point is consideredG2
- is the second CGE2
- is the a concept in G2 that will be taken as the entry point,
E2 can be null, in this case on entry point is considered
public ResMatchCG maximalJoin(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1bindInf1
- is the binding information for G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2bindInf2
- is the binding information for G2
public ResMatchCG maximalJoin(CG G1, Concept E1, CG G2, Concept E2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2
public CG maximalJoin(CG G1, CG G2)
G1
- A CG to joinG2
- A CG to join
public Concept specialize(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- The CG to specializeE1
- Entry concept for G1. E1 is a (and should be) concept in G1bindInf1
- is the binding information for G1G2
- The CG to joinE2
- Entry concept for G2. E2 is a (and should be) concept in G2bindInf2
- is the binding information for G2
public Concept specialize(CG G1, Concept E1, CG G2, Concept E2)
G1
- The CG to specializeE1
- Entry concept for G1. E1 is a (and should be) concept in G1G2
- The CG to joinE2
- Entry concept for G2. E2 is a (and should be) concept in G2
public boolean specialize(CG G1, CG G2)
G1
- The CG to specializeG2
- The CG to join
public ResMatchCG generalize(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1bindInf1
- is the binding information for G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2bindInf2
- is the binding information for G2
public ResMatchCG generalize(CG G1, Concept E1, CG G2, Concept E2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2
public CG generalize(CG G1, CG G2)
G1
- A CG to generalizeG2
- A CG to generalize
public CG surfaceGeneralize(CG g1, Concept e1, CG g2, Concept e2)
public CG generalize(CG g1, Type pertinentType1, CG g2, Type pertinentType2)
public boolean analogy(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- The target CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1bindInf1
- is the binding information for G1G2
- The source CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2bindInf2
- is the binding information for G2
public boolean analogy(CG G1, Concept E1, CG G2, Concept E2)
G1
- The target CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1G2
- The the source CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2
public boolean analogy(CG G1, CG G2)
G1
- The target CGG2
- The source CG
public java.util.Enumeration coveredBy(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1bindInf1
- is the binding information for G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2bindInf2
- is the binding information for G2
public java.util.Enumeration coveredBy(CG G1, Concept E1, CG G2, Concept E2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2
public java.util.Enumeration coveredBy(CG G1, CG G2)
G1
- The first CGG2
- The second CG
public CompareCGResult compare(CG cg1, Concept entryPoint1, CG cg2, Concept entryPoint2) throws java.lang.Exception
- the two CG are equal if: the matched concepts are equal, the same number of concepts
and the same number of relations (and all the relations have been matched).
- else, newCG is more general than G2 if: the number of concepts of newCG is equal to
the number of matched concepts, and the number of relations of newCG is equal to the number of matched relations, and the matched concepts are equals to the corresponding concepts in newCG.
- else, newCG is more specific than G2 if: the number of concepts of currentCG is equal to
the number of matched concepts, and the number of relations of currentCG is equal to the number of matched relations, and the matched concepts are equals to the corresponding concepts in currentCG.
- else, newCG and currentCG have common information is the result of the generalization is not null and it doesn't correspond to the specified fatherOntNode or to its description.
cg1
- a CG to compare with cg2entryPoint1
- Entry concept for cg1. entryPoint1 is a (and should be) concept in cg1cg2
- a CG to compare with cg1entryPoint2
- Entry concept for cg2. entryPoint2 is a (and should be) concept in cg2
java.lang.Exception
- if some problems occur during the comparisonpublic CompareCGResult compareCG(CG newCG, Concept entryPoint, CG currentCG, CS fatherOntNode) throws java.lang.Exception
- the two CG are equal if: the matched concepts are equal, the same number of concepts
and the same number of relations (and all the relations have been matched).
- else, newCG is more general than G2 if: the number of concepts of newCG is equal to
the number of matched concepts, and the number of relations of newCG is equal to the number of matched relations, and the matched concepts are equals to the corresponding concepts in newCG.
- else, newCG is more specific than G2 if: the number of concepts of currentCG is equal to
the number of matched concepts, and the number of relations of currentCG is equal to the number of matched relations, and the matched concepts are equals to the corresponding concepts in currentCG.
- else, newCG and currentCG have common information is the result of the generalization is not null and it doesn't correspond to the specified fatherOntNode or to its description.
newCG
- entryPoint
- currentCG
- fatherOntNode
-
java.lang.Exception
public CG minimalGeneralize(CG g1, CG g2)
java.util.HashMap individualDesignator(CG g1, CG g2)
public Concept generalise(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- The CG to generalizeE1
- Entry concept for G1. E1 is a (and should be) concept in G1bindInf1
- is the binding information for G1G2
- A CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2bindInf2
- is the binding information for G2
public Concept generalise(CG G1, Concept E1, CG G2, Concept E2)
G1
- The CG to generalizeE1
- Entry concept for G1. E1 is a (and should be) concept in G1G2
- A CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2
public void generalise(CG G1, CG G2)
G1
- The CG to generalizeG2
- A CGpublic boolean equal(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1bindInf1
- is the binding information for G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2bindInf2
- is the binding information for G2
public boolean equal(CG G1, Concept E1, CG G2, Concept E2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2
public boolean equal(CG G1, CG G2)
G1
- A CGG2
- A CG
public boolean unify(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- The first CGE1
- A concept in G1 that plays the role of an entry pointbindInf1
- The Binding information for G1G2
- The second CGE2
- A concept in G2 that plays the role of an entry pointbindInf2
- The Binding information for G2
public boolean unify(CG G1, java.lang.Object bindInf1, CG G2, java.lang.Object bindInf2)
G1
- A CGbindInf1
- The Binding information for G1G2
- A CGbindInf2
- The Binding information for G2
public boolean subsume(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1bindInf1
- The Binding information for G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2bindInf2
- The Binding information for G2
public boolean subsume(CG G1, Concept E1, CG G2, Concept E2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2
public boolean subsume(CG G1, CG G2)
G1
- The first CGG2
- The second CG
public ResMatchCG subsumeWithResult(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1bindInf1
- The Binding information for G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2bindInf2
- The Binding information for G2
public ResMatchCG subsumeWithResult(CG G1, Concept E1, CG G2, Concept E2)
G1
- The first CGE1
- Entry concept for G1. E1 is a (and should be) concept in G1G2
- The second CGE2
- Entry concept for G2. E2 is a (and should be) concept in G2
public CG subsumeWithResult(CG G1, CG G2)
G1
- The first CGG2
- The second CG
public boolean project(CG G1, Concept E1, CG G2, Concept E2)
G1
- CGE1
- ConceptG2
- CGE2
- Concept
public boolean project(CG G1, CG G2)
G1
- CGG2
- CG
public CG expand(CG cg, java.lang.Object bindInf, Concept conc)
cg
- A CG to expandbindInf
- The bindinf information related to cgconc
- The Concept in cg that contains the type to expand
public CG expand(CG cg, java.lang.Object bindInf, Relation rel)
cg
- A CG to expandbindInf
- The bindinf information related to cgrel
- The relation in cg that contains the type to expand
public boolean specializeByExpansion(CG cg, java.lang.Object bindInf, Concept concept)
cg
- A CG to specialize by expansionbindInf
- The bindinf information related to cgconcept
- The Concept in cg that contains the type to expand
public boolean specializeByExpansion(CG cg, Concept concept)
cg
- A CG to specialize by expansionconcept
- The Concept in cg that contains the type to expand
public boolean contractTypeDefinition(CG cg, java.lang.Object bindInf, Concept concept, Type type)
cg
- A CG to contractbindInf
- Binding information for cgconcept
- A concept that should be contained in cgtype
- A type that should replace the contracted definition
public boolean contractTypeDefinition(CG cg, Concept concept, Type type)
cg
- A CG to contractconcept
- A concept that should be contained in cgtype
- A type that should replace the contracted definition
public boolean contractTypeDefinition(CG cg, Type type)
cg
- A CG to contracttype
- A type that should replace the contracted definition
public boolean contractTypeDefinition(CG cg, java.lang.Object bindInf, Concept concept)
cg
- A CG to contractbindInf
- Binding information for cgconcept
- A concept that should be contained in cg
public boolean contractTypeDefinition(CG cg, Concept concept)
cg
- A CG to contractconcept
- A concept that should be contained in cg
public boolean completeContract(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- A CGE1
- A Concept from G1 that play the role of an entry point for G1bindInf1
- Binding information for G1G2
- A CGE2
- A Concept from G2 that play the role of an entry point for G2bindInf2
- Binding information for G2
public boolean completeContract(CG G1, Concept E1, CG G2, Concept E2)
G1
- A CGE1
- A Concept from G1 that play the role of an entry point for G1G2
- A CGE2
- A Concept from G2 that play the role of an entry point for G2
public boolean partialContract(CG G1, Concept E1, java.lang.Object bindInf1, CG G2, Concept E2, java.lang.Object bindInf2)
G1
- A CGE1
- A Concept from G1 that play the role of an entry point for G1G2
- A CGE2
- A Concept from G2 that play the role of an entry point for G2
public boolean partialContract(CG G1, Concept E1, CG G2, Concept E2)
G1
- A CGE1
- A Concept from G1 that play the role of an entry point for G1G2
- A CGE2
- A Concept from G2 that play the role of an entry point for G2
public boolean isCanonic(CG cg, java.lang.Object bindInf)
cg
- A CGbindInf
- Binding information for cg
boolean matchCG(byte matchOperation, CG G1, java.lang.Object bindInf1, CG G2, java.lang.Object bindInf2, int nbreRelsG1)
boolean localMatch(byte matchOperation, Concept conc1, java.lang.Object bindInf1, Concept conc2, java.lang.Object bindInf2)
protected boolean matchRelations(byte matchOperation, java.lang.Object[] relations1, java.lang.Object bindInf1, java.lang.Object[] relations2, java.lang.Object bindInf2, boolean areIncomeRelations)
boolean matchContexts(byte matchOperation, java.lang.Object bindInf1, java.lang.Object bindInf2)
protected boolean matchConcept(byte matchOperation, Concept conc1, java.lang.Object bindInf1, Concept conc2, java.lang.Object bindInf2)
protected void animateConcept(int ind, Concept concept, boolean mode)
protected void animateRelation(int ind, Relation relation, boolean mode)
protected void stopAnimation()
boolean matchConc(byte matchOperation, Concept conc1, java.lang.Object bindInf1, Concept conc2, java.lang.Object bindInf2)
boolean matchConc1(byte matchOperation, Concept conc1, java.lang.Object bindInf1, Concept conc2, java.lang.Object bindInf2)
boolean individualDesignator(CG G1, java.lang.Object bindInfG1, CG G2, java.lang.Object bindInfG2, ConcCouple concCple)
Individual individualDesignator(java.lang.Object ref, java.lang.Object bindInf)
AmineSet setDesignator(java.lang.Object ref, java.lang.Object bindInf)
java.lang.Object objDesignator(java.lang.Object ref, java.lang.Object bindInf)
java.lang.Object getIndividual(Concept conc, java.lang.Object bindInf)
boolean matchedCoref(byte matchOperation, CG G1, java.lang.Object bindInf1, CG G2, java.lang.Object bindInf2, ConcCouple concCple)
protected void sleep()
boolean isPossibleToJoin(byte matchOperation, Concept concG1, java.lang.Object bindInf1, Concept concG2, java.lang.Object bindInf2)
boolean mutuallyDiffRels(java.util.Enumeration rels1, java.lang.Object bindInf1, java.lang.Object[] rels2, java.lang.Object bindInf2)
boolean constructG3(byte matchOperation, CG G1, java.lang.Object bindInf1, CG G2, java.lang.Object bindInf2, CG G3)
boolean maxJoinRslt(CG G1, java.lang.Object bindInf1, CG G2, java.lang.Object bindInf2, CG G3)
void createG3FromG1(CG G1, java.lang.Object bindInf1, CG G3)
boolean specialize(CG G1, java.lang.Object bindInf1, CG G2, java.lang.Object bindInf2)
G1
- The CG to specializebindInf1
- binding information for G1G2
- The CG to join to G1 (i.e. used for the specialization of G1)bindInf2
- binding information for G2
void renameSpecCorefsOfG1(CG g1)
boolean addSpcfcG2ToGx(CG G2, java.lang.Object bindInf2, CG Gx, java.util.HashMap c2cx)
boolean analogicalTransfer(CG cgTarget, java.lang.Object bindInf1, CG cgSource, java.lang.Object bindInf2)
boolean isCanonic(CG cgTarget, java.lang.Object bindInf1, Concept newConcept, java.lang.Object bindInf2)
boolean isCanonic(CG cgTarget, java.lang.Object bindInf1, Relation newRelation, java.lang.Object bindInf2)
Concept analogicalCopy(Concept c2, java.lang.Object bindInf)
Concept analogicalCoref(Concept conc, java.lang.Object bindInf)
public CG copyWithMapping(CG ante, CG consq)
Concept impliedByMapping(CG ante, Concept conc3)
boolean commonRslt(CG G1, java.lang.Object bindInf1, CG G3)
boolean generalise(CG G1, java.lang.Object bindInf1, CG G2, java.lang.Object bindInf2)
G1
- The CG to generalizebindInf1
- binding information for G1G2
- The CG that will generalize G1bindInf2
- binding information for G2
boolean removeDanglingRelation(java.lang.Object bindInf1, CG cg2, Relation relation, java.lang.Object bindInf2)
relation
- A Relation
boolean isConnectingRelation(CG cg, Relation relation)
relation
- A Relation to check
public static java.lang.String nameOfOper(byte matchOperation)
public static byte operInByte(java.lang.String idCGOper, int nbrArgs)
public boolean isInDescr(CS ontNode, CG cg)
public static boolean eqMatchConc(int range1, int range2, java.util.HashMap concsMatched)
static Concept rangeConc(int range, Concept c1, Concept c2, Concept c3)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |