load_from_rdf

ampligraph.datasets.load_from_rdf(folder_name, file_name, format='nt', data_home=None)

Load an RDF file

Loads an RDF knowledge graph using rdflib APIs. The entire graph will be loaded in memory, and converted into an rdflib Graph object.
Parameters:
  • folder_name (str) – base folder within AMPLIGRAPH_DATA_HOME where the file is stored.
  • file_name (str) – file name
  • format (str) – The RDF serialization format (nt, ttl, rdf/xml - see rdflib documentation)
Returns:

triples – the actual triples of the file.

Return type:

ndarray , shape [n, 3]