Laura Wagner commited on
Commit
afa4697
Β·
1 Parent(s): d72b34b

added danbooru taxonomy jupyter notebook

Browse files
jupyter_notebooks/SuppM_Figure_12_Danbooru_Taxonomy.ipynb CHANGED
@@ -5,12 +5,20 @@
5
  "id": "68a6e559-6ef4-4c7f-8736-93bc8588e3bc",
6
  "metadata": {},
7
  "source": [
8
- "# Getting Tags and Categories from Danbooru.donmai.us"
 
 
 
 
 
 
 
 
9
  ]
10
  },
11
  {
12
  "cell_type": "code",
13
- "execution_count": 6,
14
  "id": "a97e3a64-5990-44a9-809d-45030e85f161",
15
  "metadata": {
16
  "execution": {
@@ -39,7 +47,7 @@
39
  },
40
  {
41
  "cell_type": "code",
42
- "execution_count": 7,
43
  "id": "1f50a910-66c2-472a-8027-dd589b6ae755",
44
  "metadata": {
45
  "execution": {
@@ -57,7 +65,7 @@
57
  },
58
  {
59
  "cell_type": "code",
60
- "execution_count": 8,
61
  "id": "a0f846e3-1fcc-4839-a459-c974f9c46d06",
62
  "metadata": {
63
  "execution": {
@@ -92,7 +100,7 @@
92
  },
93
  {
94
  "cell_type": "code",
95
- "execution_count": 9,
96
  "id": "00ffaf5f-a4ae-408a-8a7c-e6b174f091f8",
97
  "metadata": {
98
  "execution": {
@@ -104,20 +112,13 @@
104
  }
105
  },
106
  "outputs": [
107
- {
108
- "name": "stdin",
109
- "output_type": "stream",
110
- "text": [
111
- "Enter a single tag to test: wombat\n"
112
- ]
113
- },
114
  {
115
  "name": "stdout",
116
  "output_type": "stream",
117
  "text": [
118
  "πŸš€ Fetching tag details for 'wombat'...\n",
119
  "πŸ”Ž Running cURL: curl -s -L --user parodyofsomething:FkzGApb17bfJayJMqKTzeyTw -X GET https://danbooru.donmai.us/tags.json?search%5Bname%5D=wombat&only=id,name,category,post_count,is_deprecated,created_at,updated_at,wiki_page,artist,antecedent_alias,consequent_aliases,antecedent_implications,consequent_implications,dtext_links\n",
120
- "βœ… Test complete! Data saved to `/shares/weddigen.ki.uzh/laura_wagner/Civitai_page_analysis/Civitai_visualizations/misc/danbooru/tag_info_test/wombat_tag_info.json`.\n"
121
  ]
122
  }
123
  ],
@@ -196,7 +197,7 @@
196
  },
197
  {
198
  "cell_type": "code",
199
- "execution_count": 10,
200
  "id": "1a58f2d1-909b-41c0-bcb8-0a55e6835f53",
201
  "metadata": {
202
  "execution": {
@@ -454,7 +455,7 @@
454
  },
455
  {
456
  "cell_type": "code",
457
- "execution_count": 11,
458
  "id": "557cdd69-f6b1-4c33-9f67-a13b00c0146b",
459
  "metadata": {
460
  "execution": {
@@ -707,7 +708,7 @@
707
  },
708
  {
709
  "cell_type": "code",
710
- "execution_count": 12,
711
  "id": "c4759995-396a-4ec1-9f35-e75b3875e13c",
712
  "metadata": {
713
  "execution": {
@@ -871,7 +872,7 @@
871
  },
872
  {
873
  "cell_type": "code",
874
- "execution_count": 13,
875
  "id": "8f8b6b29-e7bd-4814-8705-2b7a68f2d660",
876
  "metadata": {
877
  "execution": {
@@ -891,7 +892,7 @@
891
  },
892
  {
893
  "cell_type": "code",
894
- "execution_count": 14,
895
  "id": "79234bc5-b287-4306-85cd-a27ddba769ea",
896
  "metadata": {
897
  "execution": {
@@ -912,7 +913,7 @@
912
  },
913
  {
914
  "cell_type": "code",
915
- "execution_count": 14,
916
  "id": "64d47678-78a4-4d55-a3a0-1c1b251b03b6",
917
  "metadata": {
918
  "execution": {
@@ -932,66 +933,66 @@
932
  "❌ No data found for attire_and_body_accessories in any format\n",
933
  "βœ… Added 91 tags directly under attire_and_body_accessories.attire.dress\n",
934
  "βœ… Added 100 tags directly under attire_and_body_accessories.attire.handwear\n",
935
- "βœ… Added 252 tags directly under attire_and_body_accessories.attire.headwear\n",
936
- "βœ… Added 72 tags directly under attire_and_body_accessories.attire.legwear\n",
937
  "βœ… Added 64 tags directly under attire_and_body_accessories.attire.mask\n",
938
- "βœ… Added 263 tags directly under attire_and_body_accessories.attire.neck_and_neckwear\n",
939
  "βœ… Added 54 tags directly under attire_and_body_accessories.attire.sexual_attire.bra\n",
940
  "βœ… Added 83 tags directly under attire_and_body_accessories.attire.sexual_attire.panties\n",
941
  "βœ… Added 87 tags directly under attire_and_body_accessories.attire.sleeves\n",
942
  "βœ… Added 83 tags directly under attire_and_body_accessories.attire.swimsuit\n",
943
  "βœ… Added 4 tags directly under attire_and_body_accessories.embellishment\n",
944
  "βœ… Added 94 tags directly under attire_and_body_accessories.eyewear\n",
945
- "βœ… Added 55 tags directly under attire_and_body_accessories.fashion_style\n",
946
  "βœ… Added 189 tags directly under attire_and_body_accessories.nudity\n",
947
  "❌ No data found for body in any format\n",
948
- "βœ… Added 39 tags directly under body.body_parts.ass\n",
949
  "βœ… Added 213 tags directly under body.body_parts.breasts_tags\n",
950
- "βœ… Added 52 tags directly under body.body_parts.ears_tags\n",
951
  "βœ… Added 200 tags directly under body.body_parts.face_tags.eyes_tags\n",
952
  "βœ… Added 31 tags directly under body.body_parts.hair.hair_color\n",
953
- "βœ… Added 156 tags directly under body.body_parts.hair.hair_styles\n",
954
- "βœ… Added 114 tags directly under body.body_parts.hands.gestures\n",
955
- "βœ… Added 263 tags directly under body.body_parts.neck_and_neckwear\n",
956
  "βœ… Added 74 tags directly under body.body_parts.penis\n",
957
- "βœ… Added 229 tags directly under body.body_parts.posture\n",
958
- "βœ… Added 49 tags directly under body.body_parts.pussy\n",
959
- "βœ… Added 63 tags directly under body.body_parts.shoulders\n",
960
  "βœ… Added 26 tags directly under body.body_parts.skin_color\n",
961
  "βœ… Added 79 tags directly under body.body_parts.tail\n",
962
- "βœ… Added 89 tags directly under body.body_parts.wings\n",
963
- "βœ… Added 54 tags directly under body.injury\n",
964
  "❌ No data found for characters in any format\n",
965
  "βœ… Added 300 tags directly under characters.ace_attorney\n",
966
- "βœ… Added 572 tags directly under characters.arknights\n",
967
  "βœ… Added 296 tags directly under characters.atelier\n",
968
  "βœ… Added 706 tags directly under characters.azur_lane\n",
969
  "βœ… Added 223 tags directly under characters.bleach\n",
970
  "βœ… Added 98 tags directly under characters.bokujou_monogatari\n",
971
  "βœ… Added 46 tags directly under characters.brave_girl_ravens\n",
972
- "βœ… Added 143 tags directly under characters.cardcaptor_sakura\n",
973
  "βœ… Added 128 tags directly under characters.danganronpa\n",
974
  "βœ… Added 240 tags directly under characters.digimon.digimon_characters\n",
975
- "βœ… Added 605 tags directly under characters.dragon_ball\n",
976
- "βœ… Added 225 tags directly under characters.dragon_quest\n",
977
- "βœ… Added 812 tags directly under characters.fate_series\n",
978
  "βœ… Added 566 tags directly under characters.final_fantasy\n",
979
- "βœ… Added 722 tags directly under characters.fire_emblem\n",
980
  "βœ… Added 441 tags directly under characters.flower_knight_girl\n",
981
  "βœ… Added 221 tags directly under characters.genderswap\n",
982
  "βœ… Added 431 tags directly under characters.gensou_suikoden\n",
983
  "❌ No data found for girls_frontline_characters in any format\n",
984
  "βœ… Added 0 tags directly under characters.girls_frontline\n",
985
  "βœ… Added 305 tags directly under characters.girls_und_panzer\n",
986
- "βœ… Added 13 tags directly under characters.gundam_mechas\n",
987
  "βœ… Added 313 tags directly under characters.hunter_x_hunter\n",
988
  "βœ… Added 348 tags directly under characters.jojo_no_kimyou_na_bouken\n",
989
- "βœ… Added 265 tags directly under characters.kamen_rider\n",
990
- "βœ… Added 462 tags directly under characters.kantai_collection\n",
991
  "βœ… Added 64 tags directly under characters.kingdom_hearts\n",
992
  "βœ… Added 72 tags directly under characters.mahou_sensei_negima\n",
993
- "βœ… Added 155 tags directly under characters.meitantei_conan\n",
994
- "βœ… Added 151 tags directly under characters.minecraft\n",
995
  "βœ… Added 198 tags directly under characters.naruto\n",
996
  "βœ… Added 336 tags directly under characters.nippon_ichi\n",
997
  "βœ… Added 375 tags directly under characters.official_mascots\n",
@@ -1001,22 +1002,22 @@
1001
  "βœ… Added 165 tags directly under characters.pokemon.families_of_pokemon_main_characters\n",
1002
  "βœ… Added 100 tags directly under characters.pokemon.gym_leaders\n",
1003
  "βœ… Added 37 tags directly under characters.pokemon.pokemon_ranger_characters\n",
1004
- "βœ… Added 126 tags directly under characters.pokemon.pokemon_trainer_classes\n",
1005
  "βœ… Added 925 tags directly under characters.pretty_cure\n",
1006
  "βœ… Added 1214 tags directly under characters.ragnarok_online\n",
1007
- "βœ… Added 397 tags directly under characters.real_life_racehorses\n",
1008
  "βœ… Added 23 tags directly under characters.rosenkreuzstilette\n",
1009
- "βœ… Added 310 tags directly under characters.sailor_moon\n",
1010
- "βœ… Added 169 tags directly under characters.street_fighter\n",
1011
  "❌ No data found for super_smash_bros_characters in any format\n",
1012
  "βœ… Added 0 tags directly under characters.super_smash_bros\n",
1013
  "❌ No data found for tales_of_characters in any format\n",
1014
  "βœ… Added 0 tags directly under characters.tales_of\n",
1015
  "βœ… Added 189 tags directly under characters.toaru_majutsu_no_index\n",
1016
- "βœ… Added 380 tags directly under characters.touhou\n",
1017
  "βœ… Added 128 tags directly under characters.touken_ranbu\n",
1018
- "βœ… Added 511 tags directly under characters.ultra_series\n",
1019
- "βœ… Added 248 tags directly under characters.umamusume\n",
1020
  "βœ… Added 140 tags directly under characters.vocaloid\n",
1021
  "βœ… Added 184 tags directly under characters.world_witches_series\n",
1022
  "❌ No data found for yu_gi_oh_characters in any format\n",
@@ -1025,27 +1026,27 @@
1025
  "❌ No data found for genres_of_video_games in any format\n",
1026
  "βœ… Added 175 tags directly under copyrights_artists_projects_and_media.genres_of_video_games.fighting_games\n",
1027
  "βœ… Added 42 tags directly under copyrights_artists_projects_and_media.genres_of_video_games.platform_games\n",
1028
- "βœ… Added 514 tags directly under copyrights_artists_projects_and_media.genres_of_video_games.role-playing_games\n",
1029
  "βœ… Added 114 tags directly under copyrights_artists_projects_and_media.genres_of_video_games.shooter_games\n",
1030
  "βœ… Added 185 tags directly under copyrights_artists_projects_and_media.genres_of_video_games.visual_novel_games\n",
1031
  "❌ No data found for creatures in any format\n",
1032
- "βœ… Added 231 tags directly under creatures.animals.birds\n",
1033
  "βœ… Added 224 tags directly under creatures.animals.cats\n",
1034
  "βœ… Added 237 tags directly under creatures.animals.dogs\n",
1035
  "βœ… Added 285 tags directly under creatures.legendary_creatures\n",
1036
- "βœ… Added 54 tags directly under drawing_software\n",
1037
  "❌ No data found for games in any format\n",
1038
  "βœ… Added 21 tags directly under games.board_games\n",
1039
  "βœ… Added 175 tags directly under games.fighting_games\n",
1040
  "βœ… Added 61 tags directly under games.game_activities\n",
1041
- "βœ… Added 417 tags directly under games.sports\n",
1042
  "βœ… Added 144 tags directly under games.video_game\n",
1043
- "βœ… Added 214 tags directly under metatags\n",
1044
  "❌ No data found for more in any format\n",
1045
  "βœ… Added 110 tags directly under more.dances\n",
1046
  "βœ… Added 29 tags directly under more.family_relationships\n",
1047
  "βœ… Added 68 tags directly under more.fire\n",
1048
- "βœ… Added 1036 tags directly under more.food_tags\n",
1049
  "βœ… Added 31 tags directly under more.groups\n",
1050
  "βœ… Added 76 tags directly under more.phrases\n",
1051
  "βœ… Added 35 tags directly under more.scan\n",
@@ -1054,30 +1055,30 @@
1054
  "βœ… Added 446 tags directly under more.verbs_and_gerunds\n",
1055
  "βœ… Added 54 tags directly under more.water\n",
1056
  "❌ No data found for objects in any format\n",
1057
- "βœ… Added 409 tags directly under objects.airplanes\n",
1058
- "βœ… Added 139 tags directly under objects.armor\n",
1059
- "βœ… Added 367 tags directly under objects.audio_tags\n",
1060
  "βœ… Added 66 tags directly under objects.cards.playing_card_faces\n",
1061
- "βœ… Added 79 tags directly under objects.computer\n",
1062
  "βœ… Added 94 tags directly under objects.eyewear\n",
1063
  "βœ… Added 407 tags directly under objects.ground_vehicles\n",
1064
  "βœ… Added 25 tags directly under objects.helicopters\n",
1065
  "βœ… Added 48 tags directly under objects.piercings\n",
1066
- "βœ… Added 93 tags directly under objects.pokemon_objects\n",
1067
- "βœ… Added 104 tags directly under objects.sex_objects\n",
1068
  "βœ… Added 256 tags directly under objects.ships\n",
1069
  "βœ… Added 917 tags directly under objects.weapons\n",
1070
  "βœ… Added 21 tags directly under plant.flowers\n",
1071
- "βœ… Added 57 tags directly under plant.plant\n",
1072
  "βœ… Added 44 tags directly under plant.tree\n",
1073
- "βœ… Added 57 tags directly under plants\n",
1074
  "❌ No data found for real_world in any format\n",
1075
  "βœ… Added 363 tags directly under real_world.companies_and_brand_names\n",
1076
  "βœ… Added 138 tags directly under real_world.holidays_and_celebrations\n",
1077
  "βœ… Added 75 tags directly under real_world.jobs\n",
1078
  "βœ… Added 263 tags directly under real_world.locations\n",
1079
- "βœ… Added 1511 tags directly under real_world.people\n",
1080
- "βœ… Added 458 tags directly under real_world.real_world_locations\n",
1081
  "❌ No data found for sex in any format\n",
1082
  "βœ… Added 16 tags directly under sex.sex_acts.simulated_sex_acts\n",
1083
  "βœ… Added 56 tags directly under sex.sexual_positions\n",
@@ -1127,22 +1128,30 @@
1127
  "❌ No data found for visual_characteristics in any format\n",
1128
  "❌ No data found for image_composition_and_style in any format\n",
1129
  "βœ… Added 73 tags directly under visual_characteristics.image_composition_and_style.artistic_license\n",
1130
- "βœ… Added 113 tags directly under visual_characteristics.image_composition_and_style.image_composition.backgrounds\n",
1131
  "βœ… Added 90 tags directly under visual_characteristics.image_composition_and_style.image_composition.censorship\n",
1132
- "βœ… Added 52 tags directly under visual_characteristics.image_composition_and_style.image_composition.colors\n",
1133
  "βœ… Added 28 tags directly under visual_characteristics.image_composition_and_style.image_composition.focus_tags\n",
1134
  "βœ… Added 55 tags directly under visual_characteristics.image_composition_and_style.image_composition.lighting\n",
1135
- "βœ… Added 67 tags directly under visual_characteristics.image_composition_and_style.image_composition.prints\n",
1136
  "βœ… Added 495 tags directly under visual_characteristics.image_composition_and_style.image_composition.style_parodies\n",
1137
  "βœ… Added 41 tags directly under visual_characteristics.image_composition_and_style.patterns\n",
1138
  "βœ… Added 310 tags directly under visual_characteristics.image_composition_and_style.symbols\n",
1139
  "βœ… Added 242 tags directly under visual_characteristics.image_composition_and_style.text\n",
1140
  "βœ… Added 62 tags directly under visual_characteristics.image_composition_and_style.year_tags\n",
1141
- "βœ… Finished building hierarchy.\n",
1142
- "\n",
1143
- "βœ… Hierarchy saved to `/shares/weddigen.ki.uzh/laura_wagner/Civitai_page_analysis/Civitai_visualizations/misc/danbooru/danbooru_tags_step_01.json`\n",
1144
- "πŸ“Š Total tags in the final hierarchy: 36726\n",
1145
- "⚠️ The following tag groups were not found: ['attire_and_body_accessories', 'body', 'characters', 'girls_frontline_characters', 'super_smash_bros_characters', 'tales_of_characters', 'yu_gi_oh_characters', 'copyrights_artists_projects_and_media', 'genres_of_video_games', 'creatures', 'games', 'more', 'objects', 'real_world', 'sex', 'subject', 'anthro', 'cat_boy', 'cat_girl', 'dog_girl', 'fox_girl', 'furry', 'female', '1girl', '2girls', 'female_general', 'koma', '1koma', '2koma', 'male', '1boy', '2boys', '3boys', '4boys', '5boys', '6+boys', 'boy', 'man', 'multiple_boys', 'visual_characteristics', 'image_composition_and_style']\n"
 
 
 
 
 
 
 
 
1146
  ]
1147
  }
1148
  ],
@@ -1817,7 +1826,7 @@
1817
  ],
1818
  "metadata": {
1819
  "kernelspec": {
1820
- "display_name": "Python 3 (ipykernel)",
1821
  "language": "python",
1822
  "name": "python3"
1823
  },
@@ -1831,7 +1840,7 @@
1831
  "name": "python",
1832
  "nbconvert_exporter": "python",
1833
  "pygments_lexer": "ipython3",
1834
- "version": "3.12.7"
1835
  }
1836
  },
1837
  "nbformat": 4,
 
5
  "id": "68a6e559-6ef4-4c7f-8736-93bc8588e3bc",
6
  "metadata": {},
7
  "source": [
8
+ "# \"Danbooru\" Taxonomy"
9
+ ]
10
+ },
11
+ {
12
+ "cell_type": "markdown",
13
+ "id": "36aff030",
14
+ "metadata": {},
15
+ "source": [
16
+ "### Getting Tags and Categories from Danbooru.donmai.us"
17
  ]
18
  },
19
  {
20
  "cell_type": "code",
21
+ "execution_count": 14,
22
  "id": "a97e3a64-5990-44a9-809d-45030e85f161",
23
  "metadata": {
24
  "execution": {
 
47
  },
48
  {
49
  "cell_type": "code",
50
+ "execution_count": 2,
51
  "id": "1f50a910-66c2-472a-8027-dd589b6ae755",
52
  "metadata": {
53
  "execution": {
 
65
  },
66
  {
67
  "cell_type": "code",
68
+ "execution_count": 6,
69
  "id": "a0f846e3-1fcc-4839-a459-c974f9c46d06",
70
  "metadata": {
71
  "execution": {
 
100
  },
101
  {
102
  "cell_type": "code",
103
+ "execution_count": 7,
104
  "id": "00ffaf5f-a4ae-408a-8a7c-e6b174f091f8",
105
  "metadata": {
106
  "execution": {
 
112
  }
113
  },
114
  "outputs": [
 
 
 
 
 
 
 
115
  {
116
  "name": "stdout",
117
  "output_type": "stream",
118
  "text": [
119
  "πŸš€ Fetching tag details for 'wombat'...\n",
120
  "πŸ”Ž Running cURL: curl -s -L --user parodyofsomething:FkzGApb17bfJayJMqKTzeyTw -X GET https://danbooru.donmai.us/tags.json?search%5Bname%5D=wombat&only=id,name,category,post_count,is_deprecated,created_at,updated_at,wiki_page,artist,antecedent_alias,consequent_aliases,antecedent_implications,consequent_implications,dtext_links\n",
121
+ "βœ… Test complete! Data saved to `/home/lauhp/000_PHD/000_010_PUBLICATION/2025_SAGE/CODE/pm-paper_uzh_gitlab/pm-paper/misc/danbooru/tag_info_test/wombat_tag_info.json`.\n"
122
  ]
123
  }
124
  ],
 
197
  },
198
  {
199
  "cell_type": "code",
200
+ "execution_count": 8,
201
  "id": "1a58f2d1-909b-41c0-bcb8-0a55e6835f53",
202
  "metadata": {
203
  "execution": {
 
455
  },
456
  {
457
  "cell_type": "code",
458
+ "execution_count": 9,
459
  "id": "557cdd69-f6b1-4c33-9f67-a13b00c0146b",
460
  "metadata": {
461
  "execution": {
 
708
  },
709
  {
710
  "cell_type": "code",
711
+ "execution_count": 10,
712
  "id": "c4759995-396a-4ec1-9f35-e75b3875e13c",
713
  "metadata": {
714
  "execution": {
 
872
  },
873
  {
874
  "cell_type": "code",
875
+ "execution_count": 11,
876
  "id": "8f8b6b29-e7bd-4814-8705-2b7a68f2d660",
877
  "metadata": {
878
  "execution": {
 
892
  },
893
  {
894
  "cell_type": "code",
895
+ "execution_count": 12,
896
  "id": "79234bc5-b287-4306-85cd-a27ddba769ea",
897
  "metadata": {
898
  "execution": {
 
913
  },
914
  {
915
  "cell_type": "code",
916
+ "execution_count": 13,
917
  "id": "64d47678-78a4-4d55-a3a0-1c1b251b03b6",
918
  "metadata": {
919
  "execution": {
 
933
  "❌ No data found for attire_and_body_accessories in any format\n",
934
  "βœ… Added 91 tags directly under attire_and_body_accessories.attire.dress\n",
935
  "βœ… Added 100 tags directly under attire_and_body_accessories.attire.handwear\n",
936
+ "βœ… Added 251 tags directly under attire_and_body_accessories.attire.headwear\n",
937
+ "βœ… Added 69 tags directly under attire_and_body_accessories.attire.legwear\n",
938
  "βœ… Added 64 tags directly under attire_and_body_accessories.attire.mask\n",
939
+ "βœ… Added 264 tags directly under attire_and_body_accessories.attire.neck_and_neckwear\n",
940
  "βœ… Added 54 tags directly under attire_and_body_accessories.attire.sexual_attire.bra\n",
941
  "βœ… Added 83 tags directly under attire_and_body_accessories.attire.sexual_attire.panties\n",
942
  "βœ… Added 87 tags directly under attire_and_body_accessories.attire.sleeves\n",
943
  "βœ… Added 83 tags directly under attire_and_body_accessories.attire.swimsuit\n",
944
  "βœ… Added 4 tags directly under attire_and_body_accessories.embellishment\n",
945
  "βœ… Added 94 tags directly under attire_and_body_accessories.eyewear\n",
946
+ "βœ… Added 62 tags directly under attire_and_body_accessories.fashion_style\n",
947
  "βœ… Added 189 tags directly under attire_and_body_accessories.nudity\n",
948
  "❌ No data found for body in any format\n",
949
+ "βœ… Added 40 tags directly under body.body_parts.ass\n",
950
  "βœ… Added 213 tags directly under body.body_parts.breasts_tags\n",
951
+ "βœ… Added 54 tags directly under body.body_parts.ears_tags\n",
952
  "βœ… Added 200 tags directly under body.body_parts.face_tags.eyes_tags\n",
953
  "βœ… Added 31 tags directly under body.body_parts.hair.hair_color\n",
954
+ "βœ… Added 157 tags directly under body.body_parts.hair.hair_styles\n",
955
+ "βœ… Added 117 tags directly under body.body_parts.hands.gestures\n",
956
+ "βœ… Added 264 tags directly under body.body_parts.neck_and_neckwear\n",
957
  "βœ… Added 74 tags directly under body.body_parts.penis\n",
958
+ "βœ… Added 230 tags directly under body.body_parts.posture\n",
959
+ "βœ… Added 50 tags directly under body.body_parts.pussy\n",
960
+ "βœ… Added 64 tags directly under body.body_parts.shoulders\n",
961
  "βœ… Added 26 tags directly under body.body_parts.skin_color\n",
962
  "βœ… Added 79 tags directly under body.body_parts.tail\n",
963
+ "βœ… Added 90 tags directly under body.body_parts.wings\n",
964
+ "βœ… Added 55 tags directly under body.injury\n",
965
  "❌ No data found for characters in any format\n",
966
  "βœ… Added 300 tags directly under characters.ace_attorney\n",
967
+ "βœ… Added 579 tags directly under characters.arknights\n",
968
  "βœ… Added 296 tags directly under characters.atelier\n",
969
  "βœ… Added 706 tags directly under characters.azur_lane\n",
970
  "βœ… Added 223 tags directly under characters.bleach\n",
971
  "βœ… Added 98 tags directly under characters.bokujou_monogatari\n",
972
  "βœ… Added 46 tags directly under characters.brave_girl_ravens\n",
973
+ "βœ… Added 144 tags directly under characters.cardcaptor_sakura\n",
974
  "βœ… Added 128 tags directly under characters.danganronpa\n",
975
  "βœ… Added 240 tags directly under characters.digimon.digimon_characters\n",
976
+ "βœ… Added 613 tags directly under characters.dragon_ball\n",
977
+ "βœ… Added 331 tags directly under characters.dragon_quest\n",
978
+ "βœ… Added 814 tags directly under characters.fate_series\n",
979
  "βœ… Added 566 tags directly under characters.final_fantasy\n",
980
+ "βœ… Added 727 tags directly under characters.fire_emblem\n",
981
  "βœ… Added 441 tags directly under characters.flower_knight_girl\n",
982
  "βœ… Added 221 tags directly under characters.genderswap\n",
983
  "βœ… Added 431 tags directly under characters.gensou_suikoden\n",
984
  "❌ No data found for girls_frontline_characters in any format\n",
985
  "βœ… Added 0 tags directly under characters.girls_frontline\n",
986
  "βœ… Added 305 tags directly under characters.girls_und_panzer\n",
987
+ "βœ… Added 267 tags directly under characters.gundam_mechas\n",
988
  "βœ… Added 313 tags directly under characters.hunter_x_hunter\n",
989
  "βœ… Added 348 tags directly under characters.jojo_no_kimyou_na_bouken\n",
990
+ "βœ… Added 308 tags directly under characters.kamen_rider\n",
991
+ "βœ… Added 465 tags directly under characters.kantai_collection\n",
992
  "βœ… Added 64 tags directly under characters.kingdom_hearts\n",
993
  "βœ… Added 72 tags directly under characters.mahou_sensei_negima\n",
994
+ "βœ… Added 158 tags directly under characters.meitantei_conan\n",
995
+ "βœ… Added 153 tags directly under characters.minecraft\n",
996
  "βœ… Added 198 tags directly under characters.naruto\n",
997
  "βœ… Added 336 tags directly under characters.nippon_ichi\n",
998
  "βœ… Added 375 tags directly under characters.official_mascots\n",
 
1002
  "βœ… Added 165 tags directly under characters.pokemon.families_of_pokemon_main_characters\n",
1003
  "βœ… Added 100 tags directly under characters.pokemon.gym_leaders\n",
1004
  "βœ… Added 37 tags directly under characters.pokemon.pokemon_ranger_characters\n",
1005
+ "βœ… Added 149 tags directly under characters.pokemon.pokemon_trainer_classes\n",
1006
  "βœ… Added 925 tags directly under characters.pretty_cure\n",
1007
  "βœ… Added 1214 tags directly under characters.ragnarok_online\n",
1008
+ "βœ… Added 434 tags directly under characters.real_life_racehorses\n",
1009
  "βœ… Added 23 tags directly under characters.rosenkreuzstilette\n",
1010
+ "βœ… Added 320 tags directly under characters.sailor_moon\n",
1011
+ "βœ… Added 170 tags directly under characters.street_fighter\n",
1012
  "❌ No data found for super_smash_bros_characters in any format\n",
1013
  "βœ… Added 0 tags directly under characters.super_smash_bros\n",
1014
  "❌ No data found for tales_of_characters in any format\n",
1015
  "βœ… Added 0 tags directly under characters.tales_of\n",
1016
  "βœ… Added 189 tags directly under characters.toaru_majutsu_no_index\n",
1017
+ "βœ… Added 381 tags directly under characters.touhou\n",
1018
  "βœ… Added 128 tags directly under characters.touken_ranbu\n",
1019
+ "βœ… Added 540 tags directly under characters.ultra_series\n",
1020
+ "βœ… Added 250 tags directly under characters.umamusume\n",
1021
  "βœ… Added 140 tags directly under characters.vocaloid\n",
1022
  "βœ… Added 184 tags directly under characters.world_witches_series\n",
1023
  "❌ No data found for yu_gi_oh_characters in any format\n",
 
1026
  "❌ No data found for genres_of_video_games in any format\n",
1027
  "βœ… Added 175 tags directly under copyrights_artists_projects_and_media.genres_of_video_games.fighting_games\n",
1028
  "βœ… Added 42 tags directly under copyrights_artists_projects_and_media.genres_of_video_games.platform_games\n",
1029
+ "βœ… Added 515 tags directly under copyrights_artists_projects_and_media.genres_of_video_games.role-playing_games\n",
1030
  "βœ… Added 114 tags directly under copyrights_artists_projects_and_media.genres_of_video_games.shooter_games\n",
1031
  "βœ… Added 185 tags directly under copyrights_artists_projects_and_media.genres_of_video_games.visual_novel_games\n",
1032
  "❌ No data found for creatures in any format\n",
1033
+ "βœ… Added 232 tags directly under creatures.animals.birds\n",
1034
  "βœ… Added 224 tags directly under creatures.animals.cats\n",
1035
  "βœ… Added 237 tags directly under creatures.animals.dogs\n",
1036
  "βœ… Added 285 tags directly under creatures.legendary_creatures\n",
1037
+ "βœ… Added 55 tags directly under drawing_software\n",
1038
  "❌ No data found for games in any format\n",
1039
  "βœ… Added 21 tags directly under games.board_games\n",
1040
  "βœ… Added 175 tags directly under games.fighting_games\n",
1041
  "βœ… Added 61 tags directly under games.game_activities\n",
1042
+ "βœ… Added 420 tags directly under games.sports\n",
1043
  "βœ… Added 144 tags directly under games.video_game\n",
1044
+ "βœ… Added 213 tags directly under metatags\n",
1045
  "❌ No data found for more in any format\n",
1046
  "βœ… Added 110 tags directly under more.dances\n",
1047
  "βœ… Added 29 tags directly under more.family_relationships\n",
1048
  "βœ… Added 68 tags directly under more.fire\n",
1049
+ "βœ… Added 1051 tags directly under more.food_tags\n",
1050
  "βœ… Added 31 tags directly under more.groups\n",
1051
  "βœ… Added 76 tags directly under more.phrases\n",
1052
  "βœ… Added 35 tags directly under more.scan\n",
 
1055
  "βœ… Added 446 tags directly under more.verbs_and_gerunds\n",
1056
  "βœ… Added 54 tags directly under more.water\n",
1057
  "❌ No data found for objects in any format\n",
1058
+ "βœ… Added 410 tags directly under objects.airplanes\n",
1059
+ "βœ… Added 145 tags directly under objects.armor\n",
1060
+ "βœ… Added 377 tags directly under objects.audio_tags\n",
1061
  "βœ… Added 66 tags directly under objects.cards.playing_card_faces\n",
1062
+ "βœ… Added 80 tags directly under objects.computer\n",
1063
  "βœ… Added 94 tags directly under objects.eyewear\n",
1064
  "βœ… Added 407 tags directly under objects.ground_vehicles\n",
1065
  "βœ… Added 25 tags directly under objects.helicopters\n",
1066
  "βœ… Added 48 tags directly under objects.piercings\n",
1067
+ "βœ… Added 94 tags directly under objects.pokemon_objects\n",
1068
+ "βœ… Added 105 tags directly under objects.sex_objects\n",
1069
  "βœ… Added 256 tags directly under objects.ships\n",
1070
  "βœ… Added 917 tags directly under objects.weapons\n",
1071
  "βœ… Added 21 tags directly under plant.flowers\n",
1072
+ "βœ… Added 59 tags directly under plant.plant\n",
1073
  "βœ… Added 44 tags directly under plant.tree\n",
1074
+ "βœ… Added 59 tags directly under plants\n",
1075
  "❌ No data found for real_world in any format\n",
1076
  "βœ… Added 363 tags directly under real_world.companies_and_brand_names\n",
1077
  "βœ… Added 138 tags directly under real_world.holidays_and_celebrations\n",
1078
  "βœ… Added 75 tags directly under real_world.jobs\n",
1079
  "βœ… Added 263 tags directly under real_world.locations\n",
1080
+ "βœ… Added 1526 tags directly under real_world.people\n",
1081
+ "βœ… Added 463 tags directly under real_world.real_world_locations\n",
1082
  "❌ No data found for sex in any format\n",
1083
  "βœ… Added 16 tags directly under sex.sex_acts.simulated_sex_acts\n",
1084
  "βœ… Added 56 tags directly under sex.sexual_positions\n",
 
1128
  "❌ No data found for visual_characteristics in any format\n",
1129
  "❌ No data found for image_composition_and_style in any format\n",
1130
  "βœ… Added 73 tags directly under visual_characteristics.image_composition_and_style.artistic_license\n",
1131
+ "βœ… Added 115 tags directly under visual_characteristics.image_composition_and_style.image_composition.backgrounds\n",
1132
  "βœ… Added 90 tags directly under visual_characteristics.image_composition_and_style.image_composition.censorship\n",
1133
+ "βœ… Added 54 tags directly under visual_characteristics.image_composition_and_style.image_composition.colors\n",
1134
  "βœ… Added 28 tags directly under visual_characteristics.image_composition_and_style.image_composition.focus_tags\n",
1135
  "βœ… Added 55 tags directly under visual_characteristics.image_composition_and_style.image_composition.lighting\n",
1136
+ "βœ… Added 76 tags directly under visual_characteristics.image_composition_and_style.image_composition.prints\n",
1137
  "βœ… Added 495 tags directly under visual_characteristics.image_composition_and_style.image_composition.style_parodies\n",
1138
  "βœ… Added 41 tags directly under visual_characteristics.image_composition_and_style.patterns\n",
1139
  "βœ… Added 310 tags directly under visual_characteristics.image_composition_and_style.symbols\n",
1140
  "βœ… Added 242 tags directly under visual_characteristics.image_composition_and_style.text\n",
1141
  "βœ… Added 62 tags directly under visual_characteristics.image_composition_and_style.year_tags\n",
1142
+ "βœ… Finished building hierarchy.\n"
1143
+ ]
1144
+ },
1145
+ {
1146
+ "ename": "FileNotFoundError",
1147
+ "evalue": "[Errno 2] No such file or directory: '/home/lauhp/000_PHD/000_010_PUBLICATION/2025_SAGE/CODE/pm-paper_uzh_gitlab/pm-paper/misc/danbooru_donmai/danbooru_tags_step_01.json'",
1148
+ "output_type": "error",
1149
+ "traceback": [
1150
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
1151
+ "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
1152
+ "Cell \u001b[0;32mIn[13], line 198\u001b[0m\n\u001b[1;32m 196\u001b[0m \u001b[38;5;66;03m# Save cleaned JSON\u001b[39;00m\n\u001b[1;32m 197\u001b[0m output_file \u001b[38;5;241m=\u001b[39m current_dir\u001b[38;5;241m.\u001b[39mparent \u001b[38;5;241m/\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmisc/danbooru_donmai/danbooru_tags_step_01.json\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m--> 198\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43moutput_file\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mw\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mutf-8\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m f:\n\u001b[1;32m 199\u001b[0m json\u001b[38;5;241m.\u001b[39mdump(manual_hierarchy, f, indent\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m4\u001b[39m, ensure_ascii\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m)\n\u001b[1;32m 201\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124mβœ… Hierarchy saved to `\u001b[39m\u001b[38;5;132;01m{\u001b[39;00moutput_file\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m`\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
1153
+ "File \u001b[0;32m~/.local/lib/python3.10/site-packages/IPython/core/interactiveshell.py:324\u001b[0m, in \u001b[0;36m_modified_open\u001b[0;34m(file, *args, **kwargs)\u001b[0m\n\u001b[1;32m 317\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m file \u001b[38;5;129;01min\u001b[39;00m {\u001b[38;5;241m0\u001b[39m, \u001b[38;5;241m1\u001b[39m, \u001b[38;5;241m2\u001b[39m}:\n\u001b[1;32m 318\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[1;32m 319\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mIPython won\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mt let you open fd=\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mfile\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m by default \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 320\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mas it is likely to crash IPython. If you know what you are doing, \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 321\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124myou can use builtins\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m open.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 322\u001b[0m )\n\u001b[0;32m--> 324\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mio_open\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
1154
+ "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/lauhp/000_PHD/000_010_PUBLICATION/2025_SAGE/CODE/pm-paper_uzh_gitlab/pm-paper/misc/danbooru_donmai/danbooru_tags_step_01.json'"
1155
  ]
1156
  }
1157
  ],
 
1826
  ],
1827
  "metadata": {
1828
  "kernelspec": {
1829
+ "display_name": "latm",
1830
  "language": "python",
1831
  "name": "python3"
1832
  },
 
1840
  "name": "python",
1841
  "nbconvert_exporter": "python",
1842
  "pygments_lexer": "ipython3",
1843
+ "version": "3.10.15"
1844
  }
1845
  },
1846
  "nbformat": 4,
misc/danbooru/tag_info_test/wombat_tag_info.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tag_details": [
3
+ {
4
+ "id": 462478,
5
+ "name": "wombat",
6
+ "post_count": 32,
7
+ "category": 0,
8
+ "created_at": "2013-02-28T04:35:29.653-05:00",
9
+ "updated_at": "2019-08-30T03:37:52.993-04:00",
10
+ "is_deprecated": false,
11
+ "consequent_aliases": [],
12
+ "antecedent_implications": [],
13
+ "consequent_implications": [],
14
+ "dtext_links": [
15
+ {
16
+ "id": 11937824,
17
+ "created_at": "2024-07-30T13:49:16.169-04:00",
18
+ "updated_at": "2024-07-30T13:49:16.169-04:00",
19
+ "model_type": "WikiPage",
20
+ "model_id": 57363,
21
+ "link_type": "wiki_link",
22
+ "link_target": "wombat"
23
+ }
24
+ ]
25
+ }
26
+ ]
27
+ }