ensmallen icon indicating copy to clipboard operation
ensmallen copied to clipboard

Add a method to include key-value properties on nodes such as for biolink:name / rdfs:label

Open cmungall opened this issue 2 years ago • 0 comments

currently debugging with ensmallen is hard as we just see CURIEs, no labels. It would be useful to have labels for multiple reasons:

  • sanity check/debugging
  • drop in networkx replacement
  • drop in rdflib replacement
  • ML methods that uses lexical information
  • OAK grape plugin

I appreciate ensmallen is built for speed, but what if this were an option, off by default, and it just built an ancilliary node index such that you could do

label = g.get_node_metadata_index_by_name("GO:1234567")["label"]

currently I am getting around this by wrapping grape and either using separate OAK objects to access node information, or by creating 2 graphs, a n2n graph and a n2literal graph

It would be useful to have the analogous operation on edges as in nx, i.e property graphs (there is a ton of useful information there in biolink graphs that should be used in ML - e.g. the frequency of d2p is v important). But this could be considered a separate feature request

cmungall avatar Sep 02 '22 17:09 cmungall