[Solved] Map RDF to k-partite graph

Hi,

I'm working with Knime Labs for my final project. I've done some nodes to work with RDF format and my next goal is try to convert RDF model to a graph for using Network nodes with it.

I know that Knime uses a k-partite graph representation and I know this kind of internal representation is a good idea for mapping RDF model. I need a partition for nodes and other partition for edges (2-partite graph).

But I need some sample of use, e.g. how to create a small graph with some nodes and edges.

I hope good news for me!

Thanks to all, and I'm sorry for my English (I'm from Spain)

I guess you are looking for some examples for the Network Mining extensions. Please check out the Public Example Server.

Hi,

 a good starting point would be the social network example which is available on the example server and described in the Network Mining section of the KNIME labs. You might also want to take a look at the DrugBank example which is also available on the example server. This example workflow use partitions to distinguish between different node types such as drugs, proteins, terms, etc. Have a look at the Advanced Options tab of the Object Inserter nodes to see how to assign partitions (e.g. types) to nodes and edges.

Bye,

Tobias

Hi,

 

I am curious about your nodes working with RDF. Can you explain some details about your work with KNIME und RDF?

 

Frank

Basically, I've nodes to read RDF files (from file or URL), a node for querying the RDF model (ask, construct, describe and select queries) and a node for converting RDF to XML in order to take advantage of existing XML nodes.

This is all so far!

David.

Hi Tobias,

first of all, thanks for your attention! I know that I can see these samples, but I was referring to help with code.

I have one node that returns a RDF model (how XMLReader node returns a XML document) using BufferedDataTable[].

Well, now I need to code one node that:

  1. It must obtain the RDF model from the input (BufferedDataTable[])
  2. Convert RDF statements (subjects, properties & objects) into Graph (nodes,edges).
  3. It must return the graph representation (PortObject[]).

I don´t know if I can using some implemented Class in order to make the job easier.

Thank you very much! ;)

D

Hi,

I would suggest that your nodes return a standard KNIME data table that contains three columns (subject, predicate and object). Once you have such a table you can use the object inserter to create a network out of the rdf data table. This would make it much easier for you since you do not need to learn the network specific classes. In addition you can use all the pre-processing nodes in KNIME to first clean up your data (e.g. grouping, filtering, etc.) prior creating the network. This way your plugin wouldn’t be dependent on the network plugins (org.knime.network.core and org.knime.network.base) and could such be easier used by other peoples and I guess there is a lot of interest in such nodes. By the way, do you plan to make these nodes public available? If that is the case and you are interested in we would be happy to host as part of the community contributions.

However if you really want to implement a node that outputs a network you might want to have a look at the org.knime.network.node.inserter.object.ObjectInsertNodeModel and the org.knime.network.node.io.matrix.reader.Matrix2NetworkNodeModel. They both belong to the org.knime.network.base plugin and create a network from a data table.

Unfortunately we do not have a developer introduction for the network plugin yet. So if you have any further questions please do not hesitate to contact me directly.

Bye,

Tobias

Hi David

 

Sounds interesting for us. We have some taxonomy data that can be exported in RDF format and that should be mined in KNIME. Maybe we can learn from you how to work with RDF in KNIME.

 

Frank 

Hi David,

I'm also interested in reading RDF files. What kind of nodes did you use to read these files? Did you find an existing one or did you build your own? 

Thanks

Dan