From 110ec496f1e69e806840e8bf1c6a6b4d6823fbfd Mon Sep 17 00:00:00 2001 From: Christian Boulanger <info@bibliograph.org> Date: Sun, 17 Mar 2024 10:38:24 +0100 Subject: [PATCH] Update extraction notebook --- wikidata/data-extraction.ipynb | 137 +++++++++++++++++++-------- wikidata/data/Erhard Blankenburg.csv | 2 + wikidata/query-wikidata.ipynb | 6 +- 3 files changed, 100 insertions(+), 45 deletions(-) diff --git a/wikidata/data-extraction.ipynb b/wikidata/data-extraction.ipynb index 9f6b49b..9f555d5 100644 --- a/wikidata/data-extraction.ipynb +++ b/wikidata/data-extraction.ipynb @@ -28,7 +28,7 @@ }, { "cell_type": "code", - "execution_count": 67, + "execution_count": 1, "outputs": [], "source": [ "prompt = '''\n", @@ -49,6 +49,7 @@ " - member of (P463): Organizations and associations to which the person belongs (excluding P108)\n", " - affiliation (P1416): Organization that the subject is affiliated with (not member of or employed by)\n", " - academic degree (P512): some instance of academic degree (Q189533). After making this claim, add further triples to refine the P512 statement with triples on \"conferred by\" (P1027) and on \"point in time\" (P585).\n", + " - field of work (P101): extract the main topics and themes the subject has worked and published on \n", " - editor (P98): add information on memberships in editorial boards of academic journals\n", " - founded by (P112): add information on journals, associations or other organizations that the subject helped to establish. When adding this claim, YOU MUST switch subject and object to express the reverse relationship\n", "- object-label/object-qid: here the English labels and, if known, the QIDs for the institutions and persons who are the objects of the triple. If you are not absolutely sure, leave blank\n", @@ -66,8 +67,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-15T16:01:45.855649400Z", - "start_time": "2024-03-15T16:01:45.813805600Z" + "end_time": "2024-03-17T09:29:44.073226100Z", + "start_time": "2024-03-17T09:29:44.073226100Z" } }, "id": "27d869b6191fa004" @@ -84,7 +85,7 @@ }, { "cell_type": "code", - "execution_count": 68, + "execution_count": 2, "outputs": [], "source": [ "website_text = '''\n", @@ -95,13 +96,20 @@ "Seine Promotion zum Dr. phil. erfolgte an der Universität Basel 1966. Als Assistent am Institut für Soziologie der Universität Freiburg arbeitete er von 1966 bis 1968. Von 1969 bis 1971 war er Organisationsberater beim Quickborner Team, Hamburg. Danach arbeitete Blankenburg in Basel als Senior Projektleiter bei der Prognos in Basel. 1973/1974 war er wissenschaftlicher Mitarbeiter am Max-Planck-Institut für ausländisches und internationales Strafrecht in Freiburg. Die Habilitation für das Fach Soziologie erwarb er 1974 an der Universität Freiburg. Blankenburg war von 1975 bis 1980 Mitglied des Wissenschaftszentrums Berlin, Internationales Institut für Management und Verwaltung.\n", "\n", "1980 bekam er einen Ruf auf den Lehrstuhl für Rechtssoziologie der Vrije Universiteit Amsterdam. Gemeinsam mit Wolfgang Kaupen spielte er eine wichtige Rolle bei der Neubegründung der Deutschen Rechtssoziologie in den 70er-Jahren (Raiser 1998), ebenso, mit Volkmar Gessner, bei der Gründung des International Institute for the Sociology of Law. Er gehörte auch zu den Initiatoren und zu den Gründungsherausgebern der Zeitschrift für Rechtssoziologie. Gemeinsam mit Bill Felstiner organisierte er 1991 in Amsterdam das erste gemeinsame Treffen der beiden bedeutenden Vereinigungen der Rechtssoziologie (LSA und RCSL). Seine Beschäftigung mit rechtssoziologischen Themen war ungewöhnlich breit, reichte von der Soziologie der Kriminalität über die des Staatsapparates bis zu der des Zivilrechts. Blankenburg war primär Empiriker und Methodiker (vgl. seine Empirische Rechtssoziologie). Seine wichtigsten Beiträge zur rechtssoziologischen Theorie betreffen die Begriffe der \"Mobilisierung des Rechts\" und der \"Rechtskultur(en)\". Vor allem aber wirkte er als Koordinator, Organisator und als Vermittler zwischen Wissenschaft und Praxis: \"Er bemühte sich nicht, eine 'Schule' zu gründen, ihm fiel es leicht, in stets wechselnden Teams mit wechselnden Wissenschaftlern zusammenzuarbeiten. Wie kein anderer Rechtssoziologe vermochte er, erfolgreich Tagungen zu organisieren, kompetente Referenten zu gewinnen und die Veranstaltungen mit Autorität und zugleich locker zu leiten\" (Theo Rasehorn 1998, 23). \n", + "\n", + "https://www.linkedin.com/in/erhard-blankenburg-63938058/\n", + "\n", + "Erhard Blankenburg has been teaching sociology of law at the Vrije Universiteit Amsterdam from 1980 to 2003. \n", + "He got a Master of Arts at the University of Oregon, a Doctors degree from Basel (Switzerland) and a Dr. habil. at Freiburg (Germany). \n", + "After teaching sociology and sociology of law at Freiburg University 1965 -1970, he served as consultant with the QuickbornTeam Hamburg until 1972, as senior research fellow at the PrognosAG Basel until 1974, at the Max Planck Institut Freiburg 1974/75 and at the Science Centre Berlin until 1980.\n", + "Since 1990 evaluating system renovation in EastGermany, South Africa, post communist countries in Central Europe. Book publications on comparative legal cultures, police, public prosecutors, civil courts, labour courts, legal aid and mobilization of law .\n", "'''" ], "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-15T16:01:46.714298900Z", - "start_time": "2024-03-15T16:01:46.713784100Z" + "end_time": "2024-03-17T09:29:51.010290900Z", + "start_time": "2024-03-17T09:29:51.006986200Z" } }, "id": "37687f2fd256a439" @@ -126,7 +134,7 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": 3, "outputs": [], "source": [ "import io\n", @@ -151,8 +159,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-15T16:01:47.334376400Z", - "start_time": "2024-03-15T16:01:47.330143Z" + "end_time": "2024-03-17T09:30:03.319060900Z", + "start_time": "2024-03-17T09:29:54.835405100Z" } }, "id": "b276d407b1a723fb" @@ -169,14 +177,14 @@ }, { "cell_type": "code", - "execution_count": 70, + "execution_count": 4, "outputs": [ { "data": { - "text/plain": " subject-label subject-qid \\\n0 Erhard Blankenburg Q51595283 \n1 Erhard Blankenburg Q51595283 \n2 Erhard Blankenburg Q51595283 \n3 Erhard Blankenburg Q51595283 \n4 Erhard Blankenburg Q51595283 \n5 Master of Arts NaN \n6 Erhard Blankenburg Q51595283 \n7 Erhard Blankenburg Q51595283 \n8 Erhard Blankenburg Q51595283 \n9 Erhard Blankenburg Q51595283 \n10 Erhard Blankenburg Q51595283 \n11 Habilitation NaN \n12 Erhard Blankenburg Q51595283 \n13 Erhard Blankenburg Q51595283 \n14 International Institute for the Sociology of Law Q1570309 \n15 Zeitschrift für Rechtssoziologie NaN \n\n predicate pid \\\n0 educated at P69 \n1 educated at P69 \n2 educated at P69 \n3 educated at P69 \n4 academic degree P512 \n5 conferred by P1027 \n6 employer P108 \n7 employer P108 \n8 employer P108 \n9 employer P108 \n10 academic degree P512 \n11 conferred by P1027 \n12 member of P463 \n13 academic appointment P8413 \n14 founded by P112 \n15 founded by P112 \n\n object object-qid start_time \\\n0 University of Freiburg NaN NaN \n1 Free University of Berlin NaN NaN \n2 University of Oregon NaN NaN \n3 University of Basel NaN NaN \n4 Master of Arts NaN 1965 \n5 University of Basel NaN 1965 \n6 University of Freiburg NaN 1966 \n7 Quickborner Team NaN 1969 \n8 Prognos NaN NaN \n9 Max-Planck-Institut für ausländisches und inte... NaN 1973 \n10 Habilitation NaN 1974 \n11 University of Freiburg NaN 1974 \n12 Wissenschaftszentrums Berlin, Internationales ... NaN 1975 \n13 Vrije Universiteit Amsterdam NaN 1980 \n14 Erhard Blankenburg Q51595283 NaN \n15 Erhard Blankenburg Q51595283 NaN \n\n end_time \\\n0 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n1 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n2 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n3 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n4 1965 \n5 1965 \n6 1968 \n7 1971 \n8 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n9 1974 \n10 1974 \n11 1974 \n12 1980 \n13 NaN \n14 NaN \n15 NaN \n\n reference_url \n0 NaN \n1 NaN \n2 NaN \n3 NaN \n4 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n5 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n6 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n7 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n8 NaN \n9 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n10 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n11 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n12 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n13 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n14 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n15 https://de.wikipedia.org/wiki/Erhard_Blankenburg ", - "text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>subject-label</th>\n <th>subject-qid</th>\n <th>predicate</th>\n <th>pid</th>\n <th>object</th>\n <th>object-qid</th>\n <th>start_time</th>\n <th>end_time</th>\n <th>reference_url</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>educated at</td>\n <td>P69</td>\n <td>University of Freiburg</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>1</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>educated at</td>\n <td>P69</td>\n <td>Free University of Berlin</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>2</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>educated at</td>\n <td>P69</td>\n <td>University of Oregon</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>3</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>educated at</td>\n <td>P69</td>\n <td>University of Basel</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>4</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>academic degree</td>\n <td>P512</td>\n <td>Master of Arts</td>\n <td>NaN</td>\n <td>1965</td>\n <td>1965</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>5</th>\n <td>Master of Arts</td>\n <td>NaN</td>\n <td>conferred by</td>\n <td>P1027</td>\n <td>University of Basel</td>\n <td>NaN</td>\n <td>1965</td>\n <td>1965</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>6</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>employer</td>\n <td>P108</td>\n <td>University of Freiburg</td>\n <td>NaN</td>\n <td>1966</td>\n <td>1968</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>7</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>employer</td>\n <td>P108</td>\n <td>Quickborner Team</td>\n <td>NaN</td>\n <td>1969</td>\n <td>1971</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>8</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>employer</td>\n <td>P108</td>\n <td>Prognos</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>9</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>employer</td>\n <td>P108</td>\n <td>Max-Planck-Institut für ausländisches und inte...</td>\n <td>NaN</td>\n <td>1973</td>\n <td>1974</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>10</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>academic degree</td>\n <td>P512</td>\n <td>Habilitation</td>\n <td>NaN</td>\n <td>1974</td>\n <td>1974</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>11</th>\n <td>Habilitation</td>\n <td>NaN</td>\n <td>conferred by</td>\n <td>P1027</td>\n <td>University of Freiburg</td>\n <td>NaN</td>\n <td>1974</td>\n <td>1974</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>12</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>member of</td>\n <td>P463</td>\n <td>Wissenschaftszentrums Berlin, Internationales ...</td>\n <td>NaN</td>\n <td>1975</td>\n <td>1980</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>13</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>academic appointment</td>\n <td>P8413</td>\n <td>Vrije Universiteit Amsterdam</td>\n <td>NaN</td>\n <td>1980</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>14</th>\n <td>International Institute for the Sociology of Law</td>\n <td>Q1570309</td>\n <td>founded by</td>\n <td>P112</td>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>15</th>\n <td>Zeitschrift für Rechtssoziologie</td>\n <td>NaN</td>\n <td>founded by</td>\n <td>P112</td>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n </tbody>\n</table>\n</div>" + "text/plain": " Erhard Blankenburg Q51595283 educated at P69 \\\n0 Erhard Blankenburg Q51595283 educated at P69 \n1 Erhard Blankenburg Q51595283 educated at P69 \n2 Erhard Blankenburg Q51595283 educated at P69 \n3 Erhard Blankenburg Q51595283 academic degree P512 \n4 Erhard Blankenburg Q51595283 academic degree P512 \n5 Erhard Blankenburg Q51595283 employer P108 \n6 Erhard Blankenburg Q51595283 employer P108 \n7 Erhard Blankenburg Q51595283 employer P108 \n8 Erhard Blankenburg Q51595283 academic appointment P8413 \n9 Erhard Blankenburg Q51595283 academic appointment P8413 \n10 Erhard Blankenburg Q51595283 founded by P112 \n11 Zeitschrift für Rechtssoziologie NaN founded by P112 \n12 Erhard Blankenburg Q51595283 field of work P101 \n13 Erhard Blankenburg Q51595283 field of work P101 \n14 Erhard Blankenburg Q51595283 field of work P101 \n15 Erhard Blankenburg Q51595283 field of work P101 \n16 Erhard Blankenburg Q51595283 employer P108 \n17 Erhard Blankenburg Q51595283 academic appointment P8413 \n\n University of Freiburg Unnamed: 5 Unnamed: 6 \\\n0 FU Berlin NaN NaN \n1 University of Oregon NaN NaN \n2 University of Basel NaN NaN \n3 Master of Arts NaN 1965.0 \n4 Dr. phil. NaN 1966.0 \n5 Quickborner Team, Hamburg NaN 1969.0 \n6 Prognos in Basel NaN NaN \n7 Max-Planck-Institut für ausländisches und inte... NaN 1973.0 \n8 University of Freiburg NaN 1975.0 \n9 Vrije Universiteit Amsterdam NaN 1980.0 \n10 International Institute for the Sociology of Law NaN NaN \n11 Erhard Blankenburg Q51595283 NaN \n12 Sociology of law NaN NaN \n13 Criminal sociology NaN NaN \n14 Sociology of the state apparatus NaN NaN \n15 Civil law sociology NaN NaN \n16 Science Centre Berlin NaN 1975.0 \n17 Vrije Universiteit Amsterdam NaN 1980.0 \n\n Unnamed: 7 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n0 NaN https://de.wikipedia.org/wiki/Erhard_Blankenburg \n1 NaN https://de.wikipedia.org/wiki/Erhard_Blankenburg \n2 NaN https://de.wikipedia.org/wiki/Erhard_Blankenburg \n3 1965.0 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n4 1966.0 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n5 1971.0 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n6 1974.0 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n7 1974.0 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n8 1980.0 https://de.wikipedia.org/wiki/Erhard_Blankenburg \n9 NaN https://de.wikipedia.org/wiki/Erhard_Blankenburg \n10 NaN https://de.wikipedia.org/wiki/Erhard_Blankenburg \n11 NaN https://de.wikipedia.org/wiki/Erhard_Blankenburg \n12 NaN https://de.wikipedia.org/wiki/Erhard_Blankenburg \n13 NaN https://de.wikipedia.org/wiki/Erhard_Blankenburg \n14 NaN https://de.wikipedia.org/wiki/Erhard_Blankenburg \n15 NaN https://de.wikipedia.org/wiki/Erhard_Blankenburg \n16 1980.0 https://www.linkedin.com/in/erhard-blankenburg... \n17 2003.0 https://www.linkedin.com/in/erhard-blankenburg... ", + "text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>Erhard Blankenburg</th>\n <th>Q51595283</th>\n <th>educated at</th>\n <th>P69</th>\n <th>University of Freiburg</th>\n <th>Unnamed: 5</th>\n <th>Unnamed: 6</th>\n <th>Unnamed: 7</th>\n <th>https://de.wikipedia.org/wiki/Erhard_Blankenburg</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>educated at</td>\n <td>P69</td>\n <td>FU Berlin</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>1</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>educated at</td>\n <td>P69</td>\n <td>University of Oregon</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>2</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>educated at</td>\n <td>P69</td>\n <td>University of Basel</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>3</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>academic degree</td>\n <td>P512</td>\n <td>Master of Arts</td>\n <td>NaN</td>\n <td>1965.0</td>\n <td>1965.0</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>4</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>academic degree</td>\n <td>P512</td>\n <td>Dr. phil.</td>\n <td>NaN</td>\n <td>1966.0</td>\n <td>1966.0</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>5</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>employer</td>\n <td>P108</td>\n <td>Quickborner Team, Hamburg</td>\n <td>NaN</td>\n <td>1969.0</td>\n <td>1971.0</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>6</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>employer</td>\n <td>P108</td>\n <td>Prognos in Basel</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>1974.0</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>7</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>employer</td>\n <td>P108</td>\n <td>Max-Planck-Institut für ausländisches und inte...</td>\n <td>NaN</td>\n <td>1973.0</td>\n <td>1974.0</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>8</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>academic appointment</td>\n <td>P8413</td>\n <td>University of Freiburg</td>\n <td>NaN</td>\n <td>1975.0</td>\n <td>1980.0</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>9</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>academic appointment</td>\n <td>P8413</td>\n <td>Vrije Universiteit Amsterdam</td>\n <td>NaN</td>\n <td>1980.0</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>10</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>founded by</td>\n <td>P112</td>\n <td>International Institute for the Sociology of Law</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>11</th>\n <td>Zeitschrift für Rechtssoziologie</td>\n <td>NaN</td>\n <td>founded by</td>\n <td>P112</td>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>12</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>field of work</td>\n <td>P101</td>\n <td>Sociology of law</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>13</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>field of work</td>\n <td>P101</td>\n <td>Criminal sociology</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>14</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>field of work</td>\n <td>P101</td>\n <td>Sociology of the state apparatus</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>15</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>field of work</td>\n <td>P101</td>\n <td>Civil law sociology</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>NaN</td>\n <td>https://de.wikipedia.org/wiki/Erhard_Blankenburg</td>\n </tr>\n <tr>\n <th>16</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>employer</td>\n <td>P108</td>\n <td>Science Centre Berlin</td>\n <td>NaN</td>\n <td>1975.0</td>\n <td>1980.0</td>\n <td>https://www.linkedin.com/in/erhard-blankenburg...</td>\n </tr>\n <tr>\n <th>17</th>\n <td>Erhard Blankenburg</td>\n <td>Q51595283</td>\n <td>academic appointment</td>\n <td>P8413</td>\n <td>Vrije Universiteit Amsterdam</td>\n <td>NaN</td>\n <td>1980.0</td>\n <td>2003.0</td>\n <td>https://www.linkedin.com/in/erhard-blankenburg...</td>\n </tr>\n </tbody>\n</table>\n</div>" }, - "execution_count": 70, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -192,8 +200,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-15T16:02:17.954423800Z", - "start_time": "2024-03-15T16:01:48.195123500Z" + "end_time": "2024-03-17T09:30:28.719715800Z", + "start_time": "2024-03-17T09:30:06.483740300Z" } }, "id": "717d713e38598c57" @@ -203,7 +211,7 @@ "source": [ "## Manual correction\n", "\n", - "The data has now be downloaded to `data/<name>-chatgpt.csv`. It needs to be cleaned and augmented before upload, for example by loading it into OpenRefine and reconciling the `object` column via the WikiData Reconciliation service. Afterward, remove the object-qid column and recreate it via the \"add column based on this column\" function using `ucell.recon.match.id` GREL expression. \n", + "The data has now been downloaded to `data/<name>-chatgpt.csv`. It needs to be cleaned and augmented before upload, for example by loading it into OpenRefine and reconciling the `object` column via the WikiData Reconciliation service. Afterward, remove the object-qid column and recreate it via the \"add column based on this column\" function using `ucell.recon.match.id` GREL expression. \n", "\n", "Otherwise, you can also just look up the terms and fill out the object-qid column manually. \n", "\n", @@ -226,7 +234,7 @@ }, { "cell_type": "code", - "execution_count": 94, + "execution_count": 5, "outputs": [ { "name": "stdout", @@ -277,66 +285,111 @@ "Time qualifier P585 with value 1974 already exists on (Q51595283)-[P512]-(Q308678).\n", "Source URL https://de.wikipedia.org/wiki/Erhard_Blankenburg already exists on (Q51595283)-[P512]-(Q308678).\n", "----------\n", - "Created (Q51595283)-[P108]-(Q475602)\n" + "(Q51595283)-[P108]-(Q475602) exists.\n", + "Time qualifier P580 with value 1975 already exists on (Q51595283)-[P108]-(Q475602).\n", + "Time qualifier P582 with value 1980 already exists on (Q51595283)-[P108]-(Q475602).\n", + "Source URL https://de.wikipedia.org/wiki/Erhard_Blankenburg already exists on (Q51595283)-[P108]-(Q475602).\n", + "----------\n", + "(Q51595283)-[P8413]-(Q1065414) exists.\n", + "Time qualifier P580 with value 1980 already exists on (Q51595283)-[P8413]-(Q1065414).\n", + "Source URL https://de.wikipedia.org/wiki/Erhard_Blankenburg already exists on (Q51595283)-[P8413]-(Q1065414).\n", + "----------\n", + "(Q51595283)-[P1416]-(Q1459361) exists.\n", + "Source URL https://de.wikipedia.org/wiki/Erhard_Blankenburg already exists on (Q51595283)-[P1416]-(Q1459361).\n", + "----------\n", + "(Q51595283)-[P98]-(Q96335163) exists.\n", + "Source URL https://de.wikipedia.org/wiki/Erhard_Blankenburg already exists on (Q51595283)-[P98]-(Q96335163).\n", + "----------\n", + "Created (Q65972149)-[P112]-(Q51595283)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "Sleeping for 9.5 seconds, 2024-03-16 20:09:39\n" + "Sleeping for 9.5 seconds, 2024-03-17 10:36:18\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Added start_time qualifier to (Q51595283)-[P108]-(Q475602)\n" + "Added references to (Q65972149)-[P112]-(Q51595283)\n", + "----------\n", + "Refining (Q65972149)-[P112]-(Q51595283)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "Sleeping for 9.5 seconds, 2024-03-16 20:09:49\n" + "Sleeping for 9.5 seconds, 2024-03-17 10:36:28\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Added end_time qualifier to (Q51595283)-[P108]-(Q475602)\n" + "Added end_time qualifier to (Q65972149)-[P112]-(Q51595283)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "Sleeping for 9.5 seconds, 2024-03-16 20:09:59\n" + "Sleeping for 9.1 seconds, 2024-03-17 10:36:38\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Added references to (Q51595283)-[P108]-(Q475602)\n", + "Added references to (Q65972149)-[P112]-(Q51595283)\n", "----------\n", - "(Q51595283)-[P8413]-(Q1065414) exists.\n", - "Time qualifier P580 with value 1980 already exists on (Q51595283)-[P8413]-(Q1065414).\n", - "Source URL https://de.wikipedia.org/wiki/Erhard_Blankenburg already exists on (Q51595283)-[P8413]-(Q1065414).\n", - "----------\n", - "(Q51595283)-[P1416]-(Q1459361) exists.\n", - "Source URL https://de.wikipedia.org/wiki/Erhard_Blankenburg already exists on (Q51595283)-[P1416]-(Q1459361).\n", - "----------\n", - "(Q51595283)-[P98]-(Q96335163) exists.\n", - "Source URL https://de.wikipedia.org/wiki/Erhard_Blankenburg already exists on (Q51595283)-[P98]-(Q96335163).\n", - "----------\n", - "(Q65972149)-[P112]-(Q51595283) exists.\n", - "Source URL https://de.wikipedia.org/wiki/Erhard_Blankenburg already exists on (Q65972149)-[P112]-(Q51595283).\n", - "----------\n", - "Refining (Q65972149)-[P112]-(Q51595283)\n", - "Time qualifier P582 with value 2003 already exists on (Q65972149)-[P112]-(Q51595283).\n", - "Source URL https://www.linkedin.com/in/erhard-blankenburg-63938058/ already exists on (Q65972149)-[P112]-(Q51595283).\n" + "(Q51595283)-[P101]-(Q847034) exists.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Sleeping for 8.8 seconds, 2024-03-17 10:36:48\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Added references to (Q51595283)-[P101]-(Q847034)\n", + "----------\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Sleeping for 8.4 seconds, 2024-03-17 10:36:59\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Created (Q51595283)-[P101]-(Q161733)\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Sleeping for 9.3 seconds, 2024-03-17 10:37:08\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Added references to (Q51595283)-[P101]-(Q161733)\n" ] } ], @@ -511,8 +564,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-16T19:10:11.108724500Z", - "start_time": "2024-03-16T19:09:34.521133800Z" + "end_time": "2024-03-17T09:37:18.357712600Z", + "start_time": "2024-03-17T09:36:05.736657800Z" } }, "id": "bdb602fb42b562df" diff --git a/wikidata/data/Erhard Blankenburg.csv b/wikidata/data/Erhard Blankenburg.csv index 9da5ad4..81a615d 100644 --- a/wikidata/data/Erhard Blankenburg.csv +++ b/wikidata/data/Erhard Blankenburg.csv @@ -16,3 +16,5 @@ Erhard Blankenburg,Q51595283,affiliated with,P1416,International Institute for t Erhard Blankenburg,Q51595283,editor,P98,Zeitschrift fur Rechtssoziologie,Q96335163,,,https://de.wikipedia.org/wiki/Erhard_Blankenburg Zeitschrift fur Rechtssoziologie,Q65972149,founded by,P112,Erhard Blankenburg,Q51595283,,,https://de.wikipedia.org/wiki/Erhard_Blankenburg Erhard Blankenburg,Q51595283,academic appointment,P8413,Free University of Amsterdam,Q1065414,,2003,https://www.linkedin.com/in/erhard-blankenburg-63938058/ +Erhard Blankenburg,Q51595283,field of work,P101,Sociology of law,Q847034,,,https://de.wikipedia.org/wiki/Erhard_Blankenburg +Erhard Blankenburg,Q51595283,field of work,P101,Criminal sociology,Q161733,,,https://de.wikipedia.org/wiki/Erhard_Blankenburg \ No newline at end of file diff --git a/wikidata/query-wikidata.ipynb b/wikidata/query-wikidata.ipynb index a8910ba..daeb1b4 100644 --- a/wikidata/query-wikidata.ipynb +++ b/wikidata/query-wikidata.ipynb @@ -2,13 +2,13 @@ "cells": [ { "cell_type": "code", - "execution_count": 78, + "execution_count": 1, "id": "initial_id", "metadata": { "collapsed": true, "ExecuteTime": { - "end_time": "2024-03-14T08:55:46.227687600Z", - "start_time": "2024-03-14T08:55:46.202503500Z" + "end_time": "2024-03-17T09:35:51.668004200Z", + "start_time": "2024-03-17T09:35:50.655968800Z" } }, "outputs": [], -- GitLab