/** @return signature of all ontology axioms */ @PortedFrom(file = "tOntology.h", name = "getSignature") public Stream<Expression> signature() { return axioms.stream().filter(p -> p.isUsed()).flatMap(p -> ((AxiomImpl) p).namedEntitySignature()).distinct(); }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * process an axiom wrt its Used status * * @param ax the axiom to process */ public void processAx(AxiomWrapper ax) { if (ax.isUsed()) { registerAx(ax); } else { unregisterAx(ax); } }
/** * load ontology to a given KB * * @param ontology * ontology */ @PortedFrom(file = "tOntologyLoader.h", name = "visitOntology") public void visitOntology(Ontology ontology) { ontology.getAxioms().stream().filter(p -> p.isUsed()).forEach(p -> ((AxiomImpl) p).accept(this)); tbox.finishLoading(); } }
/** * Remove tautologies (axioms that are always local) from the ontology * temporarily. * * @param o ontology */ void removeTautologies(Collection<AxiomWrapper> o) { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : o) { if (p.isUsed() && modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } }
/** * Remove tautologies (axioms that are always local) from the ontology * temporarily. * * @param o ontology */ void removeTautologies(Collection<AxiomWrapper> o) { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : o) { if (p.isUsed() && modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } }
/** * Remove tautologies (axioms that are always local) from the ontology * temporarily. * * @param o ontology */ void removeTautologies(Collection<AxiomWrapper> o) { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : o) { if (p.isUsed() && modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } }
/** * Remove tautologies (axioms that are always local) from the ontology * temporarily. * * @param o ontology */ void removeTautologies(Collection<AxiomWrapper> o) { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : o) { if (p.isUsed() && modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } }
/** * extract module wrt presence of a sig index * * @param list axioms */ private void extractModule(Collection<AxiomWrapper> list) { module.clear(); // clear the module flag in the input list.forEach(p -> { p.setInModule(false); if (p.isUsed()) { p.setInSearchSpace(true); } }); extractModuleQueue(); list.forEach(p -> p.setInSearchSpace(false)); }
/** * extract module wrt presence of a sig index * * @param list axioms */ private void extractModule(Collection<AxiomWrapper> list) { module.clear(); // clear the module flag in the input list.forEach(p -> { p.setInModule(false); if (p.isUsed()) { p.setInSearchSpace(true); } }); extractModuleQueue(); list.forEach(p -> p.setInSearchSpace(false)); }
/** * extract module wrt presence of a sig index * * @param list axioms */ private void extractModule(Collection<AxiomWrapper> list) { module.clear(); // clear the module flag in the input list.forEach(p -> { p.setInModule(false); if (p.isUsed()) { p.setInSearchSpace(true); } }); extractModuleQueue(); list.forEach(p -> p.setInSearchSpace(false)); }
/** * remove tautologies (axioms that are always local) from the ontology * temporarily */ private void removeTautologies() { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : axioms) { if (p.isUsed()) { // check whether an axiom is local wrt its own signature modularizer.extract(p, new Signature(p.getAxiom().signature()), type); if (modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } } }
/** * remove tautologies (axioms that are always local) from the ontology * temporarily */ private void removeTautologies() { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : axioms) { if (p.isUsed()) { // check whether an axiom is local wrt its own signature modularizer.extract(p, new Signature(p.getAxiom().signature()), type); if (modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } } }
/** * remove tautologies (axioms that are always local) from the ontology * temporarily */ private void removeTautologies() { // we might use it for another decomposition tautologies.clear(); for (AxiomWrapper p : axioms) { if (p.isUsed()) { // check whether an axiom is local wrt its own signature modularizer.extract(p, new Signature(p.getAxiom().signature()), type); if (modularizer.isTautology(p.getAxiom(), type)) { tautologies.add(p); p.setUsed(false); } } } }