<jupyter_start><jupyter_text>RDFlib namespaces<jupyter_code>import sys
sys.path.append("../../..")

from heritageconnector import datastore

from rdflib import Graph, Literal, URIRef
from rdflib.namespace import XSD, FOAF, OWL, RDF, PROV
context = [
    {"@foaf": "http://xmlns.com/foaf/0.1/", "@language": "en"},
    {"@sdo": "https://schema.org/", "@language": "en"},
    {"@owl": "http://www.w3.org/2002/07/owl#", "@language": "en"},
    {"@xsd": "http://www.w3.org/2001/XMLSchema#", "@language": "en"},
    {"@wd": "http://www.wikidata.org/entity/", "@language": "en"},
    {"@wdt": "http://www.wikidata.org/prop/direct/", "@language": "en"},
    {"@prov": "http://www.w3.org/ns/prov#", "@language": "en"},
]

g = datastore.get_graph_by_type('PERSON')

[n for n in g.namespace_manager.namespaces()]
g.namespace_manager.compute_qname("http://www.w3.org/2001/XMLSchema#deathPlace", generate=False)
URIRef('http://www.w3.org/2001/XMLSchema#deathPlace') == XSD.deathPlace<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.24175824175824176, 'fraction_numerical': 0.024975024975024976, 'mean_word_length': 4.859649122807017, 'pattern_counts': {'":': 14, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 7, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '413977', 'license': 'MIT', 'n_tokens_mistral': 409, 'n_tokens_neox': 390, 'n_words': 62, 'path': 'experiments/RDF namespaces.ipynb', 'repo_name': 'TheScienceMuseum/heritage-connector', 'size': '1001'}