| Package | Description |
|---|---|
| amie.data | |
| amie.mining | |
| amie.mining.assistant | |
| amie.rules | |
| javatools.datatypes |
| Modifier and Type | Field and Description |
|---|---|
static ByteString |
KB.DIFFERENTFROMbs
(X differentFrom Y Z ...) predicate
|
static ByteString |
KB.EQUALSbs
(X equals Y Z ...) predicate
|
static ByteString |
KB.EXISTSbs
r(X, y') exists for some y', predicate
|
static ByteString |
KB.EXISTSINVbs
r(y', X) exists for some y', predicate
|
| Modifier and Type | Method and Description |
|---|---|
static ByteString |
KB.compress(java.lang.CharSequence s)
Compresses a string to an internal string
|
static ByteString |
U.getRelationDomain(KB source,
ByteString relation)
Returns the domain of a given relation in a knowledge base
|
static ByteString |
U.getRelationRange(KB source,
ByteString relation)
Returns the range of a given relation in a knowledge base.
|
static ByteString[] |
KB.triple(ByteString... triple)
Makes a triple
|
static ByteString[] |
KB.triple(java.lang.CharSequence... triple)
Makes a triple
|
static ByteString[] |
KB.triple(java.lang.String s)
Parses a triple of the form r(x,y) and turns into a triple
of the form [x, r, y]
|
static ByteString[] |
KB.triple2Array(Triple<ByteString,ByteString,ByteString> t) |
| Modifier and Type | Method and Description |
|---|---|
static Triple<ByteString,ByteString,ByteString> |
KB.array2Triple(ByteString[] triple) |
static Triple<ByteString,ByteString,ByteString> |
KB.array2Triple(ByteString[] triple) |
static Triple<ByteString,ByteString,ByteString> |
KB.array2Triple(ByteString[] triple) |
protected IntHashMap<ByteString> |
KB.countBindings(int pos,
ByteString... triple)
Counts, for each binding of the variable at position pos, the number of
instantiations of the triple
|
IntHashMap<ByteString> |
KB.countProjectionBindings(ByteString[] projectionTriple,
java.util.List<ByteString[]> otherTriples,
ByteString variable)
For each instantiation of variable, it returns the number of instances of
the projectionTriple satisfy the query.
|
IntHashMap<ByteString> |
KB.countProjectionBindings(java.lang.CharSequence[] projectionTriple,
java.util.List<java.lang.CharSequence[]> query,
java.lang.CharSequence variable)
Counts, for each binding of the variable the number of instantiations of
the projection triple
|
protected IntHashMap<ByteString> |
KB.countProjectionBindings(int pos,
ByteString[] projectionTriple,
java.util.List<ByteString[]> otherTriples)
Counts for each binding of the variable at pos how many instances of the
projection triple exist in the query
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.difference(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.difference(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.difference(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
java.util.List<ByteString[]> headList)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.difference(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
java.util.List<ByteString[]> headList)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Set<ByteString> |
KB.difference(ByteString projectionVariable,
java.util.List<ByteString[]> antecedent,
java.util.List<ByteString[]> head)
It returns all the bindings of the projection variable that match
the antecedent but not the succedent.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head,
boolean swap)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head,
boolean swap)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head,
boolean swap)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head,
boolean swap)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.difference(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Set<ByteString> |
KB.difference(java.lang.CharSequence projectionVariable,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
It returns all the bindings of the projection variable that match
the antecedent but not the head.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.differenceNotVarsInCommon(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
It performs set difference for the case where the head contains 2 out of the 4 variables
defined in the body.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.differenceNotVarsInCommon(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
It performs set difference for the case where the head contains 2 out of the 4 variables
defined in the body.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.differenceNotVarsInCommon(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
It performs set difference for the case where the head contains 2 out of the 4 variables
defined in the body.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.differenceNotVarsInCommon(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
It performs set difference for the case where the head contains 2 out of the 4 variables
defined in the body.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.differenceNotVarsInCommon(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
It performs set difference for the case where the head contains 2 out of the 4 variables
defined in the body.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.differenceNotVarsInCommon(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
It performs set difference for the case where the head contains 2 out of the 4 variables
defined in the body.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.differenceNotVarsInCommon(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
It performs set difference for the case where the head contains 2 out of the 4 variables
defined in the body.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.differenceNotVarsInCommon(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
It performs set difference for the case where the head contains 2 out of the 4 variables
defined in the body.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.differenceNoVarsInCommon(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.differenceNoVarsInCommon(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.differenceNoVarsInCommon(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.differenceNoVarsInCommon(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.util.List<? extends java.lang.CharSequence[]> antecedent,
java.lang.CharSequence[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
IntHashMap<ByteString> |
KB.frequentBindingsOf(ByteString variable,
ByteString projectionVariable,
java.util.List<ByteString[]> query)
For each instantiation of variable, it returns the number of different
instances of projectionVariable that satisfy the query.
|
IntHashMap<ByteString> |
KB.frequentBindingsOf(java.lang.CharSequence variable,
java.lang.CharSequence projectionVariable,
java.util.List<java.lang.CharSequence[]> query)
Maps each value of the variable to the number of distinct values of the
projection variable
|
protected java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key)
It returns the second and third level values of a map given the keys for the first
level.
|
protected java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key)
It returns the second and third level values of a map given the keys for the first
level.
|
protected IntHashMap<ByteString> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key1,
ByteString key2)
It returns the third level values of a map given the keys for the first
and second level.
|
static java.util.Set<ByteString> |
U.getAllEntitiesForType(KB source,
ByteString type)
It returns all the instances of a given type.
|
static java.util.Set<ByteString> |
U.getAllSuperTypes(KB source,
ByteString type)
It returns all the supertypes of a given type.
|
static java.util.Set<ByteString> |
U.getAllTypesForEntity(KB source,
ByteString entity)
It returns all the types of a given entity.
|
static java.util.Set<ByteString> |
U.getDomainSet(KB source,
ByteString relation)
Gets all the entities of the type of the given relation's domain.
|
static java.util.Set<ByteString> |
U.getLeafTypesForEntity(KB source,
ByteString entity)
It returns the most specific types of an entity according to the type hierarchy
of the knowledge base.
|
static java.util.Set<ByteString> |
U.getMaterializedTypesForEntity(KB source,
ByteString entity)
It returns all the materialized types of an entity in a knowledge base.
|
static java.util.Set<ByteString> |
U.getRangeSet(KB source,
ByteString relation)
Gets all the entities of the type of the given relation's range.
|
java.util.Collection<ByteString> |
KB.getRelations()
Get a collection with all the relations of the KB.
|
IntHashMap<ByteString> |
KB.getRelationsBiggerOrEqualThan(int threshold)
Return all the relations (and their sizes) that are bigger than the given
threshold.
|
java.util.List<ByteString> |
KB.getRelationsList()
Get a list of the relations of the KB.
|
static java.util.Set<ByteString> |
U.getSuperTypes(KB source,
ByteString type)
It returns all the immediate super-types of a given type.
|
protected IntHashMap<ByteString> |
KB.resultsOneVariable(ByteString... triple)
Returns the results of the triple pattern query, if it contains exactly 1
variable
|
java.util.Set<ByteString> |
KB.resultsOneVariable(java.lang.CharSequence... triple)
Returns the results of the triple pattern query, if it contains exactly 1
variable
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.resultsThreeVariables(ByteString var1,
ByteString var2,
ByteString var3,
ByteString[] triple)
Returns the results of a triple query pattern with three variables as
a nested map, firstValue : {secondValue : thirdValue}.
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.resultsThreeVariables(ByteString var1,
ByteString var2,
ByteString var3,
ByteString[] triple)
Returns the results of a triple query pattern with three variables as
a nested map, firstValue : {secondValue : thirdValue}.
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.resultsThreeVariables(ByteString var1,
ByteString var2,
ByteString var3,
ByteString[] triple)
Returns the results of a triple query pattern with three variables as
a nested map, firstValue : {secondValue : thirdValue}.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(ByteString var1,
ByteString var2,
ByteString[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(ByteString var1,
ByteString var2,
ByteString[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(int pos1,
int pos2,
ByteString[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(int pos1,
int pos2,
ByteString[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(int pos1,
int pos2,
java.lang.CharSequence[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(int pos1,
int pos2,
java.lang.CharSequence[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
ByteString var5,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
ByteString var5,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
ByteString var5,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
ByteString var5,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
ByteString var5,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> query)
Returns all (distinct) pairs of values that make the query true
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> query)
Returns all (distinct) pairs of values that make the query true
|
java.util.Set<ByteString> |
KB.selectDistinct(ByteString variable,
java.util.List<ByteString[]> query)
returns the instances that fulfill a certain condition
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.lang.CharSequence var5,
java.util.List<? extends java.lang.CharSequence[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.lang.CharSequence var5,
java.util.List<? extends java.lang.CharSequence[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.lang.CharSequence var5,
java.util.List<? extends java.lang.CharSequence[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.lang.CharSequence var5,
java.util.List<? extends java.lang.CharSequence[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.lang.CharSequence var5,
java.util.List<? extends java.lang.CharSequence[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.lang.CharSequence var4,
java.util.List<? extends java.lang.CharSequence[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.util.List<? extends java.lang.CharSequence[]> query)
Return all triplets of values that make the query true
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.util.List<? extends java.lang.CharSequence[]> query)
Return all triplets of values that make the query true
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.lang.CharSequence var3,
java.util.List<? extends java.lang.CharSequence[]> query)
Return all triplets of values that make the query true
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.util.List<? extends java.lang.CharSequence[]> query)
Returns all (distinct) pairs of values that make the query true
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.selectDistinct(java.lang.CharSequence var1,
java.lang.CharSequence var2,
java.util.List<? extends java.lang.CharSequence[]> query)
Returns all (distinct) pairs of values that make the query true
|
java.util.Set<ByteString> |
KB.selectDistinct(java.lang.CharSequence variable,
java.util.List<java.lang.CharSequence[]> query)
returns the instances that fulfill a certain condition
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
KB.add(ByteString... fact)
Adds a fact to the KB
|
protected boolean |
KB.add(ByteString subject,
ByteString relation,
ByteString object)
Adds a fact to the KB
|
protected boolean |
KB.add(ByteString subject,
ByteString relation,
ByteString object,
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map)
Methods to add single facts to the KB
|
static Triple<ByteString,ByteString,ByteString> |
KB.array2Triple(ByteString[] triple) |
double |
KB.colFunctionality(ByteString relation,
KB.Column col)
Functionality of a relation given the position.
|
protected boolean |
KB.contains(ByteString... fact)
It returns TRUE if the database contains this fact (no variables).
|
protected long |
KB.count(ByteString... triple)
returns number of instances of this triple
|
protected IntHashMap<ByteString> |
KB.countBindings(int pos,
ByteString... triple)
Counts, for each binding of the variable at position pos, the number of
instantiations of the triple
|
long |
KB.countDistinct(ByteString variable,
java.util.List<ByteString[]> query)
returns the number of instances that fulfill a certain condition
|
long |
KB.countDistinctPairs(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> query)
returns the number of distinct pairs (var1,var2) for the query
|
protected long |
KB.countOneVariable(ByteString... triple)
Returns the number of distinct results of the triple pattern query
with 1 variable.
|
long |
KB.countPairs(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> query,
int[] queryInfo) |
long |
KB.countPairs(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> query,
int[] queryInfo,
ByteString[] existentialTriple,
int nonExistentialPosition) |
long |
KB.countPairs(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> query,
int[] queryInfo,
ByteString[] existentialTriple,
int nonExistentialPosition) |
long |
KB.countProjection(ByteString[] projectionTriple,
java.util.List<ByteString[]> otherTriples)
Counts the number of instances of the projection triple that exist in
joins with the other triples
|
IntHashMap<ByteString> |
KB.countProjectionBindings(ByteString[] projectionTriple,
java.util.List<ByteString[]> otherTriples,
ByteString variable)
For each instantiation of variable, it returns the number of instances of
the projectionTriple satisfy the query.
|
IntHashMap<ByteString> |
KB.countProjectionBindings(ByteString[] projectionTriple,
java.util.List<ByteString[]> otherTriples,
ByteString variable)
For each instantiation of variable, it returns the number of instances of
the projectionTriple satisfy the query.
|
protected IntHashMap<ByteString> |
KB.countProjectionBindings(int pos,
ByteString[] projectionTriple,
java.util.List<ByteString[]> otherTriples)
Counts for each binding of the variable at pos how many instances of the
projection triple exist in the query
|
protected long |
KB.countTwoVariables(ByteString... triple)
Returns the number of distinct results of the triple pattern query
with 2 variables.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.difference(ByteString var1,
ByteString var2,
ByteString var3,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.difference(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.difference(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.difference(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
java.util.List<ByteString[]> headList)
Bindings of the projection variables that satisfy the first list of atoms
but not the second.
|
java.util.Set<ByteString> |
KB.difference(ByteString projectionVariable,
java.util.List<ByteString[]> antecedent,
java.util.List<ByteString[]> head)
It returns all the bindings of the projection variable that match
the antecedent but not the succedent.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.differenceNotVarsInCommon(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
It performs set difference for the case where the head contains 2 out of the 4 variables
defined in the body.
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.differenceNotVarsInCommon(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
It performs set difference for the case where the head contains 2 out of the 4 variables
defined in the body.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.differenceNoVarsInCommon(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.differenceNoVarsInCommon(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> antecedent,
ByteString[] head)
Bindings of the projection variables that satisfy the first list of atoms
but not the atom 'head'.
|
static boolean |
KB.differentFrom(ByteString... triple)
It returns TRUE if the 0th component is different from the 2n, 3rd, 4th, etc.
|
static boolean |
KB.equalTo(ByteString... triple)
It returns TRUE if the 0th component is different from the 2n, 3rd, 4th, etc.
|
int |
KB.firstVariableInCommon(ByteString[] t1,
ByteString[] t2)
Returns the in the first atom, of the first variable that is found on the
second atom.
|
int |
KB.firstVariableInCommon(ByteString[] t1,
ByteString[] t2)
Returns the in the first atom, of the first variable that is found on the
second atom.
|
static int |
KB.firstVariablePos(ByteString... fact)
Returns the position of the first variable in the pattern
|
IntHashMap<ByteString> |
KB.frequentBindingsOf(ByteString variable,
ByteString projectionVariable,
java.util.List<ByteString[]> query)
For each instantiation of variable, it returns the number of different
instances of projectionVariable that satisfy the query.
|
double |
KB.functionality(ByteString relation)
It returns the harmonic functionality of a relation, as defined in the PARIS paper
https://www.lri.fr/~cr/Publications_Master_2013/Brigitte_Safar/p157_fabianmsuchanek_vldb2011.pdf
|
double |
KB.functionality(ByteString relation,
boolean inversed)
It returns the functionality or the inverse functionality of a relation.
|
protected java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key)
It returns the second and third level values of a map given the keys for the first
level.
|
protected IntHashMap<ByteString> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key1,
ByteString key2)
It returns the third level values of a map given the keys for the first
and second level.
|
static java.util.Set<ByteString> |
U.getAllEntitiesForType(KB source,
ByteString type)
It returns all the instances of a given type.
|
static java.util.Set<ByteString> |
U.getAllSuperTypes(KB source,
ByteString type)
It returns all the supertypes of a given type.
|
static java.util.Set<ByteString> |
U.getAllTypesForEntity(KB source,
ByteString entity)
It returns all the types of a given entity.
|
static java.util.Set<ByteString> |
U.getDomainSet(KB source,
ByteString relation)
Gets all the entities of the type of the given relation's domain.
|
static java.util.Set<ByteString> |
U.getLeafTypesForEntity(KB source,
ByteString entity)
It returns the most specific types of an entity according to the type hierarchy
of the knowledge base.
|
static java.util.Set<ByteString> |
U.getMaterializedTypesForEntity(KB source,
ByteString entity)
It returns all the materialized types of an entity in a knowledge base.
|
static java.util.Set<ByteString> |
U.getRangeSet(KB source,
ByteString relation)
Gets all the entities of the type of the given relation's range.
|
static ByteString |
U.getRelationDomain(KB source,
ByteString relation)
Returns the domain of a given relation in a knowledge base
|
static ByteString |
U.getRelationRange(KB source,
ByteString relation)
Returns the range of a given relation in a knowledge base.
|
static java.util.Set<ByteString> |
U.getSuperTypes(KB source,
ByteString type)
It returns all the immediate super-types of a given type.
|
java.util.List<ByteString[]> |
KB.Instantiator.instantiate(ByteString value) |
double |
KB.inverseFunctionality(ByteString relation)
Returns the harmonic inverse functionality, as defined in the PARIS paper
https://www.lri.fr/~cr/Publications_Master_2013/Brigitte_Safar/p157_fabianmsuchanek_vldb2011.pdf
|
double |
KB.inverseFunctionality(ByteString relation,
boolean inversed)
It returns the functionality or the inverse functionality of a relation.
|
boolean |
KB.isFunctional(ByteString relation)
Determines whether a relation is functional, i.e., its harmonic functionality
is greater than its inverse harmonic functionality.
|
static boolean |
U.isLeafDatatype(KB source,
ByteString type)
Determines whether a given type is specific, that is, it does not have subclasses.
|
protected int |
KB.mostRestrictiveTriple(java.util.List<ByteString[]> triples,
ByteString variable)
It returns the index of the most restrictive triple among those that contain the given variable,
-1 if most restrictive has count 0.
|
protected int |
KB.mostRestrictiveTriple(java.util.List<ByteString[]> triples,
ByteString var1,
ByteString var2)
It returns the index of the most restrictive triple among those that contain the given variables,
-1 if most restrictive has count 0.
|
int |
KB.numVarsInCommon(ByteString[] a,
ByteString[] b)
Return the number of common variables between 2 atoms.
|
int |
KB.numVarsInCommon(ByteString[] a,
ByteString[] b)
Return the number of common variables between 2 atoms.
|
int |
KB.overlap(ByteString relation1,
ByteString relation2,
int overlap)
Given two relations, it returns the number of entities in common (the overlap) between
two of their columns
|
int |
KB.relationColumnSize(ByteString relation,
KB.Column column)
It returns the number of distinct instance of one of the arguments (columns)
of a relation.
|
int |
KB.relationSize(ByteString relation)
It returns the number of facts of a relation in the KB.
|
protected IntHashMap<ByteString> |
KB.resultsOneVariable(ByteString... triple)
Returns the results of the triple pattern query, if it contains exactly 1
variable
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.resultsThreeVariables(ByteString var1,
ByteString var2,
ByteString var3,
ByteString[] triple)
Returns the results of a triple query pattern with three variables as
a nested map, firstValue : {secondValue : thirdValue}.
|
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.resultsThreeVariables(ByteString var1,
ByteString var2,
ByteString var3,
ByteString[] triple)
Returns the results of a triple query pattern with three variables as
a nested map, firstValue : {secondValue : thirdValue}.
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(ByteString var1,
ByteString var2,
ByteString[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(ByteString var1,
ByteString var2,
ByteString[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values
|
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.resultsTwoVariables(int pos1,
int pos2,
ByteString[] triple)
Returns the results of a triple query pattern with two variables as a map
of first value to set of second values
|
static int |
KB.secondVariablePos(ByteString... fact)
Returns the position of the second variable in the pattern
|
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
ByteString var5,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
ByteString var4,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
ByteString var3,
java.util.List<ByteString[]> query) |
java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.selectDistinct(ByteString var1,
ByteString var2,
java.util.List<ByteString[]> query)
Returns all (distinct) pairs of values that make the query true
|
java.util.Set<ByteString> |
KB.selectDistinct(ByteString variable,
java.util.List<ByteString[]> query)
returns the instances that fulfill a certain condition
|
static ByteString[] |
KB.triple(ByteString... triple)
Makes a triple
|
static java.util.List<ByteString[]> |
KB.triples(ByteString[]... triples)
Makes a list of triples
|
static int |
KB.varpos(ByteString var,
ByteString[] triple)
Returns the position of a variable in a triple.
|
static int |
KB.varpos(ByteString var,
ByteString[] triple)
Returns the position of a variable in a triple.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
KB.add(ByteString subject,
ByteString relation,
ByteString object,
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map)
Methods to add single facts to the KB
|
protected boolean |
KB.add(ByteString subject,
ByteString relation,
ByteString object,
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map)
Methods to add single facts to the KB
|
protected boolean |
KB.add(ByteString subject,
ByteString relation,
ByteString object,
java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map)
Methods to add single facts to the KB
|
static long |
KB.aggregate(java.util.Map<ByteString,IntHashMap<ByteString>> bindings)
Counts the number of bindings in the given nested map.
|
static long |
KB.aggregate(java.util.Map<ByteString,IntHashMap<ByteString>> bindings)
Counts the number of bindings in the given nested map.
|
protected java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key)
It returns the second and third level values of a map given the keys for the first
level.
|
protected java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key)
It returns the second and third level values of a map given the keys for the first
level.
|
protected java.util.Map<ByteString,IntHashMap<ByteString>> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key)
It returns the second and third level values of a map given the keys for the first
level.
|
protected IntHashMap<ByteString> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key1,
ByteString key2)
It returns the third level values of a map given the keys for the first
and second level.
|
protected IntHashMap<ByteString> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key1,
ByteString key2)
It returns the third level values of a map given the keys for the first
and second level.
|
protected IntHashMap<ByteString> |
KB.get(java.util.Map<ByteString,java.util.Map<ByteString,IntHashMap<ByteString>>> map,
ByteString key1,
ByteString key2)
It returns the third level values of a map given the keys for the first
and second level.
|
static ByteString[] |
KB.triple2Array(Triple<ByteString,ByteString,ByteString> t) |
static ByteString[] |
KB.triple2Array(Triple<ByteString,ByteString,ByteString> t) |
static ByteString[] |
KB.triple2Array(Triple<ByteString,ByteString,ByteString> t) |
| Constructor and Description |
|---|
Instantiator(java.util.List<ByteString[]> q,
ByteString var) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<ByteString> |
AMIE.getSeeds() |
| Modifier and Type | Method and Description |
|---|---|
void |
AMIE.setSeeds(java.util.Collection<ByteString> seeds) |
| Modifier and Type | Field and Description |
|---|---|
protected ByteString |
MiningAssistant.subPropertyString
Subproperty keyword
|
protected ByteString |
MiningAssistant.typeString
Type keyword
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Collection<ByteString> |
MiningAssistant.bodyExcludedRelations
List of excluded relations for the body of rules;
|
protected java.util.Collection<ByteString> |
MiningAssistant.bodyTargetRelations
List of target relations for the body of rules;
|
protected java.util.Map<Pair<ByteString,java.lang.Boolean>,java.lang.Long> |
DefaultMiningAssistant.hardQueries
Store counts for hard queries
|
protected java.util.Collection<ByteString> |
MiningAssistant.headExcludedRelations
List of excluded relations for the head of rules;
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<ByteString> |
MiningAssistant.getBodyExcludedRelations() |
java.util.Collection<ByteString> |
MiningAssistant.getBodyTargetRelations() |
java.util.Collection<ByteString> |
MiningAssistant.getHeadExcludedRelations() |
protected java.util.Set<ByteString> |
MiningAssistant.getSubClasses(ByteString className) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
DefaultMiningAssistant.computeBodySize(ByteString var1,
ByteString var2,
Rule query)
Returns the number of distinct bindings of the given variables in the body of the rule.
|
protected double |
DefaultMiningAssistant.computePcaBodySize(ByteString var1,
ByteString var2,
Rule query,
java.util.List<ByteString[]> antecedent,
ByteString[] existentialTriple,
int nonExistentialPosition)
Returns the denominator of the PCA confidence expression for the antecedent of a rule.
|
protected double |
DefaultMiningAssistant.computePcaBodySize(ByteString var1,
ByteString var2,
Rule query,
java.util.List<ByteString[]> antecedent,
ByteString[] existentialTriple,
int nonExistentialPosition)
Returns the denominator of the PCA confidence expression for the antecedent of a rule.
|
protected boolean |
DefaultMiningAssistant.containsHardCase(Rule query,
ByteString[] newEdge)
It determines whether the rule contains an expensive query patterns of the forms
#(x, y) : r(z, x) r(z, y) or #(x, y) : r(y, z) r(x, z).
|
protected int |
MiningAssistant.findCountingVariable(ByteString[] headAtom)
It determines the counting variable of an atom with constant relation based on
the functionality of the relation
|
protected void |
DefaultMiningAssistant.getDanglingAtoms(Rule query,
ByteString[] edge,
double minSupportThreshold,
java.util.Collection<Rule> output)
It adds to the output all the rules resulting from adding dangling atom instantiation of "edge"
to the query.
|
double |
MiningAssistant.getRelationCardinality(ByteString relation) |
protected java.util.Set<ByteString> |
MiningAssistant.getSubClasses(ByteString className) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
MiningAssistant.buildInitialQueries(IntHashMap<ByteString> relations,
double minSupportThreshold,
java.util.Collection<Rule> output)
Given a list of relations with their corresponding support (one assistant could count based on the number of pairs,
another could use the number of subjects), it adds one rule per relation to the output.
|
void |
DefaultMiningAssistant.getInitialAtomsFromSeeds(java.util.Collection<ByteString> relations,
double minCardinality,
java.util.Collection<Rule> output) |
void |
MiningAssistant.getInitialAtomsFromSeeds(java.util.Collection<ByteString> relations,
double minSupportThreshold,
java.util.Collection<Rule> output)
Returns a list of one-atom queries using the head relations provided in the collection relations.
|
void |
MiningAssistant.setBodyExcludedRelations(java.util.Collection<ByteString> excludedRelations) |
void |
RelationSignatureDefaultMiningAssistant.setBodyExcludedRelations(java.util.Collection<ByteString> excludedRelations) |
void |
MiningAssistant.setHeadExcludedRelations(java.util.Collection<ByteString> headExcludedRelations) |
void |
RelationSignatureDefaultMiningAssistant.setHeadExcludedRelations(java.util.Collection<ByteString> headExcludedRelations) |
void |
MiningAssistant.setTargetBodyRelations(java.util.Collection<ByteString> bodyTargetRelations) |
| Modifier and Type | Method and Description |
|---|---|
ByteString[] |
Rule.fullyUnboundTriplePattern()
It creates a new unbound atom with fresh variables for the subject and object
and an undefined property, i.e., ?s[n] ?p ?o[n].
|
static ByteString[] |
Rule.fullyUnboundTriplePattern1()
It creates a new unbound atom with fresh variables for the subject and object
and an undefined property, i.e., ?s[n] ?p ?o[n].
|
ByteString |
Rule.getFunctionalVariable() |
ByteString[] |
Rule.getHead()
Returns the head of a query B => r(a, b) as a triple [?a, r, ?b].
|
ByteString |
Rule.getHeadRelationBS()
Returns the rule's head relation as ByteString.
|
ByteString[] |
Rule.getLastRealTriplePattern()
Return the last triple pattern which is not the a pseudo-atom.
|
ByteString[] |
Rule.getLastTriplePattern()
Returns the last triple pattern added to this rule.
|
ByteString |
Rule.getNonFunctionalVariable() |
ByteString[] |
Rule.getSuccedent()
Returns the head of a query B => r(a, b) as a triple [?a, r, ?b].
|
static ByteString[] |
Rule.triple(ByteString sub,
ByteString pred,
ByteString obj)
It puts the arguments in an array.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ByteString> |
Rule.getBodyRelations() |
java.util.Set<ByteString> |
Rule.getBodyVariables()
Returns an array with the variables that occur in the body but not in the
head.
|
java.util.List<ByteString> |
Rule.getHeadVariables()
Returns the head variables of the rule.
|
java.util.List<ByteString> |
Rule.getOpenVariables() |
java.util.List<ByteString> |
Rule.getVariables()
Returns a list with all the different variables in the query.
|
| Modifier and Type | Method and Description |
|---|---|
Rule |
Rule.addAtom(ByteString[] newAtom,
double cardinality) |
Rule |
Rule.addAtom(ByteString[] newAtom,
int cardinality,
ByteString joinedVariable,
ByteString danglingVariable)
Returns a new rule that contains all the atoms of the current rule plus
the atom provided as argument.
|
Rule |
Rule.addAtom(ByteString[] newAtom,
int cardinality,
ByteString joinedVariable,
ByteString danglingVariable)
Returns a new rule that contains all the atoms of the current rule plus
the atom provided as argument.
|
Rule |
Rule.addEdges(ByteString[] newEdge1,
ByteString[] newEdge2)
Returns a new rule that is a copy of the current rules plus the two edges
sent as arguments.
|
Rule |
Rule.addEdges(ByteString[] newEdge1,
ByteString[] newEdge2)
Returns a new rule that is a copy of the current rules plus the two edges
sent as arguments.
|
static boolean |
Rule.areEquivalent(ByteString[] pattern,
ByteString[] newAtom) |
static boolean |
Rule.areEquivalent(ByteString[] pattern,
ByteString[] newAtom) |
static void |
Rule.bind(ByteString oldVal,
ByteString newVal,
java.util.List<ByteString[]> query)
Replaces all occurrences of oldVal with newVal in the subject and object
positions of the input query.
|
int |
Rule.cardinalityForRelation(ByteString relation)
Returns the number of times the relation occurs in the atoms of the query
|
boolean |
Rule.containsRelation(ByteString relation) |
int |
Rule.containsRelationTimes(ByteString relation) |
static boolean |
Rule.equal(ByteString[] pattern1,
ByteString[] pattern2) |
static boolean |
Rule.equal(ByteString[] pattern1,
ByteString[] pattern2) |
static boolean |
Rule.equals(ByteString[] atom1,
ByteString[] atom2) |
static boolean |
Rule.equals(ByteString[] atom1,
ByteString[] atom2) |
int |
Rule.getLengthWithoutTypes(ByteString typeString)
Returns the number of atoms of the rule that are not type constraints of
the form rdf:type(?x, C) where C is a class, i.e., Person.
|
int |
Rule.getLengthWithoutTypesAndLinksTo(ByteString typeString,
ByteString linksString)
Returns the number of atoms of the rule that are neither type constraints
of the form rdf:type(?x, C) or linksTo atoms.
|
static void |
Rule.getParentsOfSize(java.util.List<ByteString[]> antecedent,
ByteString[] head,
int windowSize,
java.util.List<java.util.List<ByteString[]>> output)
Given the antecedent and the succedent of a rule as sets of atoms, it
returns the combinations of atoms of size 'i' that are "parents" of the
current rule, i.e., subsets of atoms of the original rule.
|
int |
Rule.getRealLengthWithoutTypes(ByteString typeString)
Returns the number of atoms of the rule that are neither pseudo-atoms nor
type constraints.
|
Rule |
Rule.instantiateConstant(int danglingPosition,
ByteString constant,
double cardinality)
Returns a new query where the variable at the dangling position of the
last atom has been unified to the provided constant.
|
Rule |
Rule.instantiateConstant(int triplePos,
int danglingPosition,
ByteString constant,
double cardinality)
Return a new query where the variable at position danglingPosition in
triple at position triplePos is bound to constant.
|
static boolean |
Rule.isGroundAtom(ByteString[] pattern)
Returns true if the triple pattern contains constants in all its
positions
|
static boolean |
Rule.isUnifiable(ByteString[] pattern,
ByteString[] newAtom)
Determines if the second argument is unifiable to the first one.
|
static boolean |
Rule.isUnifiable(ByteString[] pattern,
ByteString[] newAtom)
Determines if the second argument is unifiable to the first one.
|
static int[] |
Rule.joinPositions(ByteString[] a1,
ByteString[] a2)
Given 2 atoms joining in at least one variable, it returns the first
pairs of variable positions of each atom.
|
static int[] |
Rule.joinPositions(ByteString[] a1,
ByteString[] a2)
Given 2 atoms joining in at least one variable, it returns the first
pairs of variable positions of each atom.
|
static java.util.List<ByteString[]> |
Rule.redundantAtoms(ByteString[] test,
java.util.List<ByteString[]> query)
It returns a list with all the redundant atoms contained in the first
list, i.e., atoms whose removal does not affect the results of the query
defined in the second list.
|
Rule |
Rule.rewriteQuery(ByteString[] remove,
ByteString[] target,
ByteString victimVar,
ByteString targetVar) |
Rule |
Rule.rewriteQuery(ByteString[] remove,
ByteString[] target,
ByteString victimVar,
ByteString targetVar) |
Rule |
Rule.rewriteQuery(ByteString[] remove,
ByteString[] target,
ByteString victimVar,
ByteString targetVar) |
static java.lang.String |
Rule.toDatalog(ByteString[] atom) |
static ByteString[] |
Rule.triple(ByteString sub,
ByteString pred,
ByteString obj)
It puts the arguments in an array.
|
static boolean |
Rule.unifies(ByteString[] test,
java.util.List<ByteString[]> query) |
| Modifier and Type | Method and Description |
|---|---|
static void |
Rule.bind(java.util.Map<ByteString,ByteString> mappings,
java.util.List<ByteString[]> inputTriples)
Applies the mappings provided as first argument to the subject and object
positions of the query included in the second argument.
|
static void |
Rule.bind(java.util.Map<ByteString,ByteString> mappings,
java.util.List<ByteString[]> inputTriples)
Applies the mappings provided as first argument to the subject and object
positions of the query included in the second argument.
|
| Constructor and Description |
|---|
Rule(ByteString[] headAtom,
double cardinality)
Instantiates a rule of the form [] => r(?a, ?b) with empty body
and the given pattern as rule.
|
Rule(ByteString[] head,
java.util.List<ByteString[]> body,
double cardinality) |
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.WeakHashMap<ByteString,ByteString> |
ByteString.values
Holds all strings
|
protected static java.util.WeakHashMap<ByteString,ByteString> |
ByteString.values
Holds all strings
|
| Modifier and Type | Method and Description |
|---|---|
static ByteString |
ByteString.of(java.lang.CharSequence s)
Constructor
|
| Constructor and Description |
|---|
ByteString(ByteString s,
int start,
int end)
Use subSequence()
|