Mercurial > code > home > repos > homeauto
comparison service/mqtt_to_rdf/inference.py @ 1623:cf901d219007
apparently this was redundant
author | drewp@bigasterisk.com |
---|---|
date | Wed, 08 Sep 2021 18:56:24 -0700 |
parents | 38bd8ef9ef67 |
children | 7b3656867185 |
comparison
equal
deleted
inserted
replaced
1622:38bd8ef9ef67 | 1623:cf901d219007 |
---|---|
129 # log.debug(f'{INDENT*5} consider this true stmt ({i}): {trueStmt}') | 129 # log.debug(f'{INDENT*5} consider this true stmt ({i}): {trueStmt}') |
130 | 130 |
131 for v, vals in self._bindingsFromStatement(lhsStmt, trueStmt): | 131 for v, vals in self._bindingsFromStatement(lhsStmt, trueStmt): |
132 candidateTermMatches[v].update(vals) | 132 candidateTermMatches[v].update(vals) |
133 | 133 |
134 for trueStmt in itertools.chain(workingSet, self.graph): | |
135 for b in self.lhsBnodes: | |
136 for t in [trueStmt[0], trueStmt[2]]: | |
137 if isinstance(t, (URIRef, BNode)): | |
138 candidateTermMatches[b].add(t) | |
139 return candidateTermMatches | 134 return candidateTermMatches |
140 | 135 |
141 def _bindingsFromStatement(self, stmt1: Triple, stmt2: Triple) -> Iterator[Tuple[Variable, Set[Node]]]: | 136 def _bindingsFromStatement(self, stmt1: Triple, stmt2: Triple) -> Iterator[Tuple[Variable, Set[Node]]]: |
142 """if these stmts match otherwise, what BNode or Variable mappings do we learn? | 137 """if these stmts match otherwise, what BNode or Variable mappings do we learn? |
143 | 138 |