de.unima.alcomox
Class ExtractionProblem

java.lang.Object
  extended by de.unima.alcomox.AlcomoProblem
      extended by de.unima.alcomox.ExtractionProblem

public class ExtractionProblem
extends AlcomoProblem


Field Summary
static java.lang.String ALCOMO_URL
          The namespace for additionally created entities (domain and range concepts).
static java.lang.String CSEXACTNESS
          The conflict sensitivity exactness determines the exactness of the conflict sensitivity estimation.
static java.lang.String ENTITIES
          The entities parameter determines whether only concepts correspondences or correspondences between concepts and relations are accepted.
static int ENTITIES_CONCEPTSPROPERTIES
          Concept and property correspondences.
static int ENTITIES_ONLYCONCEPTS
          Only concepts correspondences.
static java.lang.String METHOD
          The method parameter determines whether greedy or optimal strategy (with respect to confidences) is chosen.
static int METHOD_GREEDY
          Greedy method, formerly refered to as naive descending, now referred to as local optimal diagnosis.
static int METHOD_GREEDY_MINIMIZE
          Greedy method that generates an minimal hitting set over all pattern-based conflicts by iteratively deleting the correspondence that is involved in the highest number of conflicts.
static int METHOD_OPTIMAL
          Method to find an optimal solution (a minimum weighted hitting set).
static int METHOD_OPTIMAL_HUN
          Method to find an optimal 1:1 solution (a minimum weighted hitting set).
static java.lang.String REASONING
          The reasoning parameter determines whether efficient (incomplete) pairwise reasoning or complete reasoning is used to detect conflicts.
static int REASONING_BRUTEFORCE
          Brute force complete reasoning.
static int REASONING_COMPLETE
          Complete reasoning.
static int REASONING_D
          Brute force complete reasoning.
static int REASONING_EFFICIENT
          Pairwise incomplete conflict reasoning.
 
Fields inherited from class de.unima.alcomox.AlcomoProblem
initialized, inputMapping, solved, sourceOntology, targetOntology
 
Constructor Summary
ExtractionProblem()
          Constructs an extraction problem with standard settings (concepts and props, optimal, complete).
ExtractionProblem(int valueX, int valueY, int valueZ)
          Constructs an extraction problem and specifies the way it will be solved.
 
Method Summary
 void equalizeBoundedMappingTrust()
           
 java.util.Set<ConflictPair> getConflicSets()
          Deprecated. Will be removed in following AlcomoVersions (was used in javasript based manual evaluation). Computes the set of all conflict sets in the efficient mode. This method will find most pairs of conflicting correspondences, conflict sets of higher cardinality are not yet supported.
 Mapping getDiscardedMapping()
          Returns the mapping discarded as results of solving this extraction problem.
 java.util.HashSet<java.lang.String> getEntities()
           
 Mapping getExtractedMapping()
          Returns the mapping extracted as results of solving this extraction problem.
 java.util.HashSet<java.lang.String> getLocalUnsatisfiableEntities()
          Returns the uris (as strings) of all unsatisfiable concepts of both local ontologies.
 MergedOntology getMergedOntology()
           
 java.util.HashSet<java.lang.String> getMergedUnsatisfiableEntities()
          Returns the uris (as strings) of all unsatisfiable concepts of ther merged ontology based on the currecnt input mapping.
 Mapping getNonReferingInputMapping()
           
 int getParam(java.lang.String key)
          Returns the value of a parameter.
 Mapping getReferingInputMapping()
           
 void init()
           
 boolean interpretPartOfAsDisjointness()
           
 boolean isCoherentExtraction()
          Checks with complete reasoning wether the extracted mapping is coherent.
 void partOfAsDisjointness()
          Calling this method adds disjointness axioms for each part-of axiom.
 boolean solve()
          Solves the extraction problem.
 
Methods inherited from class de.unima.alcomox.AlcomoProblem
bindMapping, bindSourceOntology, bindTargetOntology, checkBindings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METHOD

