Question

Is there a way to load alignment file to python. If I have file like this:

<?xml version='1.0' encoding='utf-8' standalone='no'?>
<rdf:RDF xmlns='http://knowledgeweb.semanticweb.org/heterogeneity/alignment#'
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:xsd='http://www.w3.org/2001/XMLSchema#'
xmlns:align='http://knowledgeweb.semanticweb.org/heterogeneity/alignment#'>
<Alignment>
<map>
      <Cell>
          <entity1 rdf:resource="http://linkeddata.uriburner.com/about/id/entity//www.last.fm/music/Catie+Curtis"></entity1>
          <entity2 rdf:resource="http://discogs.dataincubator.org/artist/catie-curtis"></entity2>
        <relation>=</relation>
        <measure rdf:datatype="http://www.w3.org/2001/XMLSchema#float">1.0</measure>
      </Cell>
    </map>
<map>
      <Cell>
          <entity1 rdf:resource="http://linkeddata.uriburner.com/about/id/entity//www.last.fm/music/Bigelf"></entity1>
          <entity2 rdf:resource="http://discogs.dataincubator.org/artist/bigelf"></entity2>
        <relation>=</relation>
        <measure rdf:datatype="http://www.w3.org/2001/XMLSchema#float">0.8</measure>
      </Cell>
    </map>
<map>
      <Cell>
          <entity1 rdf:resource="http://linkeddata.uriburner.com/about/id/entity//www.last.fm/music/%C3%81kos"></entity1>
          <entity2 rdf:resource="http://discogs.dataincubator.org/artist/%C3%81kos"></entity2>
        <relation>=</relation>
        <measure rdf:datatype="http://www.w3.org/2001/XMLSchema#float">0.9</measure>
      </Cell>
    </map>
</Alignment>
</rdf:RDF>

I want to keep confidence value as well as triple: Subject:http://linkeddata.uriburner.com/about/id/entity//www.last.fm/music/Catie+Curtis Predicate:owl:SameAs Object:http://discogs.dataincubator.org/artist/catie-curtis Confidence:1.0

I was trying to do it with RDFlib, but did not managed to. Any suggestions will help, thanks!

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top