I am trying to parse this RDF:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="http://sentic.net/api/en/concept/celebrate_special_occasion/polarity">
<rdf:type rdf:resource="http://sentic.net/api/concept/polarity"/>
<polarity xmlns="http://sentic.net" rdf:datatype="http://w3.org/2001/XMLSchema#float">0.551</polarity>
</rdf:Description>
</rdf:RDF>
I am loading it from the URL: http://sentic.net/api/en/concept/celebrate_special_occasion/polarity
To do this I am using this code:
import rdflib
g = rdflib.Graph()
g.parse("http://sentic.net/api/en/concept/celebrate_special_occasion/polarity", format='xml')
However, the code return this error:
ParserError: http://sentic.net/api/en/concept/celebrate_special_occasion/polarity:4:67: Repeat node-elements inside property elements: http://w3.org/1999/02/22-rdf-syntax-ns#type
Does anyone know what is happening? Which element is repeated? How can I solve this?