| |
- atomicFormulaTerms(f)
- Check that a formula is atomic and return the p, s, o terms.
>>> atomicFormulaTerms(_s2f("<#sky> <#color> <#blue>.",
... "http://example/stuff"))
(color, sky, blue)
- checkBuiltin(r, f, checker, policy, level=0)
- Check a built-in step.
@@hmm... integrate with Policy more?
>>> soc = Namespace("http://example/socrates#")
>>> pf = _s2f(_TestBuiltinStep % '"a" list:in ("b" "a" "c")',
... "http://example/socrates")
>>> f = checkBuiltin(soc.step1,
... pf.the(subj=soc.step1, pred=reason.gives),
... Checker(pf), AllPremises())
>>> len(f)
1
>>> pf = _s2f(_TestBuiltinStep % '"abc" str:startsWith "a"',
... "http://example/socrates")
>>> f = checkBuiltin(soc.step1,
... pf.the(subj=soc.step1, pred=reason.gives),
... Checker(pf), AllPremises())
>>> len(f)
1
>>> pf = _s2f(_TestBuiltinStep % '"abc" str:startsWith "b"',
... "http://example/socrates")
>>> f = checkBuiltin(soc.step1,
... pf.the(subj=soc.step1, pred=reason.gives),
... Checker(pf), AllPremises())
Traceback (most recent call last):
...
LogicalFallacy: Built-in fact does not give correct results: predicate: abc subject: str:startsWith object: b result: None
- checkConjunction(r, f, checker, policy, level)
- checkExtraction(r, f, checker, policy, level=0)
- check an Extraction step.
>>> soc = Namespace("http://example/socrates#")
>>> pf = _s2f(_TestCEstep, "http://example/socrates")
>>> checkExtraction(soc.step1,
... pf.the(subj=soc.step1, pred=reason.gives),
... Checker(pf), AllPremises())
{soc:socrates type soc:Man}
- checkGMP(r, f, checker, policy, level=0)
- check a generalized modus ponens step.
>>> soc = Namespace("http://example/socrates#")
>>> pf = _s2f(_TestGMPStep, "http://example/socrates")
>>> f = checkGMP(soc.step1, None, Checker(pf), AllPremises())
>>> f.n3String().strip()
u'@prefix : <http://example/socrates#> .\n \n :socrates a :Mortal .'
- checkSupports(r, f, checker, policy, level)
- fyi(str, level=0, thresh=50)
- getSymbol(proof, x)
- De-reify a symbol: get the informatuion identifying it from the proof
- getTerm(proof, x)
- De-reify a term: get the informatuion about it from the proof
- main(argv)
- n3Entails(f, g, skipIncludes=0, level=0)
- Does f N3-entail g?
First try indexed graph match algorithm, and if that fails,
unification.
- topLevelLoad(uri=None, flags='')
- usage()
|