Mercurial > code > home > repos > homeauto
diff service/mqtt_to_rdf/stmt_chunk.py @ 1694:73abfd4cf5d0
new html log and other refactoring as i work on the advanceTheStack problems
https://bigasterisk.com/post/inference/2021-09-27_11-11.png
author | drewp@bigasterisk.com |
---|---|
date | Mon, 27 Sep 2021 11:22:09 -0700 |
parents | aa35ae7a1acc |
children | 88f6e9bf69d1 |
line wrap: on
line diff
--- a/service/mqtt_to_rdf/stmt_chunk.py Sat Sep 25 22:20:42 2021 -0700 +++ b/service/mqtt_to_rdf/stmt_chunk.py Mon Sep 27 11:22:09 2021 -0700 @@ -57,6 +57,7 @@ for selfTerm, otherTerm in zip(self.ruleChunk._allTerms(), self.workingSetChunk._allTerms()): if not isinstance(selfTerm, (Variable, RuleUnboundBnode)) and selfTerm != otherTerm: return False + return True @@ -146,8 +147,7 @@ return isinstance(term, (URIRef, Literal)) or term is None -def applyChunky(cb: CandidateBinding, - g: Iterable[AlignedRuleChunk]) -> Iterator[AlignedRuleChunk]: +def applyChunky(cb: CandidateBinding, g: Iterable[AlignedRuleChunk]) -> Iterator[AlignedRuleChunk]: for aligned in g: bound = aligned.ruleChunk.apply(cb) try: @@ -199,9 +199,12 @@ objList = gatherList(o) o = None from rdflib import BNode - if isinstance(s, BNode): s = bnodeType(s) - if isinstance(p, BNode): p = bnodeType(p) - if isinstance(o, BNode): o = bnodeType(o) + if isinstance(s, BNode): + s = bnodeType(s) + if isinstance(p, BNode): + p = bnodeType(p) + if isinstance(o, BNode): + o = bnodeType(o) c = Chunk((s, p, o), subjList=subjList, objList=objList)