whitespace in an rdf list corrupts ReteNetwork

136 views
Skip to first unread message

drewpca

unread,
Feb 15, 2014, 8:14:41 PM2/15/14
to fuxi-di...@googlegroups.com
I've narrowed it down to this so far. If " " changes to "x", there's no problem.

-----------

#!bin/python
import logging
logging.basicConfig(level=logging.DEBUG)
from FuXi.Rete import ReteNetwork
from FuXi.Rete.RuleStore import N3RuleStore
from rdflib import Graph
from rdflib.parser import StringInputSource

ruleStore = N3RuleStore()
ruleGraph = Graph(ruleStore)

n3 = '''
@prefix : <http://example.com/> .
{
  ?c :p1 ?uri .
} => {
  ?c :p2 (" " ?uri) .
} .
'''

ruleGraph.parse(StringInputSource(n3), format="n3")
deltaGraph = Graph()
network = ReteNetwork(ruleStore, inferredTarget=deltaGraph)


INFO:rdflib:RDFLib Version: 4.1
WARNING:rdflib.term:http://www.w3.org/1999/02/22-rdf-syntax-ns#first  does not look like a valid URI, trying to serialize this will break.
WARNING:rdflib.term:chttp://example.com/p2http://www.w3.org/1999/02/22-rdf-syntax-ns#first  does not look like a valid URI, trying to serialize this will break.
WARNING:rdflib.term:chttp://example.com/p2http://www.w3.org/1999/02/22-rdf-syntax-ns#first  does not look like a valid URI, trying to serialize this will break.
WARNING:rdflib.term:chttp://example.com/p2http://www.w3.org/1999/02/22-rdf-syntax-ns#first http://www.w3.org/1999/02/22-rdf-syntax-ns#firsturi does not look like a valid URI, trying to serialize this will break.
WARNING:rdflib.term:chttp://example.com/p2http://www.w3.org/1999/02/22-rdf-syntax-ns#first http://www.w3.org/1999/02/22-rdf-syntax-ns#firsturi does not look like a valid URI, trying to serialize this will break.

drewpca

unread,
Feb 17, 2014, 12:45:50 AM2/17/14
to fuxi-di...@googlegroups.com
This addresses the bug, but it's hard for me to tell how much risk it adds:
https://github.com/RDFLib/FuXi/pull/6
Reply all
Reply to author
Forward
0 new messages