public static final java.lang.String METHOD
The method parameter determines whether greedy or optimal strategy (with respect to confidences) is chosen. Chose between values METHOD_GREEDY and METHOD_OPTIMAL.

See Also:
Constant Field Values

ENTITIES

public static final java.lang.String ENTITIES
The entities parameter determines whether only concepts correspondences or correspondences between concepts and relations are accepted. Chose between values ENTITIES_ONLYCONCEPTS and ENTITIES_CONCEPTSPROPERTIES.

See Also:
Constant Field Values

REASONING

public static final java.lang.String REASONING
The reasoning parameter determines whether efficient (incomplete) pairwise reasoning or complete reasoning is used to detect conflicts. Chose between values REASONING_EFFICIENT, REASONING_COMPLETE and REASONING_BRUTEFORCE.

See Also:
Constant Field Values

CSEXACTNESS

public static final java.lang.String CSEXACTNESS
The conflict sensitivity exactness determines the exactness of the conflict sensitivity estimation. In particular, it determines the number of randomly chosen correspondences that are checked when estimating the conflict sensitivity.

See Also:
Constant Field Values

METHOD_GREEDY

public static final int METHOD_GREEDY
Greedy method, formerly refered to as naive descending, now referred to as local optimal diagnosis.

See Also:
Constant Field Values

METHOD_OPTIMAL

public static final int METHOD_OPTIMAL
Method to find an optimal solution (a minimum weighted hitting set). Unweighted (counting correspondences) can be achieved by setting all confidences to the same value in input mapping. Now referred to as global optimal diagnosis.

See Also:
Constant Field Values

METHOD_OPTIMAL_HUN

public static final int METHOD_OPTIMAL_HUN
Method to find an optimal 1:1 solution (a minimum weighted hitting set). Unweighted (counting correspondences) can be achieved by setting all confidences to the same value in input mapping. Performs a search where each serch node is 1:1 alignment. Setings related to one-to-one properties do not at all affect this method.

See Also:
Constant Field Values

METHOD_GREEDY_MINIMIZE

public static final int METHOD_GREEDY_MINIMIZE
Greedy method that generates an minimal hitting set over all pattern-based conflicts by iteratively deleting the correspondence that is involved in the highest number of conflicts. If there are several those correspondences, it removes the correspondence with lowest confidence. Can only be used together with efficient reasoning. It does not compute a local nor a global diagnosis, however, the results is a diagnosis.

See Also:
Constant Field Values

ENTITIES_ONLYCONCEPTS

public static final int ENTITIES_ONLYCONCEPTS
Only concepts correspondences.

See Also:
Constant Field Values

ENTITIES_CONCEPTSPROPERTIES

public static final int ENTITIES_CONCEPTSPROPERTIES
Concept and property correspondences.

See Also:
Constant Field Values

REASONING_EFFICIENT

public static final int REASONING_EFFICIENT
Pairwise incomplete conflict reasoning.

See Also:
Constant Field Values

REASONING_COMPLETE

public static final int REASONING_COMPLETE
Complete reasoning. Results is complete even though incomplete reasoning is used to a large degree to increase efficiency in a tricky way. In some extremly rare theoretical cases (non has been observed yet!) it might happen that brute force approach is more efficient.

See Also:
Constant Field Values

REASONING_BRUTEFORCE

public static final int REASONING_BRUTEFORCE
Brute force complete reasoning. Only uses reasoning in the merged ontology, not taking advantage of efficient reasoning at all.

See Also:
Constant Field Values

REASONING_D

public static final int REASONING_D
Brute force complete reasoning. Only uses reasoning in the merged ontology, not taking advantage of efficient reasoning at all.

See Also:
Constant Field Values

ALCOMO_URL

public static final java.lang.String ALCOMO_URL
The namespace for additionally created entities (domain and range concepts).

See Also:
Constant Field Values
Constructor Detail

ExtractionProblem

public ExtractionProblem(int valueX,
                         int valueY,
                         int valueZ)
                  throws PCFException
Constructs an extraction problem and specifies the way it will be solved.

