discover_from_rdf
- discover_from_rdf(graph: GraphInput | rdflib.Graph, *, format: GraphFormats | None = None, **kwargs: Any) Converter[source]
Discover new URI prefixes from RDF content via
rdflib.This function works the same as
discover(), but gets its URI list from a triple store. Seediscover()for a more detailed explanation of how this algorithm works.- Parameters:
graph –
Either a pre-instantiated RDFlib graph, or an input type to the
sourcekeyword ofrdflib.Graph.parse(). This can be one of the following:A string or bytes representation of a URL
A string, bytes, or Path representation of a local file
An I/O object that can be read directly
An open XML reader from RDFlib (
rdflib.parser.InputSource)
format – If
graphis given as a URL or I/O object, this is passed through to theformatkeyword ofrdflib.Graph.parse(). If none is given, defaults toturtle.kwargs – Keyword arguments passed through to
discover()
- Returns:
A converter with dummy prefixes for URI prefixes appearing in the RDF content (i.e., triples).