Did you know ... Search Documentation:
Pack sparqlprog -- prolog/sparqlprog/owl_search_viz.pl
PublicShow source

Convenience wrapper that combines search_util and owl_edge/4 from owl_util

The main predicate is owl_search_and_display/2

requires og2dot - https://www.npmjs.com/package/obographviz

 owl_search_and_display(+SearchTerms:list, +Opts:list) is semidet
perform a search over all SearchTerms and display

SearchTerms:

Each term in the list is an atom that is a regex used to search. Search is determined by search_property. By default this is label, to search using rdfs:label

In place of a regex, a prolog query term can be used, e.g 'q//label_of(shape,R),rdfs_subclass_of(Q,R)' to get all subclasses of 'shape'

Opts:

search_property(Prop)
one of: label, id, synonym, all only the first letter needs to be specified (l, i, s, a) default: label
relations(Rels)
list of object properties s is a shorthand for rdfs:subClassOf
output(File)
format(Fmt)
one of: disp, obo, viz, png, dot, ids
extend_lambda(File)

Examples:

  • owl_search_and_display([nucleus],[]) show any terms text matching '.*nucleus.*'
  • owl_search_and_display(['^nucleus$'],[relations([s])]) exact match, show superclasses
  • owl_search_and_display(['GO:0005634'],[search_property(id)]) search by ID

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 searchviz(Arg1)
 searchviz(Arg1, Arg2)