Parameters:
valueX - Value of the parameter METHOD, ENTITIES, or REASONING.
valueY - Value of the parameter METHOD, ENTITIES, or REASONING.
valueZ - Value of the parameter METHOD, ENTITIES, or REASONING.
Throws:
PCFException - Thrown if invalid values for the parameters are chosen or one required parameter has not been set.

ExtractionProblem

public ExtractionProblem()
                  throws PCFException
Constructs an extraction problem with standard settings (concepts and props, optimal, complete).

Throws:
PCFException
Method Detail

getParam

public int getParam(java.lang.String key)
Returns the value of a parameter.

Parameters:
key - The parameter name.
Returns:
The value of the parameter.

interpretPartOfAsDisjointness

public boolean interpretPartOfAsDisjointness()

partOfAsDisjointness

public void partOfAsDisjointness()
Calling this method adds disjointness axioms for each part-of axiom. More precisely: for each A < Ex.part-of.B the method adds the axiom A < non B to the ontology. This method is especially designed for medical contexts, but should also work for other domains. Each relation that contains a *part+of* pattern will be accounted as a part of relation.


solve

public boolean solve()
              throws AlcomoException
Solves the extraction problem.

Overrides:
solve in class AlcomoProblem
Returns:
True, if the chosen algorithm terminated correctly (without interruption); false otherwise.
Throws:
AlcomoException - Thrown if some parameters are not set correctly or some problems occur during reasoning.

isCoherentExtraction

public boolean isCoherentExtraction()
                             throws AlcomoException
Checks with complete reasoning wether the extracted mapping is coherent. Requires to solve the extraction problem first.

Returns:
True if extracted mapping is coherent, false otherwise.
Throws:
AlcomoException

getConflicSets

public java.util.Set<ConflictPair> getConflicSets()
Deprecated. Will be removed in following AlcomoVersions (was used in javasript based manual evaluation). Computes the set of all conflict sets in the efficient mode. This method will find most pairs of conflicting correspondences, conflict sets of higher cardinality are not yet supported.

Returns:
A set of conflict sets, where each conflict set is a set of correspondences.

getExtractedMapping

public Mapping getExtractedMapping()
                            throws PCFException
Returns the mapping extracted as results of solving this extraction problem.

Returns:
The extracted mapping.
Throws:
PCFException - Thrown if the problem has not been solved yet.

getNonReferingInputMapping

public Mapping getNonReferingInputMapping()
                                   throws PCFException
Throws:
PCFException

getReferingInputMapping

public Mapping getReferingInputMapping()
                                throws PCFException
Throws:
PCFException

getDiscardedMapping

public Mapping getDiscardedMapping()
                            throws PCFException
Returns the mapping discarded as results of solving this extraction problem.

Returns:
The discarded mapping.
Throws:
PCFException - Thrown if the problem has not been solved yet.

init

public void init()
          throws AlcomoException
Overrides:
init in class AlcomoProblem
Throws:
AlcomoException

equalizeBoundedMappingTrust

public void equalizeBoundedMappingTrust()

getEntities

public java.util.HashSet<java.lang.String> getEntities()
                                                throws PCFException
Throws:
PCFException

getLocalUnsatisfiableEntities

public java.util.HashSet<java.lang.String> getLocalUnsatisfiableEntities()
                                                                  throws AlcomoException
Returns the uris (as strings) of all unsatisfiable concepts of both local ontologies. This comprises also the additionally introduced concepts used for reasoning over properties.

Returns:
The set of the URIs of all locally unsatisfiable concepts.
Throws:
AlcomoException

getMergedUnsatisfiableEntities

public java.util.HashSet<java.lang.String> getMergedUnsatisfiableEntities()
                                                                   throws AlcomoException
Returns the uris (as strings) of all unsatisfiable concepts of ther merged ontology based on the currecnt input mapping. This comprises also the additionally introduced concepts used for reasoning over properties.

Returns:
The set of the URIs of all merged unsatisfiable concepts.
Throws:
AlcomoException

getMergedOntology

public MergedOntology getMergedOntology()
                                 throws AlcomoException
Throws:
AlcomoException