def combinator(self): Restriction = cmb.Restriction(None) combinator = cmb.ObjectCombinator.full_combinator( cmb.Class, cmb.Pair(owl.complementOf, Restriction(self.predicate, self.object))) return combinator
def test_equivalent_to_union_of_complement(self): Restriction = cmb.Restriction(None) combinator = cmb.ObjectCombinator.full_combinator( cmb.Class, cmb.Pair(owl.complementOf, Restriction(ilxtr.property, ilxtr.value))) print(combinator) gen = combinator(ilxtr.subject) self._doit(gen) combinator = cmb.unionOf(combinator) print(combinator) gen = combinator(ilxtr.subject, owl.equivalentClass) self._doit(gen)
# lead to construction of a context olit(asp.nonLocal, definition, 'aspect of thing that varies depending on context'), oop_(hasParticipant, propertyChainAxiom(ilxtr.processHasAspect, ilxtr.hasContext)), restG( blankc(owl.onProperty, ilxtr.hasPrimaryAspect_dAdT), blankc(owl.someValuesFrom, ilxtr.nonZero), blankc(rdfs.subClassOf, restN(ilxtr.hasPrimaryAspectActualized, ilxtr.aspect)))(rdflib.BNode()), ## modalitiy cmb.Class( ilxtr.ExperimentalModality, cmb.Pair(rdfs.label, rdflib.Literal('experimental modality')), ), cmb.Class( ilxtr.ExperimentalPreparation, cmb.Pair(rdfs.label, rdflib.Literal('experimental preparation')), ), # in vivo in vitro ## behavior cmb.Class( ilxtr.BehavioralTask, cmb.Pair(rdfs.label, rdflib.Literal('behavioral task')), ), # tasks that have protocols cmb.Class( ilxtr.BehavioralParadigm, cmb.Pair(rdfs.label, rdflib.Literal('behavioral paradigm')), ), # more abstract behaviors e.g. forced choice detection
# lead to construction of a context olit(asp.nonLocal, definition, 'aspect of thing that varies depending on context'), oop_(hasParticipant, propertyChainAxiom(ilxtr.processHasAspect, ilxtr.hasContext)), restG( blankc(owl.onProperty, ilxtr.hasPrimaryAspect_dAdT), blankc(owl.someValuesFrom, ilxtr.nonZero), blankc(rdfs.subClassOf, restN(ilxtr.hasPrimaryAspectActualized, ilxtr.aspect)))(rdflib.BNode()), ## modalitiy cmb.Class( ilxtr.ExperimentalModality, cmb.Pair(owl.deprecated, rdflib.Literal(True)), cmb.Pair(replacedBy, ilxtr.ExperimentalApproach), cmb.Pair( editorNote, rdflib.Literal( 'For clarity switch to use ilxtr:ExperimentalApproach since we are ' 'changing the preferred terminology. Hopefully keeping the id ' 'aligned will prevent confusion down the line. Follow replacedBy: ' 'to find the new id.')), ), cmb.Class( ilxtr.ExperimentalApproach, cmb.Pair(rdfs.label, rdflib.Literal('experimental approach')), cmb.Pair(NIFRID.synonym, rdflib.Literal('experimental modality')), cmb.Pair( definition,