Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(6)  |  Derive(0)  |  Import(8)
A ReteToken, an RDF triple in a Rete network.  Once it passes an alpha node test,
if will have unification substitutions per variable

src/f/u/FuXi-1.4.1.production/lib/Rete/Network.py   FuXi(Download)
from Util import xcombine
from BetaNode import BetaNode, LEFT_MEMORY, RIGHT_MEMORY, PartialInstanciation
from AlphaNode import AlphaNode, ReteToken, SUBJECT, PREDICATE, OBJECT, BuiltInAlphaNode
from BuiltinPredicates import FILTERS
from FuXi.Horn import ComplementExpansion, DATALOG_SAFETY_NONE, \
                             debug=False,
                             executeFn=None):
        inferredToken=ReteToken(inferredTriple)
        self.proofTracers.setdefault(inferredTriple,[]).append(binding)
        self.justifications.setdefault(inferredTriple,set()).add(termNode)

src/r/d/RDF.py-HEAD/FuXi/Rete/Network.py   RDF.py(Download)
from Util import xcombine
from BetaNode import BetaNode, LEFT_MEMORY, RIGHT_MEMORY, PartialInstanciation
from AlphaNode import AlphaNode, ReteToken, SUBJECT, PREDICATE, OBJECT, BuiltInAlphaNode
from BuiltinPredicates import FILTERS
from FuXi.Horn import ComplementExpansion, DATALOG_SAFETY_NONE, \
                            executeFn(termNode,inferredTriple,tokens,binding,debug)                                        
                        continue
                    inferredToken=ReteToken(inferredTriple)
                    self.proofTracers.setdefault(inferredTriple,[]).append(binding)
                    self.justifications.setdefault(inferredTriple,set()).add(termNode)

src/f/u/FuXi-1.4.1.production/lib/Rete/BetaNode.py   FuXi(Download)
from itertools import izip, ifilter
from pprint import pprint
from AlphaNode import AlphaNode, BuiltInAlphaNode, ReteToken
from Node import Node
from RuleStore import N3Builtin
def PopulateTokenFromANode(aNode,bindings):
    #print aNode, bindings
    termList = [isinstance(term,Variable) and bindings[term] or term
                    for term in aNode.triplePattern]
    token = ReteToken(tuple(termList))

src/r/d/RDF.py-HEAD/FuXi/Rete/BetaNode.py   RDF.py(Download)
from itertools import izip, ifilter
from pprint import pprint
from AlphaNode import AlphaNode, BuiltInAlphaNode, ReteToken
from Node import Node
from RuleStore import N3Builtin
def PopulateTokenFromANode(aNode,bindings):
    #print aNode, bindings
    termList = [isinstance(term,Variable) and bindings[term] or term
                    for term in aNode.triplePattern]
    token = ReteToken(tuple(termList))

src/f/u/FuXi-HEAD/lib/Rete/BetaNode.py   FuXi(Download)
import unittest
from pprint import pprint
from .AlphaNode import AlphaNode, BuiltInAlphaNode, ReteToken
from .Node import Node
# from RuleStore import N3Builtin
def PopulateTokenFromANode(aNode, bindings):
    #print(aNode, bindings)
    termList = [isinstance(term, Variable) and bindings[term] or term
                    for term in aNode.triplePattern]
    token = ReteToken(tuple(termList))

src/f/u/FuXi-HEAD/lib/Rete/Network.py   FuXi(Download)
    PartialInstantiation,
    )
from .AlphaNode import (
    AlphaNode,
    BuiltInAlphaNode,
                        continue
                    # if rhsTriple[1].find('subClassOf_derived')+1:import pdb;pdb.set_trace()
                    inferredToken = ReteToken(inferredTriple)
                    self.proofTracers.setdefault(inferredTriple, []).append(binding)
                    self.justifications.setdefault(inferredTriple, set()).add(termNode)

src/f/u/FuXi-1.4.1.production/lib/Rete/__init__.py   FuXi(Download)
from Network import ReteNetwork, InferredGoal
from BetaNode import BetaNode
from AlphaNode import AlphaNode,ReteToken,BuiltInAlphaNode
from ReteVocabulary import RETE_NS
 

src/r/d/RDF.py-HEAD/FuXi/Rete/__init__.py   RDF.py(Download)
from Network import ReteNetwork, InferredGoal
from BetaNode import BetaNode
from AlphaNode import AlphaNode,ReteToken,BuiltInAlphaNode
from ReteVocabulary import RETE_NS