public class MemoryMapping extends AMapping
map, predicate, reversedMap, size| Modifier | Constructor and Description |
|---|---|
protected |
MemoryMapping() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String uri,
HashMap<String,Double> instances)
Add a batch of similarities to the mapping
|
void |
add(String source,
String target,
double similarity)
Add one entry to the mapping
|
boolean |
contains(String sourceInstance,
String targetInstance)
Checks whether a mapping contains a particular entry
|
static AMapping |
generateRandomMapping(int mappingSize,
int minSize,
int maxSize) |
AMapping |
getBestOneToNMapping()
Computes the best one to n mapping for the current mapping, i.e., for
each element of the source, it gets the best t from target.
|
double |
getConfidence(String sourceInstance,
String targetInstance)
Checks whether the map contains a certain pair.
|
int |
getNumberofMappings()
Computes the total number of mappings contained in the object
|
int |
getNumberofPositiveMappings()
Computes the number of mappings with value greater than 0 contained in the
object
|
AMapping |
getOnlyPositiveExamples() |
AMapping |
getSubMap(double threshold)
Returns a mapping that contains all elements of the current mapping that
have similarity above the threshold.
|
void |
initReversedMap()
Fills the whole content of the current map into the reversed map, which
uses the similarity scores as key.
|
String |
pairsOutput() |
AMapping |
reverseSourceTarget()
Reverses source and target
|
AMapping |
scale(double d) |
int |
size() |
String |
toString() |
AMapping |
trim() |
AMapping |
union(AMapping other)
Union of two maps: returns all pairs of sources s and targets t of this
map and the other.
|
equals, getBestOneToOneMappings, getMap, getPredicate, getPredicateURI, getReversedMap, getSize, hashCode, setMap, setPredicate, setSizepublic static AMapping generateRandomMapping(int mappingSize, int minSize, int maxSize)
public void initReversedMap()
public AMapping getSubMap(double threshold)
public void add(String uri, HashMap<String,Double> instances)
public double getConfidence(String sourceInstance, String targetInstance)
getConfidence in class AMappingsourceInstance - Instance from the source knowledge basetargetInstance - Instance from the target knowledge basepublic boolean contains(String sourceInstance, String targetInstance)
public int getNumberofMappings()
getNumberofMappings in class AMappingpublic int getNumberofPositiveMappings()
getNumberofPositiveMappings in class AMappingpublic AMapping getBestOneToNMapping()
getBestOneToNMapping in class AMappingpublic AMapping reverseSourceTarget()
reverseSourceTarget in class AMappingpublic AMapping scale(double d)
public AMapping trim()
public String pairsOutput()
public AMapping union(AMapping other)
other, - the second mappingpublic AMapping getOnlyPositiveExamples()
getOnlyPositiveExamples in class AMappingCopyright © 2018. All rights reserved.