discover_from_rdf(graph: IO[bytes] | TextIO | rdflib.parser.InputSource | str | bytes | PurePath | rdflib.Graph, *, format: typing_extensions.Literal[turtle, xml, n3, nt, trix] | 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. See discover() for a more detailed explanation of how this algorithm works.

  • graph

    Either a pre-instantiated RDFlib graph, or an input type to the source keyword of rdflib.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 graph is given as a URL or I/O object, this is passed through to the format keyword of rdflib.Graph.parse(). If none is given, defaults to turtle.

  • kwargs – Keyword arguments passed through to discover()


A converter with dummy prefixes for URI prefixes appearing in the RDF content (i.e., triples).