|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unima.alcomox.mapping.Alignment
public class Alignment
A mapping is a ordered list of correspondences. It provided several set operations on the correspondences. As well as ordering and several operations like normalization and thresholding.
Constructor Summary | |
---|---|
Alignment()
Constructs a mapping with an empty list of correspondences. |
|
Alignment(java.util.ArrayList<Correspondence> correspondences)
Constructs a mapping with the given list of correspondences. |
|
Alignment(java.util.Set<Correspondence> correspondencesAsSet)
Constructs a mapping with the given set of correspondences. |
Method Summary | |
---|---|
int |
applyThreshhold(float threshhold)
Applies a threshold on the mapping by removing every correspondence with a confidence below the threhold. |
int |
compareTo(Alignment that)
|
boolean |
equals(java.lang.Object object)
|
Correspondence |
get(int index)
|
double |
getConfidenceLowerBound()
|
double |
getConfidenceTotal()
|
double |
getConfidenceUpperBound()
|
Alignment |
getCopy()
Creates and returns a copy of this mapping. |
java.util.ArrayList<Correspondence> |
getCorrespondences()
Returns the correspondences of this mapping as list. |
java.util.HashSet<Correspondence> |
getCorrespondencesAsSet()
Returns the correspondences of this mapping as set. |
Alignment |
getDifference(Alignment that)
Returns the set difference between this mapping and that mapping. |
Alignment |
getIntersection(Alignment that)
Returns the intersection between this mapping and that. |
static Alignment |
getJoinedMapping(Alignment[] mappings)
|
static Alignment |
getJoinedMapping(Alignment[] mappings,
double[] weights)
|
java.lang.String |
getMetaDescription()
Returns different kinds of meta information about this mapping. |
Alignment |
getUnion(Alignment that)
Returns the union of this mapping and that. |
int |
hashCode()
|
void |
invert()
Inverts this mapping. |
boolean |
isUnique()
|
java.util.Iterator<Correspondence> |
iterator()
|
void |
modifyToEquivalenceCorrespondences()
|
void |
normalize()
Normalizes the confidences of the correspondences to the range [0.0, 1.0]. |
void |
normalize(double normConfidence)
|
void |
normalize(double minBound,
double maxBound)
Normalizes the confidences of the correspondences to a given range. |
Correspondence |
pop()
|
void |
push(Correspondence correspondence)
|
void |
reduceToEquivalenceCorrespondences()
Remove all correspondences from the mapping that express a different semantic relation than equivalence. |
Correspondence |
remove(int index)
|
void |
removeCorrespondencesWithNSPrefix(java.lang.String ns)
|
void |
setCorrespondences(java.util.ArrayList<Correspondence> correspondences)
Sets a list of correspondences as correspondences of the mapping. |
void |
setCorrespondences(java.util.Set<Correspondence> correspondencesAsSet)
Sets a set of correspondences as correspondences of the mapping. |
int |
size()
Returns the size of the mapping. |
void |
sortDescending()
|
java.lang.String |
toShortString()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Alignment()
public Alignment(java.util.ArrayList<Correspondence> correspondences)
correspondences
- The correspondences of the mapping as list.public Alignment(java.util.Set<Correspondence> correspondencesAsSet)
correspondences
- The correspondences of the mapping as set.Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toShortString()
public java.lang.String getMetaDescription()
public double getConfidenceLowerBound()
public double getConfidenceUpperBound()
public boolean isUnique()
public Alignment getDifference(Alignment that)
that
- The mapping to be compared to this mapping.
public Alignment getIntersection(Alignment that)
that
- The mapping to be intersected to this mapping.
public Alignment getUnion(Alignment that)
that
- The mapping to be unioned with this mapping.
public Alignment getCopy()
public int applyThreshhold(float threshhold)
threshhold
- The threshold.
public void normalize(double normConfidence) throws AlcomoException
AlcomoException
public void normalize()
minBound
- The lower bound (inclusive) of the range.maxBound
- The upper bound (inclusive) of the range.public void normalize(double minBound, double maxBound)
minBound
- The lower bound (inclusive) of the range.maxBound
- The upper bound (inclusive) of the range.public void invert()
public void setCorrespondences(java.util.ArrayList<Correspondence> correspondences)
public void setCorrespondences(java.util.Set<Correspondence> correspondencesAsSet)
public java.util.ArrayList<Correspondence> getCorrespondences()
public java.util.HashSet<Correspondence> getCorrespondencesAsSet()
public int size()
public Correspondence get(int index)
public void push(Correspondence correspondence)
public Correspondence pop()
public Correspondence remove(int index)
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.util.Iterator<Correspondence> iterator()
iterator
in interface java.lang.Iterable<Correspondence>
public void sortDescending()
public void reduceToEquivalenceCorrespondences()
public void modifyToEquivalenceCorrespondences()
public static Alignment getJoinedMapping(Alignment[] mappings) throws PCFException, CorrespondenceException
PCFException
CorrespondenceException
public static Alignment getJoinedMapping(Alignment[] mappings, double[] weights) throws PCFException, CorrespondenceException
PCFException
CorrespondenceException
public double getConfidenceTotal()
public void removeCorrespondencesWithNSPrefix(java.lang.String ns)
public int compareTo(Alignment that)
compareTo
in interface java.lang.Comparable<Alignment>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |