: expected rule oC_SingleQuery (line: 1, offset: 86)\n",
+ "\"MERGE (s:Entity {uri: 'http://dbpedia.org/resource/International_Old_Catholic_Bishops'_Conference'})\"\n",
+ " ^^^^^^^^^^^\n",
+ "Data successfully uploaded to Kuzu database.\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Importing the CSV file in KIARA"
+ ],
+ "metadata": {
+ "id": "Tlt6B1PwxMlU"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "from kiara.api import KiaraAPI\n",
+ "import pandas as pd\n",
+ "import networkx as nx\n",
+ "\n",
+ "# Initialize Kiara instance\n",
+ "kiara = KiaraAPI.instance()\n",
+ "# Load the CSV file as a pandas DataFrame\n",
+ "csv_file_path = \"/content/merged_knowledge_graph_triples.csv\"\n",
+ "data = pd.read_csv(csv_file_path)\n",
+ "\n",
+ "# Preview the data (optional)\n",
+ "print(\"Data preview:\")\n",
+ "print(data.head())\n",
+ "\n",
+ "KG = kiara.run_job('import.local.file', inputs={'path': csv_file_path}, comment=\"\")\n",
+ "KG\n"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 1000
+ },
+ "id": "UAHhAznXhbHY",
+ "outputId": "ed0ea24a-be30-4e82-fd5d-ddee753de6bd"
+ },
+ "execution_count": 23,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Data preview:\n",
+ " subject \\\n",
+ "0 Walhalla (memorial) \n",
+ "1 http://dbpedia.org/resource/Ueli_Maurer \n",
+ "2 Albert Einstein \n",
+ "3 http://dbpedia.org/resource/Friedrich_Dickel \n",
+ "4 http://dbpedia.org/resource/Asian_Americans \n",
+ "\n",
+ " predicate \\\n",
+ "0 P67 \n",
+ "1 http://dbpedia.org/ontology/birthPlace \n",
+ "2 P67 \n",
+ "3 http://dbpedia.org/ontology/birthPlace \n",
+ "4 http://dbpedia.org/property/region \n",
+ "\n",
+ " object \n",
+ "0 https://en.wikipedia.org/wiki/Walhalla_(memorial) \n",
+ "1 http://dbpedia.org/resource/Canton_of_Zürich \n",
+ "2 Institute for Advanced Study \n",
+ "3 http://dbpedia.org/resource/German_Empire \n",
+ "4 http://dbpedia.org/resource/Hawaii \n"
+ ]
+ },
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n",
+ "│ │\n",
+ "│ \u001b[1m \u001b[0m\u001b[1mfield\u001b[0m\u001b[1m \u001b[0m \u001b[1m \u001b[0m\u001b[1mvalue \u001b[0m\u001b[1m \u001b[0m │\n",
+ "│ ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │\n",
+ "│ \u001b[1m \u001b[0m\u001b[1mfile \u001b[0m\u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mPreview\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3msubject,predicate,object \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mWalhalla (memorial),P67,https://en.wikipedia.org/wiki/Walhalla_(memorial) \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Ueli_Maurer,http://dbpedia.org/ontology/birthPlace,http://dbpedia.org/resource/Ca…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mAlbert Einstein,P67,Institute for Advanced Study \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Friedrich_Dickel,http://dbpedia.org/ontology/birthPlace,http://dbpedia.org/resour…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Asian_Americans,http://dbpedia.org/property/region,http://dbpedia.org/resource/Ha…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Georges_Clemenceau,http://dbpedia.org/property/president,http://dbpedia.org/resou…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Germany,http://dbpedia.org/property/leaderName,http://dbpedia.org/resource/Frank-…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Derbyshire,http://dbpedia.org/ontology/location,http://dbpedia.org/resource/Engla…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mFrankish Kingdom from 481 to 843,P196,https://en.wikipedia.org/wiki/Francia \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mReligion in Belgium,P196,Religion in the country \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Judaism,http://dbpedia.org/ontology/wikiPageWikiLink,http://dbpedia.org/resource/…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Wim_Eijk,http://dbpedia.org/property/previousPost,http://dbpedia.org/resource/Rom…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mOld Norse religion,P102,https://en.wikipedia.org/wiki/Old_Norse_religion \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mAlbert Einstein,P67,Culture of Germany \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/University_of_Bern,http://dbpedia.org/property/type,http://dbpedia.org/resource/P…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Walter_Raleigh,http://dbpedia.org/ontology/birthPlace,http://dbpedia.org/resource…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Kingdom_of_Prussia,http://dbpedia.org/property/titleLeader,http://dbpedia.org/res…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Velsen,http://dbpedia.org/property/subdivisionType,http://dbpedia.org/resource/Pr…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Albert_Einstein,http://dbpedia.org/ontology/citizenship,http://dbpedia.org/resour…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Hans_Albert_Einstein,http://dbpedia.org/ontology/employer,\"http://dbpedia.org/res…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Princeton_University,http://dbpedia.org/ontology/type,http://dbpedia.org/resource…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/German_Empire,http://dbpedia.org/property/titleLeader,http://dbpedia.org/resource…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mCarolingian dynasty,P196,Frankish noble family founded by Charles Martel \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Christianity_in_the_Middle_Ages,http://www.w3.org/2000/01/rdf-schema#seeAlso,http…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Roman_Catholic_Diocese_of_Aachen,http://dbpedia.org/ontology/wikiPageWikiLink,htt…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/University_of_Bern,http://dbpedia.org/ontology/country,http://dbpedia.org/resourc…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/German_Empire,http://dbpedia.org/property/deputy,http://dbpedia.org/resource/Bern…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Willibrord,http://xmlns.com/foaf/0.1/isPrimaryTopicOf,http://en.wikipedia.org/wik…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mKing's College London,P196,\"Public research university in London, United Kingdom\" \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Winfried_Kretschmann,http://dbpedia.org/property/1namedata,http://dbpedia.org/res…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Renaissance,http://dbpedia.org/ontology/wikiPageWikiLink,http://dbpedia.org/resou…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Judaism,http://dbpedia.org/property/mainClassification,http://dbpedia.org/resourc…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/Czech_language,http://dbpedia.org/property/states,http://dbpedia.org/resource/Cze…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3mhttp://dbpedia.org/resource/University_of_Zurich,http://dbpedia.org/property/type,http://dbpedia.org/resource…\u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m... \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m... \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ \u001b[1m \u001b[0m \u001b[3m \u001b[0m\u001b[3m \u001b[0m\u001b[3m \u001b[0m │\n",
+ "│ │\n",
+ "╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n"
+ ],
+ "text/html": [
+ "╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n",
+ "│ │\n",
+ "│ field value │\n",
+ "│ ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │\n",
+ "│ file │\n",
+ "│ Preview subject,predicate,object │\n",
+ "│ Walhalla (memorial),P67,https://en.wikipedia.org/wiki/Walhalla_(memorial) │\n",
+ "│ http://dbpedia.org/resource/Ueli_Maurer,http://dbpedia.org/ontology/birthPlace,http://dbpedia.org/resource/Ca… │\n",
+ "│ Albert Einstein,P67,Institute for Advanced Study │\n",
+ "│ http://dbpedia.org/resource/Friedrich_Dickel,http://dbpedia.org/ontology/birthPlace,http://dbpedia.org/resour… │\n",
+ "│ http://dbpedia.org/resource/Asian_Americans,http://dbpedia.org/property/region,http://dbpedia.org/resource/Ha… │\n",
+ "│ http://dbpedia.org/resource/Georges_Clemenceau,http://dbpedia.org/property/president,http://dbpedia.org/resou… │\n",
+ "│ http://dbpedia.org/resource/Germany,http://dbpedia.org/property/leaderName,http://dbpedia.org/resource/Frank-… │\n",
+ "│ http://dbpedia.org/resource/Derbyshire,http://dbpedia.org/ontology/location,http://dbpedia.org/resource/Engla… │\n",
+ "│ Frankish Kingdom from 481 to 843,P196,https://en.wikipedia.org/wiki/Francia │\n",
+ "│ Religion in Belgium,P196,Religion in the country │\n",
+ "│ http://dbpedia.org/resource/Judaism,http://dbpedia.org/ontology/wikiPageWikiLink,http://dbpedia.org/resource/… │\n",
+ "│ http://dbpedia.org/resource/Wim_Eijk,http://dbpedia.org/property/previousPost,http://dbpedia.org/resource/Rom… │\n",
+ "│ Old Norse religion,P102,https://en.wikipedia.org/wiki/Old_Norse_religion │\n",
+ "│ Albert Einstein,P67,Culture of Germany │\n",
+ "│ http://dbpedia.org/resource/University_of_Bern,http://dbpedia.org/property/type,http://dbpedia.org/resource/P… │\n",
+ "│ http://dbpedia.org/resource/Walter_Raleigh,http://dbpedia.org/ontology/birthPlace,http://dbpedia.org/resource… │\n",
+ "│ http://dbpedia.org/resource/Kingdom_of_Prussia,http://dbpedia.org/property/titleLeader,http://dbpedia.org/res… │\n",
+ "│ http://dbpedia.org/resource/Velsen,http://dbpedia.org/property/subdivisionType,http://dbpedia.org/resource/Pr… │\n",
+ "│ http://dbpedia.org/resource/Albert_Einstein,http://dbpedia.org/ontology/citizenship,http://dbpedia.org/resour… │\n",
+ "│ http://dbpedia.org/resource/Hans_Albert_Einstein,http://dbpedia.org/ontology/employer,\"http://dbpedia.org/res… │\n",
+ "│ http://dbpedia.org/resource/Princeton_University,http://dbpedia.org/ontology/type,http://dbpedia.org/resource… │\n",
+ "│ http://dbpedia.org/resource/German_Empire,http://dbpedia.org/property/titleLeader,http://dbpedia.org/resource… │\n",
+ "│ Carolingian dynasty,P196,Frankish noble family founded by Charles Martel │\n",
+ "│ http://dbpedia.org/resource/Christianity_in_the_Middle_Ages,http://www.w3.org/2000/01/rdf-schema#seeAlso,http… │\n",
+ "│ http://dbpedia.org/resource/Roman_Catholic_Diocese_of_Aachen,http://dbpedia.org/ontology/wikiPageWikiLink,htt… │\n",
+ "│ http://dbpedia.org/resource/University_of_Bern,http://dbpedia.org/ontology/country,http://dbpedia.org/resourc… │\n",
+ "│ http://dbpedia.org/resource/German_Empire,http://dbpedia.org/property/deputy,http://dbpedia.org/resource/Bern… │\n",
+ "│ http://dbpedia.org/resource/Willibrord,http://xmlns.com/foaf/0.1/isPrimaryTopicOf,http://en.wikipedia.org/wik… │\n",
+ "│ King's College London,P196,\"Public research university in London, United Kingdom\" │\n",
+ "│ http://dbpedia.org/resource/Winfried_Kretschmann,http://dbpedia.org/property/1namedata,http://dbpedia.org/res… │\n",
+ "│ http://dbpedia.org/resource/Renaissance,http://dbpedia.org/ontology/wikiPageWikiLink,http://dbpedia.org/resou… │\n",
+ "│ http://dbpedia.org/resource/Judaism,http://dbpedia.org/property/mainClassification,http://dbpedia.org/resourc… │\n",
+ "│ http://dbpedia.org/resource/Czech_language,http://dbpedia.org/property/states,http://dbpedia.org/resource/Cze… │\n",
+ "│ http://dbpedia.org/resource/University_of_Zurich,http://dbpedia.org/property/type,http://dbpedia.org/resource… │\n",
+ "│ ... │\n",
+ "│ ... │\n",
+ "│ │\n",
+ "│ │\n",
+ "╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n",
+ "
\n"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 23
+ }
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "From this point on, it is possible to exploit the extracted knowledge graph in the network analysis module as described in the [related tutorial](https://github.com/DHARPA-Project/kiara_plugin.dh_tagung_2023/blob/main/docs/notebooks/Network_Analysis.ipynb)."
+ ],
+ "metadata": {
+ "id": "nRTQkasoU8vN"
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Lessons learnt and future work"
+ ],
+ "metadata": {
+ "id": "QMrMvx4rmwAK"
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "As in the case of the colab tutorial for [journal harvesting using EUROPEANA API](https://github.com/DHARPA-Project/kiara_plugin.topic_modelling/blob/develop/docs/jupyter/kiarapeana_topic_modeling.ipynb) the generation based on the *Kiara Module Builder* was only slightly more useful than the general purpose ChatGPT, this time because the part concerning *kiara* and *kiara*'s data structures was even lesser than in the previous project.\n",
+ "\n",
+ "The present contribution can be improved by proposing a workflow to assist the programming-agnostic user to query the knowledge graph in kuzu, maybe offering template queries easy to be run off-the-shelf.\n",
+ "\n",
+ "Furthermore, the whole pipeline and its functions can be packaged as a kiara plug-in or kiara pipeline."
+ ],
+ "metadata": {
+ "id": "JAGiPiDZm9Nx"
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "#Appendix"
+ ],
+ "metadata": {
+ "id": "IuIbV6NBgdNs"
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "\n",
+ "SNIPPET of code to save all kiara codebase into a single txt file:\n",
+ "\n",
+ "# Clone the main kiara repository\n",
+ "git clone https://github.com/DHARPA-Project/kiara.git\n",
+ "\n",
+ "# Clone the kiara_plugin.network_analysis repository\n",
+ "git clone https://github.com/DHARPA-Project/kiara_plugin.network_analysis.git\n",
+ "\n",
+ "# Clone the NetworkAnalysis repository\n",
+ "git clone https://github.com/DHARPA-Project/NetworkAnalysis.git\n",
+ "\n",
+ "# Clone the TopicModelling- repository\n",
+ "git clone https://github.com/DHARPA-Project/TopicModelling-.git\n",
+ "\n",
+ "# Clone the jupyterlab-extension-example repository\n",
+ "git clone https://github.com/DHARPA-Project/jupyterlab-extension-example.git\n",
+ "\n",
+ "# Clone the asciinet repository\n",
+ "git clone https://github.com/DHARPA-Project/asciinet.git\n",
+ "\n",
+ "\n",
+ "# Navigate to the kiara repository\n",
+ "cd kiara\n",
+ "# List all files\n",
+ "find . > ../kiara_files.txt\n",
+ "# Return to the parent directory\n",
+ "cd ..\n",
+ "\n",
+ "# Repeat for each repository\n",
+ "cd kiara_plugin.network_analysis\n",
+ "find . > ../kiara_plugin_network_analysis_files.txt\n",
+ "cd ..\n",
+ "\n",
+ "cd NetworkAnalysis\n",
+ "find . > ../NetworkAnalysis_files.txt\n",
+ "cd ..\n",
+ "\n",
+ "cd TopicModelling-\n",
+ "find . > ../TopicModelling_files.txt\n",
+ "cd ..\n",
+ "\n",
+ "cd jupyterlab-extension-example\n",
+ "find . > ../jupyterlab_extension_example_files.txt\n",
+ "cd ..\n",
+ "\n",
+ "cd asciinet\n",
+ "find . > ../asciinet_files.txt\n",
+ "cd ..\n",
+ "\n",
+ "\n",
+ "# Combine all listings into a single file\n",
+ "cat kiara_files.txt kiara_plugin_network_analysis_files.txt NetworkAnalysis_files.txt TopicModelling_files.txt jupyterlab_extension_example_files.txt asciinet_files.txt > DHARPA_Project_files.txt\n",
+ "\n",
+ "then run:\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "metadata": {
+ "id": "W7KmZs6CdqRV"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "import os\n",
+ "\n",
+ "# List of repository directories\n",
+ "repos = [\n",
+ " \"kiara\",\n",
+ " \"kiara_plugin.network_analysis\",\n",
+ " \"NetworkAnalysis\",\n",
+ " \"TopicModelling-\",\n",
+ " \"jupyterlab-extension-example\",\n",
+ " \"asciinet\"\n",
+ "]\n",
+ "\n",
+ "# Output file\n",
+ "output_file = \"DHARPA_Project_code.txt\"\n",
+ "\n",
+ "with open(output_file, 'w', encoding='utf-8') as outfile:\n",
+ " for repo in repos:\n",
+ " for root, _, files in os.walk(repo):\n",
+ " for file in files:\n",
+ " file_path = os.path.join(root, file)\n",
+ " if file.endswith('.py') or file.endswith('.md') or file.endswith('.txt') or file.endswith('.sh') or file.endswith('.json') or file.endswith('.js') or file.endswith('.yml'):\n",
+ " outfile.write(f\"\\n\\n# {file_path}\\n\")\n",
+ " with open(file_path, 'r') as infile:\n",
+ " outfile.write(infile.read())"
+ ],
+ "metadata": {
+ "id": "MCR_5MqLd2uc"
+ },
+ "execution_count": null,
+ "outputs": []
+ }
+ ]
+}
\ No newline at end of file