From: Edward S. <de...@vs...> - 2010-05-19 12:46:24
|
I’m starting to look into using the SRF graphs (via GraphViz). Unfortunately, the help page at http://www.mediawiki.org/wiki/Extension:Semantic_Result_Formats/graph_format really doesn’t elaborate on how the query translates into nodes and links. Using the example given: {{#ask: [[Category:Person]] | ?has child | ?knows | format=graph … Are the nodes always Persons? Are the links either “has child” or “knows” relationships? How does this generalize? Does anyone have some examples on their own wikis? Second set of questions: How far out does the graph go? Can you limit the number of links in the graph so you don’t end up with everyone in the world linking? Basically, I’m interested in a GraphRadius parameter. Many thanks Edward Swing Principal Technology Consultant Vision Systems & Technology, Inc. ________________________________ 6021 University Boulevard, Suite 360 ▪ Ellicott City ▪ Maryland ▪ 21043 Tel: 410.418.9919 ▪ Main: 410.418.5555 ▪ Fax: 410.418.8580 Email: de...@vs... Web: http://www.vsticorp.com/ <http://www.vsticorp.com/> |
From: Bob M. <unc...@gm...> - 2010-05-19 13:20:10
|
Hi, On Wed, May 19, 2010 at 1:46 PM, Edward Swing <de...@vs...> wrote: > I’m starting to look into using the SRF graphs (via GraphViz). Unfortunately, the help page at http://www.mediawiki.org/wiki/Extension:Semantic_Result_Formats/graph_format really doesn’t elaborate on how the query translates into nodes and links. Using the example given: > > {{#ask: [[Category:Person]] > | ?has child | ?knows > | format=graph > … > > > > Are the nodes always Persons? Are the links either “has child” or “knows” relationships? How does this generalize? The nodes in your case would be Persons, but in general they are anything (even non-Page types will render as nodes). The relationships are the edges, as you suggest. If you can't get your head around it, start by setting format=table and get a piece of paper. Then read down the table. For each row, node for the first column, if you haven't already drawn it. If there is a non-empty value in the subsequent columns, draw a node for those objects (if it's not already there), and draw a line from the first column "subject" object to this "object" object. > > Does anyone have some examples on their own wikis? > http://wiki.vectorbase.org/index.php/Release_Overview We actually query inverse properties, which leads to a graph that is easier to read. I made a hack to get the colours from the SMW - should be on the SRF documentation talk pages somewhere. (I also submitted it to the developers via MW bugzilla.) > > Second set of questions: How far out does the graph go? Can you limit the number of links in the graph so you don’t end up with everyone in the world linking? Basically, I’m interested in a GraphRadius parameter. You just have to limit your query to the objects you want to appear on the graph, but you'll always get the objects they point to as well. Here's what we do to show the local network neighbourhood for our objects: http://wiki.vectorbase.org/index.php/Search#tab=Dependency_graph You can see that we can't ensure that every edge goes to or from the node of interest, but it's good enough for us. > > Many thanks > no problem, HTH Bob. > Edward Swing > Principal Technology Consultant > Vision Systems & Technology, Inc. > > ________________________________ > > > > 6021 University Boulevard, Suite 360 ▪ Ellicott City ▪ Maryland ▪ 21043 > > Tel: 410.418.9919 ▪ Main: 410.418.5555 ▪ Fax: 410.418.8580 > > Email: de...@vs... > Web: http://www.vsticorp.com/ <http://www.vsticorp.com/> > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |