You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

268 lines
30 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"id": "66f72396-0cf1-41cf-a486-2930d2ad1652",
"metadata": {},
"source": [
"# html-tag\n",
"Give a string with the name of the image-file that was annotated with the Annotation Compass; Return a string that can include the position, text, timestamp and/or userID of all labels plus html-tags that place them back into their original position."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "5c99e5ea-6e41-4aac-a4f2-c9244bf74fdc",
"metadata": {},
"outputs": [],
"source": [
"from urllib.request import urlopen\n",
"import json"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "9bd8860a-9967-49d5-a74a-b5de669dfe6d",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"def html_tag(image: str, position: bool, text: bool, timestamp: bool, userID: bool ) -> str:\n",
" \n",
" \"\"\"Give a string with the name of the image-file that was annotated with the Annotation Compass; Return a string that can include the position, text, timestamp and/or userID of all labels plus html-tags that place them back into their original position.\"\"\" \n",
" \n",
" url = f\"https://hub.xpub.nl/soupboat/generic-labels/get-labels/?image={image}\"\n",
" response = urlopen(url)\n",
" data_json = json.loads(response.read()) \n",
" \n",
" html_tags = '<link rel=\"stylesheet\" href=\"/soupboat/si16-app/static/css/jian.css\">'\n",
" for label in data_json['labels']:\n",
" html_tags = html_tags + f'<p style=\"left: {label[\"position\"][\"x\"]}%; top: {label[\"position\"][\"y\"]}%; position: absolute;\">'\n",
" if position == True:\n",
" html_position = f'{ label[\"position\"] } '\n",
" html_tags = html_tags + html_position\n",
" if text == True:\n",
" html_text = f'{ label[\"text\"] } '\n",
" html_tags = html_tags + html_text\n",
" if timestamp == True:\n",
" html_timestamp = f'{ label[\"timestamp\"] } '\n",
" html_tags = html_tags + html_timestamp\n",
" if userID == True:\n",
" html_userID = f'{ label[\"userID\"] } '\n",
" html_tags = html_tags + html_userID\n",
" html_tags = html_tags + '</p>'\n",
" return html_tags"
]
},
{
"cell_type": "markdown",
"id": "1094ed8e-1387-481e-b612-9a8cc81d5c18",
"metadata": {},
"source": [
"This function was built for a project where individuals are invited to add their annotations on a map using the Annotation Compass. Each annotation-label is stored in a json-file and includes the annotation-text itself, but also the name of the image-file as well as the position, size, index, timestamp and userID of the annotation.\n",
"\n",
" Example for a label:\n",
"\n",
" {\n",
" 'image': 'map.jpg',\n",
" 'position': {'x': 12, 'y': 97},\n",
" 'size': {'width': 43, 'height': 18},\n",
" 'text': 'This is a text! Is this a text?',\n",
" 'timestamp': 'Wed, 01 Dec 2021 14:04:00 GMT',\n",
" 'userID': 5766039063\n",
" }\n",
"\n",
"\n",
"If interested in the position, text, timestamp and/or userID of all annotations, html_tag() can help. The function needs a string with the name of the of the image-file that was annotated with the annotation compass tool as well as four Boolean Values that define which information is of interest. The output is a string that can include the position, text, timestamp and/or userID of all labels plus html-tags that place them back into their original position\n",
"\n",
"How to get a json-file with annotation-labels?\n",
"\n",
" https://hub.xpub.nl/soupboat/generic-labels/\n",
"The Annotation Compass allows people to uplaod an image and ask others to annotate it. A json-file of the annotations is provided."
]
},
{
"cell_type": "markdown",
"id": "2c3e992a-317b-4433-8c3b-9efcedea575d",
"metadata": {
"tags": []
},
"source": [
"## Examples\n",
"\n",
"In this example, the function returns a string that includes the position of all labels with html-tags that place them back into their original position"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "e3d7e97b-0089-4c29-a2c1-9ef823ff2e37",
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"'<link rel=\"stylesheet\" href=\"/soupboat/si16-app/static/css/jian.css\"><p style=\"left: 63.9896%; top: 34.2958%; position: absolute;\">{\\'x\\': 63.9896, \\'y\\': 34.2958} </p><p style=\"left: 33.6269%; top: 65.1408%; position: absolute;\">{\\'x\\': 33.6269, \\'y\\': 65.1408} </p><p style=\"left: 92.3483%; top: -0.179426%; position: absolute;\">{\\'x\\': 92.3483, \\'y\\': -0.179426} </p><p style=\"left: 65.3034%; top: 35.4839%; position: absolute;\">{\\'x\\': 65.3034, \\'y\\': 35.4839} </p><p style=\"left: 48.135%; top: 20.4458%; position: absolute;\">{\\'x\\': 48.135, \\'y\\': 20.4458} </p><p style=\"left: 76.25%; top: 69.5246%; position: absolute;\">{\\'x\\': 76.25, \\'y\\': 69.5246} </p><p style=\"left: 39.3264%; top: 46.831%; position: absolute;\">{\\'x\\': 39.3264, \\'y\\': 46.831} </p><p style=\"left: 77.0%; top: 63.7521%; position: absolute;\">{\\'x\\': 77.0, \\'y\\': 63.7521} </p><p style=\"left: 63.7806%; top: 41.0296%; position: absolute;\">{\\'x\\': 63.7806, \\'y\\': 41.0296} </p><p style=\"left: 48.9886%; top: 51.256%; position: absolute;\">{\\'x\\': 48.9886, \\'y\\': 51.256} </p><p style=\"left: 36.5285%; top: 54.2958%; position: absolute;\">{\\'x\\': 36.5285, \\'y\\': 54.2958} </p><p style=\"left: 55.0889%; top: 15.6154%; position: absolute;\">{\\'x\\': 55.0889, \\'y\\': 15.6154} </p><p style=\"left: 47.2668%; top: 70.1459%; position: absolute;\">{\\'x\\': 47.2668, \\'y\\': 70.1459} </p><p style=\"left: 42.5389%; top: 45.7042%; position: absolute;\">{\\'x\\': 42.5389, \\'y\\': 45.7042} </p><p style=\"left: 45.2507%; top: 29.3907%; position: absolute;\">{\\'x\\': 45.2507, \\'y\\': 29.3907} </p><p style=\"left: 60.774%; top: 59.7488%; position: absolute;\">{\\'x\\': 60.774, \\'y\\': 59.7488} </p><p style=\"left: 42.0882%; top: 18.8014%; position: absolute;\">{\\'x\\': 42.0882, \\'y\\': 18.8014} </p><p style=\"left: 39.1192%; top: 36.2676%; position: absolute;\">{\\'x\\': 39.1192, \\'y\\': 36.2676} </p><p style=\"left: 43.7995%; top: 27.0609%; position: absolute;\">{\\'x\\': 43.7995, \\'y\\': 27.0609} </p><p style=\"left: 75.285%; top: 29.2254%; position: absolute;\">{\\'x\\': 75.285, \\'y\\': 29.2254} </p><p style=\"left: 52.0%; top: 48.1324%; position: absolute;\">{\\'x\\': 52.0, \\'y\\': 48.1324} </p><p style=\"left: 16.5775%; top: 28.7791%; position: absolute;\">{\\'x\\': 16.5775, \\'y\\': 28.7791} </p><p style=\"left: 60.1554%; top: 63.3099%; position: absolute;\">{\\'x\\': 60.1554, \\'y\\': 63.3099} </p><p style=\"left: 65.0396%; top: 45.3405%; position: absolute;\">{\\'x\\': 65.0396, \\'y\\': 45.3405} </p><p style=\"left: 46.3713%; top: 58.4289%; position: absolute;\">{\\'x\\': 46.3713, \\'y\\': 58.4289} </p><p style=\"left: 30.75%; top: 43.0391%; position: absolute;\">{\\'x\\': 30.75, \\'y\\': 43.0391} </p><p style=\"left: 60.3757%; top: 46.2333%; position: absolute;\">{\\'x\\': 60.3757, \\'y\\': 46.2333} </p><p style=\"left: 49.2084%; top: 34.0502%; position: absolute;\">{\\'x\\': 49.2084, \\'y\\': 34.0502} </p><p style=\"left: 38.4744%; top: 58.0105%; position: absolute;\">{\\'x\\': 38.4744, \\'y\\': 58.0105} </p><p style=\"left: 23.9572%; top: 33.8663%; position: absolute;\">{\\'x\\': 23.9572, \\'y\\': 33.8663} </p><p style=\"left: 57.625%; top: 34.3803%; position: absolute;\">{\\'x\\': 57.625, \\'y\\': 34.3803} </p><p style=\"left: 40.125%; top: 29.966%; position: absolute;\">{\\'x\\': 40.125, \\'y\\': 29.966} </p><p style=\"left: 51.123%; top: 18.1686%; position: absolute;\">{\\'x\\': 51.123, \\'y\\': 18.1686} </p><p style=\"left: 44.3557%; top: 20.4458%; position: absolute;\">{\\'x\\': 44.3557, \\'y\\': 20.4458} </p><p style=\"left: 55.621%; top: 33.6313%; position: absolute;\">{\\'x\\': 55.621, \\'y\\': 33.6313} </p><p style=\"left: 39.745%; top: 19.3153%; position: absolute;\">{\\'x\\': 39.745, \\'y\\': 19.3153} </p><p style=\"left: 57.9156%; top: 37.276%; position: absolute;\">{\\'x\\': 57.9156, \\'y\\': 37.276} </p><p style=\"left: 50.3743%; top: 52.0349%; position: absolute;\">{\\'x\\': 50.3743, \\'y\\': 52.0349} </p><p style=\"left: 73.703%; top: 49.514%; position: absolute;\">{
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"html_tag('rejection_map.jpg', True, False, False, False)"
]
},
{
"cell_type": "markdown",
"id": "d7fff3cd-ad3e-45ae-bf2e-ee1cd84c955b",
"metadata": {},
"source": [
"In this example, the function returns a string that includes the timestamp of all labels with html-tags that place them back into their original position"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "b15b3303-aff9-418c-bb42-d68f85fcaed2",
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"'<link rel=\"stylesheet\" href=\"/soupboat/si16-app/static/css/jian.css\"><p style=\"left: 63.9896%; top: 34.2958%; position: absolute;\">Wed, 15 Dec 2021 11:36:04 GMT </p><p style=\"left: 33.6269%; top: 65.1408%; position: absolute;\">Wed, 15 Dec 2021 11:36:36 GMT </p><p style=\"left: 92.3483%; top: -0.179426%; position: absolute;\">Wed, 15 Dec 2021 11:36:47 GMT </p><p style=\"left: 65.3034%; top: 35.4839%; position: absolute;\">Wed, 15 Dec 2021 11:36:47 GMT </p><p style=\"left: 48.135%; top: 20.4458%; position: absolute;\">Wed, 15 Dec 2021 11:36:48 GMT </p><p style=\"left: 76.25%; top: 69.5246%; position: absolute;\">Wed, 15 Dec 2021 11:36:51 GMT </p><p style=\"left: 39.3264%; top: 46.831%; position: absolute;\">Wed, 15 Dec 2021 11:36:55 GMT </p><p style=\"left: 77.0%; top: 63.7521%; position: absolute;\">Wed, 15 Dec 2021 11:37:25 GMT </p><p style=\"left: 63.7806%; top: 41.0296%; position: absolute;\">Wed, 15 Dec 2021 11:37:28 GMT </p><p style=\"left: 48.9886%; top: 51.256%; position: absolute;\">Wed, 15 Dec 2021 11:37:34 GMT </p><p style=\"left: 36.5285%; top: 54.2958%; position: absolute;\">Wed, 15 Dec 2021 11:37:37 GMT </p><p style=\"left: 55.0889%; top: 15.6154%; position: absolute;\">Wed, 15 Dec 2021 11:37:46 GMT </p><p style=\"left: 47.2668%; top: 70.1459%; position: absolute;\">Wed, 15 Dec 2021 11:37:56 GMT </p><p style=\"left: 42.5389%; top: 45.7042%; position: absolute;\">Wed, 15 Dec 2021 11:38:04 GMT </p><p style=\"left: 45.2507%; top: 29.3907%; position: absolute;\">Wed, 15 Dec 2021 11:38:09 GMT </p><p style=\"left: 60.774%; top: 59.7488%; position: absolute;\">Wed, 15 Dec 2021 11:38:37 GMT </p><p style=\"left: 42.0882%; top: 18.8014%; position: absolute;\">Wed, 15 Dec 2021 11:38:41 GMT </p><p style=\"left: 39.1192%; top: 36.2676%; position: absolute;\">Wed, 15 Dec 2021 11:38:45 GMT </p><p style=\"left: 43.7995%; top: 27.0609%; position: absolute;\">Wed, 15 Dec 2021 11:39:12 GMT </p><p style=\"left: 75.285%; top: 29.2254%; position: absolute;\">Wed, 15 Dec 2021 11:39:21 GMT </p><p style=\"left: 52.0%; top: 48.1324%; position: absolute;\">Wed, 15 Dec 2021 11:40:13 GMT </p><p style=\"left: 16.5775%; top: 28.7791%; position: absolute;\">Wed, 15 Dec 2021 11:40:24 GMT </p><p style=\"left: 60.1554%; top: 63.3099%; position: absolute;\">Wed, 15 Dec 2021 11:40:27 GMT </p><p style=\"left: 65.0396%; top: 45.3405%; position: absolute;\">Wed, 15 Dec 2021 11:40:42 GMT </p><p style=\"left: 46.3713%; top: 58.4289%; position: absolute;\">Wed, 15 Dec 2021 11:40:54 GMT </p><p style=\"left: 30.75%; top: 43.0391%; position: absolute;\">Wed, 15 Dec 2021 11:41:01 GMT </p><p style=\"left: 60.3757%; top: 46.2333%; position: absolute;\">Wed, 15 Dec 2021 11:41:14 GMT </p><p style=\"left: 49.2084%; top: 34.0502%; position: absolute;\">Wed, 15 Dec 2021 11:41:23 GMT </p><p style=\"left: 38.4744%; top: 58.0105%; position: absolute;\">Wed, 15 Dec 2021 11:42:08 GMT </p><p style=\"left: 23.9572%; top: 33.8663%; position: absolute;\">Wed, 15 Dec 2021 11:42:17 GMT </p><p style=\"left: 57.625%; top: 34.3803%; position: absolute;\">Wed, 15 Dec 2021 11:42:20 GMT </p><p style=\"left: 40.125%; top: 29.966%; position: absolute;\">Wed, 15 Dec 2021 11:42:52 GMT </p><p style=\"left: 51.123%; top: 18.1686%; position: absolute;\">Wed, 15 Dec 2021 11:43:10 GMT </p><p style=\"left: 44.3557%; top: 20.4458%; position: absolute;\">Wed, 15 Dec 2021 11:43:23 GMT </p><p style=\"left: 55.621%; top: 33.6313%; position: absolute;\">Wed, 15 Dec 2021 11:43:45 GMT </p><p style=\"left: 39.745%; top: 19.3153%; position: absolute;\">Wed, 15 Dec 2021 11:44:03 GMT </p><p style=\"left: 57.9156%; top: 37.276%; position: absolute;\">Wed, 15 Dec 2021 11:44:13 GMT </p><p style=\"left: 50.3743%; top: 52.0349%; position: absolute;\">Wed, 15 Dec 2021 11:44:16 GMT </p><p style=\"left: 73.703%; top: 49.514%; position: absolute;\">Wed, 15 Dec 2021 11:44:35 GMT </p><p style=\"left: 58.7942%; top: 43.0025%; position: absolute;\">Wed, 15 Dec 2021 11:45:07 GMT </p><p style=\"left: 64.4007%; top: 39.7934%; position: absolute;\">Wed, 15 Dec 2021 11:49:16 GMT </p><p style=\"left:
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"html_tag('rejection_map.jpg', False, False, True, False)"
]
},
{
"cell_type": "markdown",
"id": "17f420d7-9943-422b-a840-0e3a80179b03",
"metadata": {},
"source": [
"In this example, the function returns a string that includes the position, text, timestamp and userID of all labels with html-tags that place them back into their original position"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "05b52d15-7330-4484-8965-31f8c074d906",
"metadata": {
"scrolled": true,
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"'<link rel=\"stylesheet\" href=\"/soupboat/si16-app/static/css/jian.css\"><p style=\"left: 63.9896%; top: 34.2958%; position: absolute;\">{\\'x\\': 63.9896, \\'y\\': 34.2958} here, someone called my behaviour \"strange\" Wed, 15 Dec 2021 11:36:04 GMT 8112114057 </p><p style=\"left: 33.6269%; top: 65.1408%; position: absolute;\">{\\'x\\': 33.6269, \\'y\\': 65.1408} 윰보에서 장을 보고 집에 돌아오는 길. 두 명의 남자 가 다가왔어. 나는 낑낑대며 나의 일주일간 식량을 옮기고 있었지. 쾅!\\n큰 소리가 났고 나는 순간 움츠러들었어. \\n건너편에서 다가오던 남자 두명이 크게 웃더니 \\n나를 보며 Chino! Chino!라고 외쳤어. 시발. Wed, 15 Dec 2021 11:36:36 GMT 8633793842 </p><p style=\"left: 92.3483%; top: -0.179426%; position: absolute;\">{\\'x\\': 92.3483, \\'y\\': -0.179426} the municipality of rotterdam (prince alexander) almost refused to approve my request of registration because the italian id card doesn\\'t have my sex written on it. \\nthey said that if i bring my birth certificate that states that im a male i can have my bsn otherwise.......... nope. Wed, 15 Dec 2021 11:36:47 GMT 2396262941 </p><p style=\"left: 65.3034%; top: 35.4839%; position: absolute;\">{\\'x\\': 65.3034, \\'y\\': 35.4839} getting a text message from my good friend, telling me that she will not visit me in Rotterdam despite she promised me. Wed, 15 Dec 2021 11:36:47 GMT 4287159985 </p><p style=\"left: 48.135%; top: 20.4458%; position: absolute;\">{\\'x\\': 48.135, \\'y\\': 20.4458} house viewing 2: meeting with some girls in the evening to see a room; felt super exposed and awkward. Later on, they rejected me. Wed, 15 Dec 2021 11:36:48 GMT 1933684842 </p><p style=\"left: 76.25%; top: 69.5246%; position: absolute;\">{\\'x\\': 76.25, \\'y\\': 69.5246} I once went to view a house here but it didn\\'t have the floor. crap. Wed, 15 Dec 2021 11:36:51 GMT 6286616941 </p><p style=\"left: 39.3264%; top: 46.831%; position: absolute;\">{\\'x\\': 39.3264, \\'y\\': 46.831} here, someone screamed at me \"move fucking chinee\" Wed, 15 Dec 2021 11:36:55 GMT 8112114057 </p><p style=\"left: 77.0%; top: 63.7521%; position: absolute;\">{\\'x\\': 77.0, \\'y\\': 63.7521} other housing rejection situations here.\\n Wed, 15 Dec 2021 11:37:25 GMT 6286616941 </p><p style=\"left: 63.7806%; top: 41.0296%; position: absolute;\">{\\'x\\': 63.7806, \\'y\\': 41.0296} a woman on the train showed me the middle finger the first day i arrived to rotterdam and i didn\\'t really understand why because she\\'s the one that was mean with me in the first place Wed, 15 Dec 2021 11:37:28 GMT 4164927552 </p><p style=\"left: 48.9886%; top: 51.256%; position: absolute;\">{\\'x\\': 48.9886, \\'y\\': 51.256} at 22:01 a bald man kicked us out from the basketball court because we were noisy Wed, 15 Dec 2021 11:37:34 GMT 2396262941 </p><p style=\"left: 36.5285%; top: 54.2958%; position: absolute;\">{\\'x\\': 36.5285, \\'y\\': 54.2958} here, someone screamed at me, right into my face, something I could not understand Wed, 15 Dec 2021 11:37:37 GMT 8112114057 </p><p style=\"left: 55.0889%; top: 15.6154%; position: absolute;\">{\\'x\\': 55.0889, \\'y\\': 15.6154} the most unpleasant house viewing: my viewing overlapped with the previous person and I didn\\'t got the chance to connect with the ones living them. How could then they know who I am and even consider me for the room? Wed, 15 Dec 2021 11:37:46 GMT 1933684842 </p><p style=\"left: 47.2668%; top: 70.1459%; position: absolute;\">{\\'x\\': 47.2668, \\'y\\': 70.1459} Stepped out at the wrong bus station and because the waiting time for the next bus was (a bit) long, Carmen and I decided to walk to Varia... Rejected by punctuality. Wed, 15 Dec 2021 11:37:56 GMT 1374899057 </p><p style=\"left: 42.5389%; top: 45.7042%; position: absolute;\">{\\'x\\': 42.5389, \\'y\\': 45.7042} here, someone told me to move away Wed, 15 Dec 2021 11:38:04 GMT 8112114057 </p><p style=\"left: 45.2507%; top: 29.3907%; position: absolute;\">{\\'x\\': 45.2507, \\'y\\': 29.3907} I had the
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"html_tag('rejection_map.jpg', True, True, True, True)"
]
},
{
"cell_type": "markdown",
"id": "4b540ec0-233b-4f90-808e-97ce94c82fcb",
"metadata": {},
"source": [
"In this example, the function takes another function as an input and returns a string that includes the text of all labels with html-tags that place them back into their original position"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "2f5d482f-7617-400c-9177-69ffa93ef67f",
"metadata": {},
"outputs": [],
"source": [
"url = \"https://hub.xpub.nl/soupboat/generic-labels/get-labels/?image=rejection_map.jpg\"\n",
"response = urlopen(url)\n",
"data_json = json.loads(response.read()) \n",
"\n",
"def target_map_list(labels: list, targets: list ) -> list: \n",
" \n",
" filter_map = []\n",
" for label in labels:\n",
" for target in targets:\n",
" if target in label['text']:\n",
" filter_map.append(label)\n",
" \n",
" return filter_map"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "74f18d6d-eae2-4d29-90d2-597379e624e0",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'<link rel=\"stylesheet\" href=\"/soupboat/si16-app/static/css/jian.css\"><p style=\"left: 48.135%; top: 20.4458%; position: absolute;\">house viewing 2: meeting with some girls in the evening to see a room; felt super exposed and awkward. Later on, they rejected me. </p><p style=\"left: 76.25%; top: 69.5246%; position: absolute;\">I once went to view a house here but it didn\\'t have the floor. crap. </p><p style=\"left: 55.0889%; top: 15.6154%; position: absolute;\">the most unpleasant house viewing: my viewing overlapped with the previous person and I didn\\'t got the chance to connect with the ones living them. How could then they know who I am and even consider me for the room? </p><p style=\"left: 45.2507%; top: 29.3907%; position: absolute;\">I had the most awkward house viewing here. The people barely talked to me and really let me know that they didn\\'t like me. Obviously, I did not get the room. </p><p style=\"left: 42.0882%; top: 18.8014%; position: absolute;\">my first house viewing: I was really hopeful about this one, actually, because I felt a connection with the girl. I waited 2 weeks to be rejected from this one. </p><p style=\"left: 43.7995%; top: 27.0609%; position: absolute;\">I had the most awkward house viewing here. The people barely talked to me and really let me know that they didn\\'t like me. Not surprisingly, I did not get the room. </p><p style=\"left: 55.621%; top: 33.6313%; position: absolute;\">we were going to a friends house when we got trapped into the riot against covid restrictions and a car got on fire and it was super bad to see all the anger all these people had i felt small and sad and i just wanted to run as faster as i could </p><p style=\"left: 55.621%; top: 33.6313%; position: absolute;\">we were going to a friends house when we got trapped into the riot against covid restrictions and a car got on fire and it was super bad to see all the anger all these people had i felt small and sad and i just wanted to run as faster as i could </p><p style=\"left: 33.8622%; top: 34.9877%; position: absolute;\">house rejection\\n </p>'"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"html_tag_list(target_map_list(data_json['labels'], ['house', 'sad']), False, True, False, False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ef344f39-8922-4a03-bbb8-1e279096ff5e",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}