Translate an Attempto DRS into Web Ontology Language (OWL 2),
or if this fails then to Semantic Web Rule Language (SWRL).
If the translation fails then we search for errors by traversing
the respective structure (e.g. implication) again. Note that the error
capture is not completely implemented. Sometimes the translation simply
fails and no explanatory messages are asserted.
- author
- - Kaarel Kaljurand
- version
- - 2013-04-08
- license
- - LGPLv3
- condition_oneof(+Condition:term, -Ref:term, -ObjectOneOf:term) is semidet
- Note that this rule is only called for the top-level DRS conditions.
- Arguments:
-
Condition | - is a DRS (top-level) object-condition |
Ref | - is a discourse referent |
ObjectOneOf | - is OWL's ObjectOneOf construct that corresponds to the condition |
- bug
- - Fix comments, we also return genquant/4 now
- is_object_with_generalized_quantifier(+Condition:term) is semidet
- Succeeds if the condition is an object-condition with certain QType and QNum arguments.
Note: "Name \= na" is there to reject NP conjunctions.
- Arguments:
-
Condition | - is a DRS condition |
- condlist_axiomlist_with_cheat(+ConditionList:list, +RefList:list, -AxiomList:list) is semidet
- Mapping from the DRS conditions' list to OWL axioms.
- Arguments:
-
ConditionList | - is a list of DRS conditions |
RefList | - is a list of top-level discourse referents |
AxiomList | - is a list of OWL axioms |
- bug
- - We first cheat a bit, e.g. in case the DRS consists of
certain conditions then they are mapped immediately to a
class assertion. This avoids the anonymous individuals
that are generated by the general solution.
- - Also, sentences like "There are exactly 4 continents." are handled here.
- has_dom_for_member(+Ref:nvar, +CondListIn:list, -CondListOut:list) is nondet
- Given a discourse referent, selects its corresponding
object condition, given that it corresponds to an indefinite pronoun
('somebody' or 'something') or the noun 'thing'.
- Arguments:
-
Ref | - is a discourse referent |
CondListIn | - is a list of DRS conditions |
CondListOut | - is the remaining list of DRS conditions (after select/3) |
- condlist_and(+D:nvar, +CondList:list, +RefList:list, -And:term) is nondet
- condlist_and(+D:nvar, +CondList:list, +RefList:list, -Desc:term, -And:term) is nondet
-
- Arguments:
-
D | - is a distinguished discourse referent (the "subject" of an if-then sentence) |
CondList | - is a list of DRS conditions (under negation, disjunction, or then-box) |
RefList | - is a list of top-level discourse referents |
Desc | - is an OWL class description to be inserted into the intersection |
And | - is an OWL class description (possibly a named class) |
- is_toplevel(+Ref:nvar, +RefList:list, -ObjectOneOf:term)
- Succeeds if Ref is among the top-level referents (i.e. it corresponds to
a proper name or to a common noun that is not under negation, disjunction,
or implication).
- Arguments:
-
Ref | - is a discourse referent |
RefList | - is a list of top-level discourse referents |
ObjectOneOf | - is an OWL ObjectOneOf-class |
- get_entity(+Name:atom, +NS:atom, -Individual:term) is semidet
- get_entity(+Name:atom, -Individual:term) is semidet
-
- Arguments:
-
Name | - is the name of the individual |
NS | - is a namespace identifier |
Individual | - is a named individual |
- dataitem_datavalue_datatypeuri(+DataItem:term, -DataValue:term, -DataTypeUri:atom) is semidet
-
- Arguments:
-
DataItem | - is an ACE data-item (e.g. int(10) , real(3.14) , string('Go!') ) |
DataValue | - is an ACE data-value (e.g. 10, 3.14, 'Go!') |
DataTypeUri | - is the corresponding XMLSchema datatype URI |
- condlist_to_dlquery(+CondList:term, -ClassExpression:term) is semidet
- Converts a list of DRS conditions into an OWL class expression.
The DRS must have undergone: drs_to_sdrs, numbervars, drs_to_owldrs.
- Arguments:
-
CondList | - is a list of DRS conditions |
ClassExpression | - is an OWL class expression in OWL FSS (Prolog notation)
Ex: John does not see what? |