cognee/Demo_graph.ipynb

3757 lines
297 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "13be50c7-167c-4a03-bd75-53904baa1f8c",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 76,
"id": "8a8942b5-91d6-4746-b35d-00f58bc16d7b",
"metadata": {},
"outputs": [],
"source": [
"import logging\n",
"\n",
"from langchain.prompts import ChatPromptTemplate\n",
"import json\n",
"from langchain.document_loaders import TextLoader\n",
"from langchain.document_loaders import DirectoryLoader\n",
"from langchain.chains import create_extraction_chain\n",
"from langchain.chat_models import ChatOpenAI\n",
"import re\n",
"\n",
"from dotenv import load_dotenv\n",
"import os\n",
"\n",
"# Load environment variables from .env file\n",
"load_dotenv()\n",
"import instructor\n",
"from openai import OpenAI\n",
"\n",
"\n",
"aclient = instructor.patch(OpenAI())\n",
"\n",
"from typing import Optional, List\n",
"from pydantic import BaseModel, Field\n"
]
},
{
"cell_type": "code",
"execution_count": 143,
"id": "14484e25-fae8-4306-b03f-dae91fe5d0aa",
"metadata": {},
"outputs": [],
"source": [
"input_article_one = \"\"\" n the nicest possible way, Britons have always been a bit silly about animals. “Keeping pets, for the English, is not so much a leisure activity as it is an entire way of life,” wrote the anthropologist Kate Fox in Watching the English, nearly 20 years ago. Our dogs, in particular, have been an acceptable outlet for emotions and impulses we otherwise keep strictly controlled our latent desire to be demonstratively affectionate, to be silly and chat to strangers. If this seems like an exaggeration, consider the different reactions youd get if you struck up a conversation with someone in a park with a dog, versus someone on the train.\n",
"\n",
"Indeed, British society has been set up to accommodate these four-legged ambassadors. In the UK unlike Australia, say, or New Zealand dogs are not just permitted on public transport but often openly encouraged. Many pubs and shops display waggish signs, reading, “Dogs welcome, people tolerated”, and have treat jars on their counters. The other day, as I was waiting outside a cafe with a friends dog, the barista urged me to bring her inside.\n",
"\n",
"For years, Britons non-partisan passion for animals has been consistent amid dwindling common ground. But lately, rather than bringing out the best in us, our relationship with dogs is increasingly revealing us at our worst and our supposed “best friends” are paying the price.\n",
"\n",
"As with so many latent traits in the national psyche, it all came unleashed with the pandemic, when many people thought they might as well make the most of all that time at home and in local parks with a dog. Between 2019 and 2022, the number of pet dogs in the UK rose from about nine million to 13 million. But theres long been a seasonal surge around this time of year, substantial enough for the Dogs Trust charity to coin its famous slogan back in 1978: “A dog is for life, not just for Christmas.”\n",
"\n",
"Green spaces, meanwhile, have been steadily declining, and now many of us have returned to the office, just as those “pandemic dogs” are entering their troublesome teens. Its a combustible combination and we are already seeing the results: the number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"\n",
"At the same time, sites such as Pets4Homes.co.uk are replete with listings for dogs that, their owners accept “with deep regret”, are no longer suited to their lifestyles now that lockdown is over. It may have felt as if it would go on for ever, but was there ever any suggestion it was going to last the average dogs lifespan of a decade?\n",
"\n",
"Living beings are being downgraded to mere commodities. You can see it reflected the “designer” breeds currently in fashion, the French bulldogs and pugs that look cute but spend their entire lives in discomfort. American XL bully dogs, now so controversial, are often sought after as a signifier of masculinity: roping an entire other life in service of our egos. Historically, many of Britains most popular breeds evolved to hunt vermin, retrieve game, herd, or otherwise do a specific job alongside humans; these days we are breeding and buying them for their aesthetic appeal.\n",
"\n",
"Underpinning this is a shift to what was long disdained as the “American” approach: treating pets as substitutes for children. In the past in Britain, dogs were treasured on their own terms, for the qualities that made them dogs, and as such, sometimes better than people: their friendliness and trustingness and how they opened up the world for us. They were indulged, certainly by allowing them on to the sofa or in our beds, for instance, when wed sworn we never would but in ways that did not negate or deny their essential otherness.\n",
"\n",
"Now we have more dogs of such ludicrous proportions, they struggle to function as dogs at all and we treat them accordingly, indulging them as we would ourselves: by buying unnecessary things. The total spend on pets in the UK has more than doubled in the past decade, reaching nearly £10bn last year. That huge rise has not just come from essentials: figures from the marketing agency Mintel suggest that one in five UK owners like their pet to “keep up with the latest trends” in grooming or, heaven forbid, outfits.\n",
"\n",
"These days pet “boutiques” like the one that recently opened on my street in Norwich, selling “cold-pressed” dog treats, “paw and nose balms” and spa services are a widespread sign of gentrification. But its not just wealthier areas: this summer in Great Yarmouth, one of the most deprived towns in the country, I noticed seaside stalls selling not one but two brands of ice-cream for dogs.\n",
"\n",
"It suggests dog-lovers have become untethered from their companions desires, let alone their needs. Lets be honest: most dogs would be thrilled to bits to be eating a paper bag, or even their own faeces. And although they are certainly delighted by ice-cream, they dont need it. But the ways we ourselves find solace in consumption, by indulging our simian “treat brain” with things that we dont need and/or arent good for us we have simply extended to our pets.\n",
"\n",
"Its hard not to see the rise in dog-friendly restaurants, cinema screenings and even churches as similar to the ludicrous expenditure: a way to placate the two-legged being on the end of the lead (regardless of the experience of others in the vicinity).\n",
"\n",
"Meanwhile, many dogs suffer daily deprivation, their worlds made small and monotonous by our busy modern schedules. These are social animals: its not natural for them to live without other dogs, let alone in an empty house for eight hours a day, Monday to Friday. If we are besieged by badly behaved dogs, the cause isnt hard to pinpoint. Many behavioural problems can be alleviated and even addressed by sufficient exercise, supervision and consistent routines, but instead of organising our lives so that our pets may thrive, we show our love with a Halloween-themed cookie, or a new outfit for Instagram likes.\n",
"\n",
"Its easy to forget that we are sharing our homes with a descendant of the wolf when it is dressed in sheeps clothing; but the more we learn about animals, the clearer it becomes that our treatment of them, simultaneously adoring and alienated, means they are leading strange, unsatisfying simulacra of the lives they ought to lead.\n",
"\n",
"But for as long as we choose to share our lives with pets, the bar should be the same as for any relationship we value: being prepared to make sacrifices for their wellbeing, prioritising quality time and care, and loving them as they are not for how they reflect on us, or how wed like them to be.\n",
"\n",
"\n",
"\"\"\""
]
},
{
"cell_type": "code",
"execution_count": 144,
"id": "50d5afda-418f-436b-b467-004863193d4a",
"metadata": {},
"outputs": [],
"source": [
"input_article_two = \"\"\"Lee Parkin had been the proud owner of his terrier-spaniel cross Izzy for nearly 10 years when he stepped out for what would be his last walk with his beloved pet.\n",
"\n",
"He was walking Izzy near his home in Doncaster when an XL bully pounced on her, mounting a 20-minute attack and ultimately killing the dog in front of Parkin, who desperately intervened in vain.\n",
"\n",
"“It was such a nice day,” he said. “We were walking a normal field where I go, and I saw this dog loose. It appeared wild by its demeanour.”\n",
"\n",
"Parkin, 50, took his dog through a gate but found himself cornered. The dog approached and started circling them. And then, he says, “it just grabbed her”.\n",
"\n",
"“Ive never encountered a bigger, stronger dog before in my life,” he says. “Ive dealt with dogs attacking another dog before.”\n",
"\n",
"Lee Parkin and his dog Izzy\n",
"Lee Parkin and his dog Izzy. Photograph: Lee Parkin\n",
"Parkin did his best to fight the dog off. “I smashed both hands against it, I twisted its balls, I kicked it in its back end. It did nothing whatsoever. I just shouted for help.”\n",
"\n",
"At first there were no other people around, but “all of a sudden” there were about three other men, possibly including the owner, attempting to remove the animal.\n",
"\n",
"A passerby gave him a lift to the vet but Izzy was “bleeding so profusely” he could hear her choking on her own blood. Her bones had been crushed.\n",
"\n",
"The owners were handed a caution and the dog remains alive and living nearby.\n",
"\n",
"“It was dangerously out of control,” Parkin says of the XL bully. “Ive been brought up with dogs all my life. Theres no place for this type of dog in society.”\n",
"\n",
"He welcomes the incoming ban on XL bullies but says he does not think it is enough and it will not work.\n",
"\n",
"He believes the majority of XL bully owners will not be fazed by the ban and will keep their dogs and ignore the new law and regulations.\n",
"\n",
"“The only effective thing that Ive seen the police doing is turning up and shooting these dogs, which is what I think they should be doing,” Parkin adds.\n",
"\n",
"He was left with significant mental impacts from the attack and was subsequently diagnosed with post-traumatic stress disorder. He received counselling but still struggles with walking dogs, and often rises very early in the morning to avoid other owners. He also carries a dog spray.\n",
"\n",
"Marie Hays siberian husky, Naevia, survived a savage attack on the beach in Redcar on the North Yorkshire coast by two XL bullies but has been left with life-changing injuries. Hay, like Parkin, has also been left with mental scars.\n",
"\n",
"The owner of the dog that attacked seven-year-old Naevia is facing a criminal trial next year.\n",
"\n",
"“We must have only been three minutes and the guy pulls up and basically hes just got his dogs out of the car. They run down to the bottom of the beach and one starts to run towards Naevia.\n",
"\n",
"“The owner turned to me and said: Theyre friendly, dont worry, because I must have pulled a face at the size of the dog.\n",
"\n",
"skip past newsletter promotion\n",
"Sign up to First Edition\n",
"\n",
"Free daily newsletter\n",
"Our morning email breaks down the key stories of the day, telling you whats happening and why it matters\n",
"\n",
"Enter your email address\n",
"Sign up\n",
"Privacy Notice: Newsletters may contain info about charities, online ads, and content funded by outside parties. For more information see our Privacy Policy. We use Google reCaptcha to protect our website and the Google Privacy Policy and Terms of Service apply.\n",
"after newsletter promotion\n",
"“But then the first one jumped on Naevias chest and just started tearing into her.\n",
"\n",
"“So she was screaming, screaming like a baby. And then the other one just came out of nowhere. The attack lasted about 12 minutes.”\n",
"\n",
"An American bully XL with cropped ears. The practice is illegal in England and Wales, but it is still carried out by unscrupulous owners.\n",
"Perfect pets or dangerous dogs? The sudden, surprising rise of American bully XLs\n",
"Read more\n",
"Hay said several people attempted to remove the dogs but were initially unsuccessful. They attempted to lift the dogs by the legs and her 20-year-old daughter was bitten, as were other people who intervened.\n",
"\n",
"The owner eventually placed a harness on one of them and put it in the car, while Hay had to walk the other dog back to the car on a lead.\n",
"\n",
"Naevia lost 83% of her blood. “She was bleeding to death on the beach … she had hundreds of bite marks all over, she had an incision that ripped her chest open.\n",
"\n",
"“She had to have between eight and 10 operations. Shes now in kidney failure because of the stress that it caused on her kidneys. She had to have two blood transfusions.”\n",
"\n",
"Hay said the vet bills were more than £30,000, which she has been able to cover through donations on a fundraising website.\n",
"\n",
"Like Parkin, Hay struggles to go out for walks now, due to the stress caused by the incident.\n",
"\n",
"“I carry a full kit that Ive made myself, its got a rape alarm, a couple of extra dog leads … Im constantly in fear.”\n",
"\n",
"Hay says she is “100%” supportive of the new ban. She says she accepts that a dogs behaviour is partly down to the owners but is confident the breed plays a part too.\"\"\""
]
},
{
"cell_type": "code",
"execution_count": 145,
"id": "e328a903-d084-4d07-9b95-0a9196d7f719",
"metadata": {},
"outputs": [],
"source": [
"\"\"\" We classify input based on the available document types\"\"\"\n",
"\n",
"classification = {\n",
" \"Natural Language Text\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Articles, essays, and reports\",\n",
" \"Books and manuscripts\",\n",
" \"News stories and blog posts\",\n",
" \"Research papers and academic publications\",\n",
" \"Social media posts and comments\",\n",
" \"Website content and product descriptions\",\n",
" \"Personal narratives and stories\"\n",
" ]\n",
" },\n",
" \"Structured Documents\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Spreadsheets and tables\",\n",
" \"Forms and surveys\",\n",
" \"Databases and CSV files\"\n",
" ]\n",
" },\n",
" \"Code and Scripts\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Source code in various programming languages\",\n",
" \"Shell commands and scripts\",\n",
" \"Markup languages (HTML, XML)\",\n",
" \"Stylesheets (CSS) and configuration files (YAML, JSON, INI)\"\n",
" ]\n",
" },\n",
" \"Conversational Data\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Chat transcripts and messaging history\",\n",
" \"Customer service logs and interactions\",\n",
" \"Conversational AI training data\"\n",
" ]\n",
" },\n",
" \"Educational Content\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Textbook content and lecture notes\",\n",
" \"Exam questions and academic exercises\",\n",
" \"E-learning course materials\"\n",
" ]\n",
" },\n",
" \"Creative Writing\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Poetry and prose\",\n",
" \"Scripts for plays, movies, and television\",\n",
" \"Song lyrics\"\n",
" ]\n",
" },\n",
" \"Technical Documentation\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Manuals and user guides\",\n",
" \"Technical specifications and API documentation\",\n",
" \"Helpdesk articles and FAQs\"\n",
" ]\n",
" },\n",
" \"Legal and Regulatory Documents\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Contracts and agreements\",\n",
" \"Laws, regulations, and legal case documents\",\n",
" \"Policy documents and compliance materials\"\n",
" ]\n",
" },\n",
" \"Medical and Scientific Texts\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Clinical trial reports\",\n",
" \"Patient records and case notes\",\n",
" \"Scientific journal articles\"\n",
" ]\n",
" },\n",
" \"Financial and Business Documents\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Financial reports and statements\",\n",
" \"Business plans and proposals\",\n",
" \"Market research and analysis reports\"\n",
" ]\n",
" },\n",
" \"Advertising and Marketing Materials\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Ad copies and marketing slogans\",\n",
" \"Product catalogs and brochures\",\n",
" \"Press releases and promotional content\"\n",
" ]\n",
" },\n",
" \"Emails and Correspondence\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Professional and formal correspondence\",\n",
" \"Personal emails and letters\"\n",
" ]\n",
" },\n",
" \"Metadata and Annotations\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Image and video captions\",\n",
" \"Annotations and metadata for various media\"\n",
" ]\n",
" },\n",
" \"Language Learning Materials\": {\n",
" \"type\": \"TEXT\",\n",
" \"subclass\": [\n",
" \"Vocabulary lists and grammar rules\",\n",
" \"Language exercises and quizzes\"\n",
" ]\n",
" },\n",
" \"Audio Content\": {\n",
" \"type\": \"AUDIO\",\n",
" \"subclass\": [\n",
" \"Music tracks and albums\",\n",
" \"Podcasts and radio broadcasts\",\n",
" \"Audiobooks and audio guides\",\n",
" \"Recorded interviews and speeches\",\n",
" \"Sound effects and ambient sounds\"\n",
" ]\n",
" },\n",
" \"Image Content\": {\n",
" \"type\": \"IMAGE\",\n",
" \"subclass\": [\n",
" \"Photographs and digital images\",\n",
" \"Illustrations, diagrams, and charts\",\n",
" \"Infographics and visual data representations\",\n",
" \"Artwork and paintings\",\n",
" \"Screenshots and graphical user interfaces\"\n",
" ]\n",
" },\n",
" \"Video Content\": {\n",
" \"type\": \"VIDEO\",\n",
" \"subclass\": [\n",
" \"Movies and short films\",\n",
" \"Documentaries and educational videos\",\n",
" \"Video tutorials and how-to guides\",\n",
" \"Animated features and cartoons\",\n",
" \"Live event recordings and sports broadcasts\"\n",
" ]\n",
" },\n",
" \"Multimedia Content\": {\n",
" \"type\": \"MULTIMEDIA\",\n",
" \"subclass\": [\n",
" \"Interactive web content and games\",\n",
" \"Virtual reality (VR) and augmented reality (AR) experiences\",\n",
" \"Mixed media presentations and slide decks\",\n",
" \"E-learning modules with integrated multimedia\",\n",
" \"Digital exhibitions and virtual tours\"\n",
" ]\n",
" },\n",
" \"3D Models and CAD Content\": {\n",
" \"type\": \"3D_MODEL\",\n",
" \"subclass\": [\n",
" \"Architectural renderings and building plans\",\n",
" \"Product design models and prototypes\",\n",
" \"3D animations and character models\",\n",
" \"Scientific simulations and visualizations\",\n",
" \"Virtual objects for AR/VR environments\"\n",
" ]\n",
" },\n",
" \"Procedural Content\": {\n",
" \"type\": \"PROCEDURAL\",\n",
" \"subclass\": [\n",
" \"Tutorials and step-by-step guides\",\n",
" \"Workflow and process descriptions\",\n",
" \"Simulation and training exercises\",\n",
" \"Recipes and crafting instructions\"\n",
" ]\n",
" }\n",
"}\n",
"\n",
"system_prompt = f\"\"\" Classify content based on the following categories: {str(classification)}\"\"\""
]
},
{
"cell_type": "code",
"execution_count": 146,
"id": "af1b6a25-b37d-4861-82ae-fd74a7c69bc8",
"metadata": {},
"outputs": [],
"source": [
"class CognitiveLayerSubgroup(BaseModel):\n",
" \"\"\" CognitiveCategorySubgroup in a general category \"\"\"\n",
" id: int\n",
" name:str\n",
" data_type:str\n",
"\n",
"\n",
"class CognitiveCategory(BaseModel):\n",
" \"\"\"Cognitive category\"\"\"\n",
" name:str\n",
" cognitive_subgroups: List[CognitiveLayerSubgroup] = Field(..., default_factory=list)"
]
},
{
"cell_type": "code",
"execution_count": 147,
"id": "cf1965e3-e870-49a7-8ae5-fa4371e1c8f5",
"metadata": {},
"outputs": [],
"source": [
"def classify_input(input) -> CognitiveCategory:\n",
" \"\"\"Classify input\"\"\"\n",
" model = \"gpt-4-1106-preview\"\n",
" user_prompt = f\"Use the given format to extract information from the following input: {input}.\"\n",
"\n",
"\n",
" out = aclient.chat.completions.create(\n",
" model=model,\n",
" messages=[\n",
" {\n",
" \"role\": \"user\",\n",
" \"content\": user_prompt,\n",
" },\n",
" {\n",
" \"role\": \"system\",\n",
" \"content\": system_prompt,\n",
" },\n",
" \n",
" {\n",
" \"role\": \"system\",\n",
" \"content\": \"Make sure both values are returned. Incomplete results will result in termination\",\n",
" },\n",
" ],\n",
" response_model=CognitiveCategory,\n",
" )\n",
" return out"
]
},
{
"cell_type": "code",
"execution_count": 148,
"id": "fad0c4b0-cd61-4c3c-9964-47f019278060",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{\"name\":\"Natural Language Text\",\"cognitive_subgroups\":[{\"id\":1,\"name\":\"News stories and blog posts\",\"data_type\":\"TEXT\"}]}\n"
]
}
],
"source": [
"required_layers_one = classify_input(input = input_article_one)\n",
"print(required_layers_one.json())"
]
},
{
"cell_type": "code",
"execution_count": 149,
"id": "06b483bf-2fa0-414f-8253-27ffe9a2881c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{\"name\":\"Natural Language Text\",\"cognitive_subgroups\":[{\"id\":1,\"name\":\"News stories and blog posts\",\"data_type\":\"TEXT\"},{\"id\":2,\"name\":\"Personal narratives and stories\",\"data_type\":\"TEXT\"}]}\n"
]
}
],
"source": [
"required_layers_two = classify_input(input = input_article_two)\n",
"print(required_layers_two.json())"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "35461aff-fd80-4eb2-94b2-66c742db8e55",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "57e227bc-363d-437f-9430-c5d14aff6a31",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 84,
"id": "4112063c-e94c-4876-965e-1785e0682329",
"metadata": {},
"outputs": [],
"source": [
"\n",
"def system_prompt_temp(required_layers):\n",
" system_prompt = f\"\"\"\n",
" You are tasked with analyzing a {required_layers.dict()['cognitive_subgroups'][0]['data_type']} files, especially in a multilayer network context for tasks such as analysis, categorization, and feature extraction, various layers can be incorporated to capture the depth and breadth of information contained within the {required_layers.dict()['cognitive_subgroups'][0]['data_type']} \n",
" These layers can help in understanding the content, context, and characteristics of the {required_layers.dict()['cognitive_subgroups'][0]['data_type']}\n",
" Your objective is to extract meaningful layers of information that will contribute to constructing a detailed multilayer network or knowledge graph.\n",
" Approach this task by considering the unique characteristics and inherent properties of the data at hand.\n",
" VERY IMPORTANT: The context you are working in is {required_layers.dict()['name']} and specific domain you are extracting data on is {required_layers.dict()['cognitive_subgroups'][0]['name']}\n",
" \n",
" Guidelines for Layer Extraction:\n",
" \n",
" Take into account: The content type that in this case is: {required_layers.dict()['cognitive_subgroups'][0]['name']} should play a major role in how you decompose into layers.\n",
" \n",
" Based on your analysis, define and describe the layers you've identified, explaining their relevance and contribution to understanding the dataset. Your independent identification of layers will enable a nuanced and multifaceted representation of the data, enhancing applications in knowledge discovery, content analysis, and information retrieval.\n",
" \n",
" .\"\"\"\n",
" return system_prompt"
]
},
{
"cell_type": "code",
"execution_count": 85,
"id": "7c5baaed-5447-425b-bc9c-03d071d66187",
"metadata": {},
"outputs": [],
"source": [
"class CognitiveLayerSubgroup(BaseModel):\n",
" \"\"\" CognitiveLayerSubgroup in a general layer \"\"\"\n",
" id: int\n",
" name:str\n",
" description: str\n",
"\n",
"\n",
"class CognitiveLayer(BaseModel):\n",
" \"\"\"Cognitive layer\"\"\"\n",
" category_name:str\n",
" cognitive_layers: List[CognitiveLayerSubgroup] = Field(..., default_factory=list)"
]
},
{
"cell_type": "code",
"execution_count": 86,
"id": "ee9c8dad-00ee-48ec-bcb5-8b9c74f91141",
"metadata": {},
"outputs": [],
"source": [
"def determine_layers(input, required_layers) -> CognitiveLayer:\n",
" \"\"\"Classify input\"\"\"\n",
" model = \"gpt-4-1106-preview\"\n",
" user_prompt = f\"Use the given format to extract information from the following input: {input}.\"\n",
"\n",
"\n",
" out = aclient.chat.completions.create(\n",
" model=model,\n",
" messages=[\n",
" {\n",
" \"role\": \"user\",\n",
" \"content\": user_prompt,\n",
" },\n",
" {\n",
" \"role\": \"system\",\n",
" \"content\": system_prompt_temp(required_layers),\n",
" },\n",
" ],\n",
" response_model=CognitiveLayer,\n",
" )\n",
" return out"
]
},
{
"cell_type": "code",
"execution_count": 87,
"id": "f4f59ef6-5cdd-478c-a96e-d2de2cc0e04f",
"metadata": {},
"outputs": [],
"source": [
"cognitive_layers_one = determine_layers(input=input_article_one, required_layers= required_layers_one)"
]
},
{
"cell_type": "code",
"execution_count": 88,
"id": "15631e68-61dc-4955-853f-52bf0cb93fbb",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"category_name='Exploring British Attitudes Toward Pets' cognitive_layers=[CognitiveLayerSubgroup(id=1, name='Cultural Practices', description='Exploration of British cultural practices regarding pets, highlighting the affection and accommodations made for dogs in public spaces, and the sociocultural emphasis on pet ownership.'), CognitiveLayerSubgroup(id=2, name='Behavioral Shifts', description='Identification and analysis of changing behaviors and attitudes toward pets in Britain, particularly during and after the COVID-19 pandemic.'), CognitiveLayerSubgroup(id=3, name='Animal Welfare Concerns', description='Insights into the repercussions of current trends in pet ownership on animal welfare, including the impact of designer breeds and the commodification of pets.'), CognitiveLayerSubgroup(id=4, name='Human-Pet Dynamics', description='Discussion of the evolving relationship between humans and pets, focusing on the anthropomorphization of animals, and the appearance versus functionality of pets.'), CognitiveLayerSubgroup(id=5, name='Economic Impact', description='Assessment of the financial implications of pet ownership in Britain, with particular attention to consumerism and the booming pet industry.'), CognitiveLayerSubgroup(id=6, name='Social Commentary', description=\"A layer that encapsulates the author's critique of society's indulgence in pet-related consumerism, often at the expense of the pets' natural needs and well-being.\"), CognitiveLayerSubgroup(id=7, name='Ethical Considerations', description='Critical examination of the moral aspects of pet ownership practices, questioning the ethics behind breeding, commodification, and the treatment of pets as surrogate children.'), CognitiveLayerSubgroup(id=8, name='Comparative Analysis', description='Comparing British attitudes and practices toward pets with those of other countries, drawing contrasts and identifying unique characteristics.'), CognitiveLayerSubgroup(id=9, name='Public Policy Implications', description='Implications for public policy and the need for regulation or intervention in pet-related matters, considering the rising issues stemming from current societal attitudes.')]\n"
]
}
],
"source": [
"print(cognitive_layers_one)"
]
},
{
"cell_type": "code",
"execution_count": 89,
"id": "36ef0bd6-9510-4265-a736-5e10ef1799d0",
"metadata": {},
"outputs": [],
"source": [
"cognitive_layers_two = determine_layers(input=input_article_two, required_layers=required_layers_two)"
]
},
{
"cell_type": "code",
"execution_count": 90,
"id": "8d377859-ed21-4408-ae72-79e8bc9a5309",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"category_name='News stories and blog posts' cognitive_layers=[CognitiveLayerSubgroup(id=1, name='Topical Context', description='This layer encapsulates the main subject matter of the text, which involves animal attacks, specifically dog attacks, and their legal and emotional repercussions.'), CognitiveLayerSubgroup(id=2, name='Geographical Context', description='The layer that locates the events mentioned in the text geographically, including specific places like Doncaster, Redcar, and the North Yorkshire coast in England.'), CognitiveLayerSubgroup(id=3, name='Temporal Context', description='This layer provides temporal references pertinent to the stories related to the individual attacks and subsequent events, such as the upcoming criminal trial or the historical context of the pet ownership.'), CognitiveLayerSubgroup(id=4, name='Personal Testimony', description='A layer of direct quotes and personal experiences as recounted by the individuals involved in the incidents, emphasizing the personal and emotional aspect of the news stories.'), CognitiveLayerSubgroup(id=5, name='Legal and Policy Framework', description='This layer outlines the impact of current and upcoming legistlations on dog ownership and the societal responses to breed-specific bans or laws.'), CognitiveLayerSubgroup(id=6, name='Socioemotional Impact', description='Compiling the reported psychological and emotional effects following the dog attacks, including mental health issues like PTSD and fear of walking dogs.'), CognitiveLayerSubgroup(id=7, name='Economic Impact', description='This layer includes the financial repercussions for the victims, such as veterinary bills and the costs associated with dog attacks.'), CognitiveLayerSubgroup(id=8, name='Community Reaction', description=\"A layer that includes reactions from the broader community, including the response to calls for assistance during attacks and the public's stance on breed-specific legislation.\"), CognitiveLayerSubgroup(id=9, name='Advocacy and Activism', description='This layer covers the efforts by individuals and groups to advocate for changes in law, public awareness of dangerous breeds, and community support through fundraising.'), CognitiveLayerSubgroup(id=10, name='Incident Details', description=\"A descriptive layer providing information on the specifics of the dog attacks, including the nature of the attacks, the dogs involved, and the owners' actions during and after the incidents.\")]\n"
]
}
],
"source": [
"print(cognitive_layers_two)"
]
},
{
"cell_type": "code",
"execution_count": 91,
"id": "41d06ecb-83b9-4284-8d88-6a3f710cb457",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Extracted Layer Names: ['Cultural Practices', 'Behavioral Shifts', 'Animal Welfare Concerns', 'Human-Pet Dynamics', 'Economic Impact', 'Social Commentary', 'Ethical Considerations', 'Comparative Analysis', 'Public Policy Implications']\n"
]
}
],
"source": [
"cognitive_layers_one = [layer_subgroup.name for layer_subgroup in cognitive_layers_one.cognitive_layers]\n",
"\n",
"print(\"Extracted Layer Names:\", cognitive_layers_one)"
]
},
{
"cell_type": "code",
"execution_count": 92,
"id": "1a287a2a-2fb5-4ad3-a69e-80ed2e2ffa5a",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Extracted Layer Names: ['Topical Context', 'Geographical Context', 'Temporal Context', 'Personal Testimony', 'Legal and Policy Framework', 'Socioemotional Impact', 'Economic Impact', 'Community Reaction', 'Advocacy and Activism', 'Incident Details']\n"
]
}
],
"source": [
"cognitive_layers_two = [layer_subgroup.name for layer_subgroup in cognitive_layers_two.cognitive_layers]\n",
"\n",
"print(\"Extracted Layer Names:\", cognitive_layers_two)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "609b1287-e0bf-42a5-856a-f2e0d859ea8b",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "001466ea-d805-444e-9d70-5505d83eb980",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "07014c19-e981-4150-afc0-78800062f6e0",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "619a765d-1fa9-49ce-9b6c-66e81a50e409",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 93,
"id": "dbce6243-7501-42d1-b944-f80811ae903d",
"metadata": {},
"outputs": [],
"source": [
"def system_prompt(layer:str=None)->str: \n",
" return f\"\"\"You are a top-tier algorithm\n",
"designed for extracting information in structured formats to build a knowledge graph.\n",
"- **Nodes** represent entities and concepts. They're akin to Wikipedia nodes.\n",
"- **Edges** represent relationships between concepts. They're akin to Wikipedia links.\n",
"- The aim is to achieve simplicity and clarity in the\n",
"knowledge graph, making it accessible for a vast audience.\n",
"YOU ARE ONLY EXTRACTING DATA FOR COGNITIVE LAYER {layer}\n",
"## 2. Labeling Nodes\n",
"- **Consistency**: Ensure you use basic or elementary types for node labels.\n",
" - For example, when you identify an entity representing a person,\n",
" always label it as **\"person\"**.\n",
" Avoid using more specific terms like \"mathematician\" or \"scientist\".\n",
" - Include event, entity, time, or action nodes to the category.\n",
" - Classify the memory type as episodic or semantic.\n",
"- **Node IDs**: Never utilize integers as node IDs.\n",
" Node IDs should be names or human-readable identifiers found in the text.\n",
"## 3. Handling Numerical Data and Dates\n",
"- Numerical data, like age or other related information,\n",
"should be incorporated as attributes or properties of the respective nodes.\n",
"- **No Separate Nodes for Dates/Numbers**:\n",
"Do not create separate nodes for dates or numerical values.\n",
" Always attach them as attributes or properties of nodes.\n",
"- **Property Format**: Properties must be in a key-value format.\n",
"- **Quotation Marks**: Never use escaped single or double quotes within property values.\n",
"- **Naming Convention**: Use camelCase for property keys, e.g., `birthDate`.\n",
"## 4. Coreference Resolution\n",
"- **Maintain Entity Consistency**:\n",
"When extracting entities, it's vital to ensure consistency.\n",
"If an entity, such as \"John Doe\", is mentioned multiple times\n",
"in the text but is referred to by different names or pronouns (e.g., \"Joe\", \"he\"),\n",
"always use the most complete identifier for that entity throughout the knowledge graph.\n",
" In this example, use \"John Doe\" as the entity ID.\n",
"Remember, the knowledge graph should be coherent and easily understandable,\n",
" so maintaining consistency in entity references is crucial.\n",
"## 5. Strict Compliance\n",
"Adhere to the rules strictly. Non-compliance will result in termination\"\"\""
]
},
{
"cell_type": "code",
"execution_count": 100,
"id": "12a0d829-1387-4e32-84a1-1ad7b6edf0dc",
"metadata": {},
"outputs": [],
"source": [
"import instructor\n",
"from openai import OpenAI\n",
"\n",
"from dotenv import load_dotenv\n",
"import os\n",
"\n",
"# Load environment variables from .env file\n",
"load_dotenv()\n",
"\n",
"aclient = instructor.patch(OpenAI())\n",
"\n",
"from typing import Optional, List\n",
"from pydantic import BaseModel, Field\n",
"\n",
"\n",
"class Node(BaseModel):\n",
" \"\"\"Node in a knowledge graph.\"\"\"\n",
" id: int\n",
" description: str\n",
" category: str\n",
" memory_type: str\n",
" created_at: Optional[float] = None\n",
" summarized: Optional[bool] = None\n",
"\n",
"\n",
"class Edge(BaseModel):\n",
" \"\"\"Edge in a knowledge graph.\"\"\"\n",
" source: int\n",
" target: int\n",
" description: str\n",
" created_at: Optional[float] = None\n",
" summarized: Optional[bool] = None\n",
"\n",
"\n",
"class KnowledgeGraph(BaseModel):\n",
" \"\"\"Knowledge graph.\"\"\"\n",
" nodes: List[Node] = Field(..., default_factory=list)\n",
" edges: List[Edge] = Field(..., default_factory=list)\n",
"\n",
"\n",
"def generate_graph(input, layer:str=None) -> KnowledgeGraph:\n",
" \"\"\"Generate a knowledge graph from a user query.\"\"\"\n",
" model = \"gpt-4-1106-preview\"\n",
" user_prompt = f\"Use the given format to extract information from the following input: {input}.\"\n",
"\n",
"\n",
" out = aclient.chat.completions.create(\n",
" model=model,\n",
" messages=[\n",
" {\n",
" \"role\": \"user\",\n",
" \"content\": user_prompt,\n",
" },\n",
" {\n",
" \"role\": \"system\",\n",
" \"content\": system_prompt(layer=layer),\n",
" },\n",
" {\n",
" \"role\": \"system\",\n",
" \"content\": \"Must include both nodes and edges\",\n",
" },\n",
" ],\n",
" response_model=KnowledgeGraph,\n",
" )\n",
" return out"
]
},
{
"cell_type": "code",
"execution_count": 101,
"id": "12bf38da-019d-4568-af21-21507c60f906",
"metadata": {},
"outputs": [],
"source": [
"\n",
"def create_layer_graph(input, layer_list):\n",
" layer_graphs = []\n",
" \n",
" for layer in layer_list[:3]:\n",
" print(\"Layer processed is:\", str(layer))\n",
" layer_graph = generate_graph(input=input, layer= layer)\n",
" print(\"Layer graph is:\", str(layer_graph))\n",
" layer_graphs.append(layer_graph)\n",
" return layer_graphs\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 102,
"id": "4a19cc82-b892-47f3-99db-b70edccefda5",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Layer processed is: Cultural Practices\n",
"Layer graph is: nodes=[Node(id=1, description='In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs', category='Cultural Practices', memory_type='semantic', created_at=None, summarized=None), Node(id=2, description='Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability', category='Cultural Practices', memory_type='semantic', created_at=None, summarized=None), Node(id=3, description=\"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\", category='Cultural Practices', memory_type='semantic', created_at=None, summarized=None), Node(id=4, description='Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains', category='Cultural Practices', memory_type='semantic', created_at=None, summarized=None), Node(id=5, description='The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022', category='Events', memory_type='episodic', created_at=None, summarized=None), Node(id=6, description='England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics', category='Events', memory_type='episodic', created_at=None, summarized=None), Node(id=7, description=\"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\", category='Cultural Practices', memory_type='semantic', created_at=None, summarized=None), Node(id=8, description=\"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\", category='Cultural Practices', memory_type='semantic', created_at=None, summarized=None), Node(id=9, description='Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items', category='Cultural Practices', memory_type='semantic', created_at=None, summarized=None), Node(id=10, description='Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption', category='Cultural Practices', memory_type='semantic', created_at=None, summarized=None), Node(id=11, description='Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences', category='Cultural Practices', memory_type='semantic', created_at=None, summarized=None), Node(id=12, description=\"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\", category='Cultural Practices', memory_type='semantic', created_at=None, summarized=None)] edges=[Edge(source=1, target=2, description='Cultural norm facilitates', created_at=None, summarized=None), Edge(source=2, target=4, description='Function as', created_at=None, summarized=None), Edge(source=1, target=3, description='Manifested in', created_at=None, summarized=None), Edge(source=5, target=6, description='Correlated with', created_at=None, summarized=None), Edge(source=1, target=7, description='Increasing trend in', created_at=None, summarized=None), Edge(source=7, target=8, description='Underpinned by', created_at=None, summarized=None), Edge(source=1, target=9, description='Leads to', created_at=None, summarized=None), Edge(source=10, target=9, description='Driven by', created_at=None, summarized=None), Edge(source=11, target=12, description='Counteracted by prioritizing', created_at=None, summarized=None)]\n",
"Layer processed is: Behavioral Shifts\n",
"Layer graph is: nodes=[Node(id=1, description=\"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\", category='person', memory_type='semantic', created_at=None, summarized=None), Node(id=2, description='Dogs serve as an outlet for emotions and social engagement for Britons', category='concept', memory_type='semantic', created_at=None, summarized=None), Node(id=3, description='In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops', category='concept', memory_type='semantic', created_at=None, summarized=None), Node(id=4, description='Despite societal changes, the passion for animals in the UK has been consistent', category='concept', memory_type='semantic', created_at=None, summarized=None), Node(id=5, description='The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK', category='event', memory_type='episodic', created_at=None, summarized=None), Node(id=6, description=\"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\", category='entity', memory_type='semantic', created_at=None, summarized=None), Node(id=7, description='The number of dog attacks in England and Wales saw a significant rise', category='event', memory_type='episodic', created_at=None, summarized=None), Node(id=8, description=\"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\", category='concept', memory_type='semantic', created_at=None, summarized=None), Node(id=9, description='Consumer spending on pets in the UK has increased, extending to non-essential items and services', category='concept', memory_type='semantic', created_at=None, summarized=None), Node(id=10, description='Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules', category='concept', memory_type='semantic', created_at=None, summarized=None), Node(id=11, description='Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners', category='concept', memory_type='semantic', created_at=None, summarized=None)] edges=[Edge(source=1, target=2, description='Kate Fox highlighted the role of dogs as emotional outlets in British culture', created_at=None, summarized=None), Edge(source=2, target=3, description='The role of dogs in emotional support correlates with their acceptance in public spaces', created_at=None, summarized=None), Edge(source=4, target=5, description='The consistent passion for animals in the UK manifested as a pet boom during the pandemic', created_at=None, summarized=None), Edge(source=5, target=6, description='The increase in pet ownership during the pandemic prompted reminders of lifelong commitment to pets', created_at=None, summarized=None), Edge(source=5, target=7, description='The pet boom during the pandemic coincided with an increase in dog attacks', created_at=None, summarized=None), Edge(source=7, target=8, description='The rise in dog attacks is associated with viewing dogs as commodities rather than companions', created_at=None, summarized=None), Edge(source=8, target=9, description='The commodification of dogs connects to excessive consumer spending on pets', created_at=None, summarized=None), Edge(source=9, target=10, description='Despite consumer indulgence, many pets face isolation and lack of socialization', created_at=None, summarized=None), Edge(source=10, target=11, description='The isolation of pets challenges the principle of prioritizing their well-being', created_at=None, summarized=None)]\n",
"Layer processed is: Animal Welfare Concerns\n",
"Layer graph is: nodes=[Node(id=1, description='Britons have a significant and emotional connection with animals, particularly dogs.', category='culturalTrait', memory_type='semantic', created_at=None, summarized=None), Node(id=2, description='Kate Fox, an anthropologist who wrote about the English way of life with pets.', category='person', memory_type='semantic', created_at=None, summarized=None), Node(id=3, description='Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.', category='statistic', memory_type='episodic', created_at=None, summarized=None), Node(id=4, description='In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.', category='socialNorm', memory_type='semantic', created_at=None, summarized=None), Node(id=5, description='The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.', category='statistic', memory_type='episodic', created_at=None, summarized=None), Node(id=6, description='Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.', category='issue', memory_type='semantic', created_at=None, summarized=None), Node(id=7, description='Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.', category='trend', memory_type='semantic', created_at=None, summarized=None), Node(id=8, description='Controversial American XL bully dogs are sought after as a signifier of masculinity.', category='trend', memory_type='semantic', created_at=None, summarized=None), Node(id=9, description='Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.', category='culturalShift', memory_type='semantic', created_at=None, summarized=None), Node(id=10, description='Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.', category='economicData', memory_type='semantic', created_at=None, summarized=None), Node(id=11, description='Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.', category='socialTrend', memory_type='semantic', created_at=None, summarized=None), Node(id=12, description=\"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\", category='welfareIssue', memory_type='semantic', created_at=None, summarized=None), Node(id=13, description='Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.', category='welfareIssue', memory_type='semantic', created_at=None, summarized=None)] edges=[Edge(source=1, target=2, description=\"Kate Fox wrote about Britons' significant relationship with animals.\", created_at=None, summarized=None), Edge(source=1, target=3, description='The connection Britons have with animals is illustrated by the increase in pet dogs.', created_at=None, summarized=None), Edge(source=1, target=4, description=\"Britons' affection for animals is evidenced by the encouragement of dogs in public places.\", created_at=None, summarized=None), Edge(source=3, target=5, description='The increase in pet dogs has correlated with a rise in dog attacks.', created_at=None, summarized=None), Edge(source=1, target=6, description='The change in how Britons relate to animals can be seen in the commodification of dogs.', created_at=None, summarized=None), Edge(source=6, target=7, description='Treatment of dogs as commodities is partly due to the popularity of designer breeds.', created_at=None, summarized=None), Edge(source=6, target=8, description='The view of dogs as commodities extends to the demand for breeds like American XL bully dogs.', created_at=None, summarized=None), Edge(source=7, target=8, description='American XL bully dogs are part of the trend for designer dog breeds.', created_at=None, summarized=None), Edge(source=1, target=9, description='Pets are increasingly seen as child substitutes, showing a shift in the traditional British view of domestic animals.', created_at=None, summarized=None), Edge(source=10, target=11, description='The rise in spending on pets coincides with the increase of dog-friendly establishments.', created_at=None, summarized=None), Edge(source=12, target=13, description='Daily deprivation experienced by many dogs contributes to their behavioral issues.', created_at=None, summarized=None)]\n",
"Layer processed is: Topical Context\n",
"Layer graph is: nodes=[Node(id=1, description='Britons have a strong affection for animals, especially dogs, which serve as outlets for restrained emotions.', category='Cultural Phenomenon', memory_type='Semantic', created_at=None, summarized=None), Node(id=2, description='In the UK, dogs are allowed and encouraged on public transport, a policy contrasting with Australia or New Zealand.', category='Policy', memory_type='Semantic', created_at=None, summarized=None), Node(id=3, description='The number of pet dogs in the UK increased from about 9 million to 13 million between 2019 and 2022.', category='Statistic', memory_type='Semantic', created_at=None, summarized=None), Node(id=4, description='Dogs are increasingly treated as commodities, valued for aesthetic appeal rather than functionality.', category='Cultural Shift', memory_type='Semantic', created_at=None, summarized=None), Node(id=5, description=\"There's a cultural shift in treating pets as child substitutes, characterized by indulgence in unnecessary products and services.\", category='Cultural Shift', memory_type='Semantic', created_at=None, summarized=None), Node(id=6, description='Pet expenditure in the UK has more than doubled in the past decade, reaching nearly £10 billion.', category='Economic Statistic', memory_type='Semantic', created_at=None, summarized=None), Node(id=7, description='Rise in dog behavioral problems due to lack of exercise, supervision, and consistent routines.', category='Animal Welfare Issue', memory_type='Semantic', created_at=None, summarized=None), Node(id=8, description='Pet wellbeing should be prioritized with quality care, acknowledging their nature, and fostering good human-animal relationships.', category='Animal Welfare Principle', memory_type='Semantic', created_at=None, summarized=None), Node(id=9, description=\"There's been more than a third increase in dog attacks recorded by police in England and Wales between 2018 and 2022.\", category='Crime Statistic', memory_type='Semantic', created_at=None, summarized=None)] edges=[Edge(source=1, target=2, description='Affection for animals in the UK reflects in their dog-friendly transportation policies.', created_at=None, summarized=None), Edge(source=3, target=4, description='The increase in pet dogs correlates with their growing treatment as commodities.', created_at=None, summarized=None), Edge(source=4, target=5, description='The commodification of pets relates to the broader cultural shift of treating them as child substitutes.', created_at=None, summarized=None), Edge(source=6, target=5, description='Rising pet expenditures reflect the trend of over-indulging pets in a manner similar to child substitutes.', created_at=None, summarized=None), Edge(source=7, target=9, description='Behavioral issues in dogs may be contributing to the rising number of dog attacks.', created_at=None, summarized=None), Edge(source=8, target=7, description='Prioritizing pet wellbeing can help address behavioral problems in pets.', created_at=None, summarized=None)]\n",
"Layer processed is: Geographical Context\n",
"Layer graph is: nodes=[Node(id=1, description='A country in Western Europe known for accommodating dogs and allowing them on public transport', category='geographicalLocation', memory_type='semantic', created_at=None, summarized=None), Node(id=2, description='A town in the United Kingdom, noted as one of the most deprived areas', category='geographicalLocation', memory_type='semantic', created_at=None, summarized=None), Node(id=3, description='A city in the United Kingdom where pet boutiques are a sign of gentrification', category='geographicalLocation', memory_type='semantic', created_at=None, summarized=None), Node(id=4, description='A country mentioned in comparison to the United Kingdom, where the approach to dogs on public transport differs', category='geographicalLocation', memory_type='semantic', created_at=None, summarized=None), Node(id=5, description='A country mentioned in comparison to the United Kingdom, where the approach to dogs on public transport differs', category='geographicalLocation', memory_type='semantic', created_at=None, summarized=None)] edges=[Edge(source=1, target=2, description='Great Yarmouth is a town within the United Kingdom', created_at=None, summarized=True), Edge(source=1, target=3, description='Norwich is a city within the United Kingdom', created_at=None, summarized=True)]\n",
"Layer processed is: Temporal Context\n",
"Layer graph is: nodes=[Node(id=1, description='Britons have a strong affection for animals, treating pet keeping not just as a leisure activity but as a way of life.', category='cultural trait', memory_type='semantic', created_at=None, summarized=None), Node(id=2, description='In Britain, dogs serve as an acceptable outlet for emotions and impulses such as affection and sociability.', category='behavior', memory_type='semantic', created_at=None, summarized=None), Node(id=3, description='Dogs are permitted and encouraged on public transport and welcomed in many pubs and shops in the UK.', category='social norm', memory_type='semantic', created_at=None, summarized=None), Node(id=4, description=\"The Dogs Trust charity created the slogan 'A dog is for life, not just for Christmas' in 1978.\", category='campaign', memory_type='episodic', created_at=1978.0, summarized=None), Node(id=5, description='The number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.', category='statistic', memory_type='semantic', created_at=None, summarized=None), Node(id=6, description='The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.', category='statistic', memory_type='semantic', created_at=None, summarized=None), Node(id=7, description='During the COVID-19 pandemic, many people acquired dogs to make the most of time at home and in local parks.', category='event', memory_type='semantic', created_at=None, summarized=None), Node(id=8, description=\"Living beings, especially certain dog breeds, are being treated as commodities, reflecting 'designer' trends.\", category='social issue', memory_type='semantic', created_at=None, summarized=None), Node(id=9, description=\"The treatment of pets in Britain is shifting towards an 'American' approach, with pets increasingly substituting for children.\", category='cultural shift', memory_type='semantic', created_at=None, summarized=None), Node(id=10, description='The trend of consumerism is extending to pets in the UK, with high expenditure on non-essential pet products and services.', category='trend', memory_type='semantic', created_at=None, summarized=None), Node(id=11, description='The wellbeing of dogs is often compromised by modern lifestyles that restrict their social and physical needs.', category='welfare concern', memory_type='semantic', created_at=None, summarized=None)] edges=[Edge(source=7, target=5, description='The COVID-19 pandemic led to an increase in pet dog ownership in the UK.', created_at=None, summarized=None), Edge(source=8, target=10, description='The treatment of pets as commodities is associated with the consumerism trend of buying unnecessary pet products.', created_at=None, summarized=None), Edge(source=6, target=11, description='The rise in dog attacks may relate to the compromised wellbeing of dogs due to modern lifestyle constraints.', created_at=None, summarized=None)]\n"
]
}
],
"source": [
"layer_1_graph = create_layer_graph(input_article_one, cognitive_layers_one)\n"
]
},
{
"cell_type": "code",
"execution_count": 103,
"id": "15dc7863-0f4c-47ae-89ef-2656e8478249",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Layer processed is: Topical Context\n",
"Layer graph is: nodes=[Node(id=1, description='Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD', category='person', memory_type='episodic', created_at=None, summarized=None), Node(id=2, description='Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully', category='animal', memory_type='episodic', created_at=None, summarized=None), Node(id=3, description='An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster', category='event', memory_type='episodic', created_at=None, summarized=None), Node(id=4, description='Doncaster, the location where Izzy was attacked and killed by an XL bully', category='location', memory_type='semantic', created_at=None, summarized=None), Node(id=5, description=\"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\", category='animal', memory_type='episodic', created_at=None, summarized=None), Node(id=6, description='Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars', category='person', memory_type='episodic', created_at=None, summarized=None), Node(id=7, description='Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries', category='event', memory_type='episodic', created_at=None, summarized=None), Node(id=8, description='Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies', category='location', memory_type='semantic', created_at=None, summarized=None), Node(id=9, description='XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control', category='animal', memory_type='semantic', created_at=None, summarized=None), Node(id=10, description='An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness', category='event', memory_type='semantic', created_at=None, summarized=None)] edges=[Edge(source=1, target=2, description='owned', created_at=None, summarized=None), Edge(source=1, target=3, description='witnessed', created_at=None, summarized=None), Edge(source=3, target=4, description='occurred in', created_at=None, summarized=None), Edge(source=6, target=5, description='owned', created_at=None, summarized=None), Edge(source=7, target=8, description='occurred in', created_at=None, summarized=None), Edge(source=7, target=5, description='targeted', created_at=None, summarized=None), Edge(source=9, target=3, description='involved in', created_at=None, summarized=None), Edge(source=9, target=7, description='involved in', created_at=None, summarized=None), Edge(source=10, target=9, description='targets', created_at=None, summarized=None), Edge(source=1, target=10, description='supports with reservations', created_at=None, summarized=None), Edge(source=6, target=10, description='supports', created_at=None, summarized=None)]\n",
"Layer processed is: Geographical Context\n",
"Layer graph is: nodes=[Node(id=1, description='Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.', category='person', memory_type='episodic', created_at=None, summarized=None), Node(id=2, description='Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.', category='animal', memory_type='episodic', created_at=None, summarized=None), Node(id=3, description='Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.', category='location', memory_type='semantic', created_at=None, summarized=None), Node(id=4, description='XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.', category='animal', memory_type='semantic', created_at=None, summarized=None), Node(id=5, description='Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.', category='person', memory_type='episodic', created_at=None, summarized=None), Node(id=6, description='Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.', category='animal', memory_type='episodic', created_at=None, summarized=None), Node(id=7, description='Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.', category='location', memory_type='semantic', created_at=None, summarized=None)] edges=[Edge(source=1, target=3, description='resides in', created_at=None, summarized=None), Edge(source=1, target=2, description='was the owner of', created_at=None, summarized=None), Edge(source=2, target=4, description='killed by', created_at=None, summarized=None), Edge(source=5, target=6, description='is the owner of', created_at=None, summarized=None), Edge(source=6, target=7, description='attacked at', created_at=None, summarized=None), Edge(source=6, target=4, description='attacked by', created_at=None, summarized=None)]\n",
"Layer processed is: Temporal Context\n",
"Layer graph is: nodes=[Node(id=1, description='Lee Parkin, a 50-year-old man and owner of the dog Izzy.', category='person', memory_type='episodic', created_at=None, summarized=None), Node(id=2, description='Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.', category='animal', memory_type='episodic', created_at=None, summarized=None), Node(id=3, description='Attack by an XL bully on Izzy resulting in her death.', category='event', memory_type='episodic', created_at=None, summarized=None), Node(id=4, description='Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.', category='condition', memory_type='semantic', created_at=None, summarized=None), Node(id=5, description='Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.', category='person', memory_type='episodic', created_at=None, summarized=None), Node(id=6, description='Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.', category='animal', memory_type='episodic', created_at=None, summarized=None), Node(id=7, description='The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.', category='event', memory_type='semantic', created_at=None, summarized=None), Node(id=8, description='Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.', category='condition', memory_type='semantic', created_at=None, summarized=None)] edges=[Edge(source=1, target=2, description='owned', created_at=None, summarized=None), Edge(source=1, target=3, description='involved in', created_at=None, summarized=None), Edge(source=2, target=3, description='killed in', created_at=None, summarized=None), Edge(source=1, target=4, description='diagnosed with', created_at=None, summarized=None), Edge(source=5, target=6, description='owned', created_at=None, summarized=None), Edge(source=6, target=3, description='injured in', created_at=None, summarized=None), Edge(source=1, target=7, description='supports', created_at=None, summarized=None), Edge(source=5, target=7, description='supports', created_at=None, summarized=None), Edge(source=1, target=8, description='experiences', created_at=None, summarized=None), Edge(source=5, target=8, description='experiences', created_at=None, summarized=None)]\n"
]
}
],
"source": [
"layer_2_graph = create_layer_graph(input_article_two, cognitive_layers_two)"
]
},
{
"cell_type": "code",
"execution_count": 203,
"id": "58644c64-7ef0-415f-8e41-e2edcf5fd15b",
"metadata": {},
"outputs": [],
"source": [
"import networkx as nx\n",
"import uuid\n",
"from datetime import datetime\n",
"\n",
"def create_user_content_graph(user_id, custom_user_properties=None, required_layers=None, default_fields=None, existing_graph=None):\n",
"\n",
" category_name = required_layers.dict()['name']\n",
" subgroup_names = [subgroup['name'] for subgroup in required_layers.dict()['cognitive_subgroups']]\n",
"\n",
" \n",
" # Construct the additional_categories structure\n",
" additional_categories = {\n",
" category_name: subgroup_names\n",
"}\n",
"\n",
" # Define default fields for all nodes if not provided\n",
" if default_fields is None:\n",
" default_fields = {\n",
" 'created_at': datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\"),\n",
" 'updated_at': datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\")\n",
" }\n",
"\n",
" # Merge custom user properties with default properties; custom properties take precedence\n",
" user_properties = {**default_fields, **(custom_user_properties or {})}\n",
"\n",
" # Default content categories\n",
" content_categories = {\n",
" \"Temporal\": [\"Historical events\", \"Schedules and timelines\"],\n",
" \"Positional\": [\"Geographical locations\", \"Spatial data\"],\n",
" \"Propositions\": [\"Hypotheses and theories\", \"Claims and arguments\"],\n",
" \"Personalization\": [\"User preferences\", \"User information\"]\n",
" }\n",
"\n",
" # Update content categories with any additional categories provided\n",
" if additional_categories:\n",
" content_categories.update(additional_categories)\n",
"\n",
" G = existing_graph if existing_graph else nx.MultiDiGraph()\n",
"\n",
" # Check if the user node already exists, if not, add the user node with properties\n",
" if not G.has_node(user_id):\n",
" G.add_node(user_id, **user_properties)\n",
"\n",
" # Add or update content category nodes and their edges\n",
" for category, subclasses in content_categories.items():\n",
" category_properties = {**default_fields, 'type': 'category'}\n",
"\n",
" # Add or update the category node\n",
" if not G.has_node(category):\n",
" G.add_node(category, **category_properties)\n",
" G.add_edge(user_id, category, relationship='created')\n",
"\n",
" # Add or update subclass nodes and their edges\n",
" for subclass in subclasses:\n",
" # Using both category and subclass names to ensure uniqueness within categories\n",
" subclass_node_id = f\"{category}:{subclass}\"\n",
"\n",
" # Check if subclass node exists before adding, based on node content\n",
" if not any(subclass == data.get('content') for _, data in G.nodes(data=True)):\n",
" subclass_properties = {**default_fields, 'type': 'subclass', 'content': subclass}\n",
" G.add_node(subclass_node_id, **subclass_properties)\n",
" G.add_edge(category, subclass_node_id, relationship='includes')\n",
"\n",
" return G\n",
"\n",
" # # Add content category nodes and their edges\n",
" # for category, subclasses in content_categories.items():\n",
" # category_properties = {**default_fields, 'type': 'category'}\n",
" # G.add_node(category, **category_properties)\n",
" # G.add_edge(user_id, category, relationship='created')\n",
"\n",
" # # Add subclass nodes and their edges\n",
" # for subclass in subclasses:\n",
" # unique_id = str(uuid.uuid4())\n",
" # subclass_node_id = f\"{subclass} - {unique_id}\"\n",
" # subclass_properties = {**default_fields, 'type': 'subclass', 'content': subclass}\n",
" # G.add_node(subclass_node_id, **subclass_properties)\n",
" # G.add_edge(category, subclass_node_id, relationship='includes')\n",
"\n",
" # return G\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 264,
"id": "dd3f0e55-9f9d-4804-9ad6-31afd2088ab5",
"metadata": {},
"outputs": [],
"source": [
"# G = None"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2cc7c3bb-7cc0-453b-beab-2983a703ccda",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 265,
"id": "199ef3ab-5e73-40d2-b531-6a402edf3f17",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Nodes in the graph:\n",
"[('user123', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'username': 'exampleUser', 'email': 'user@example.com'}), ('Temporal', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'category'}), ('Temporal:Historical events', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'subclass', 'content': 'Historical events'}), ('Temporal:Schedules and timelines', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'subclass', 'content': 'Schedules and timelines'}), ('Positional', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'category'}), ('Positional:Geographical locations', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'subclass', 'content': 'Geographical locations'}), ('Positional:Spatial data', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'subclass', 'content': 'Spatial data'}), ('Propositions', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'category'}), ('Propositions:Hypotheses and theories', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'subclass', 'content': 'Hypotheses and theories'}), ('Propositions:Claims and arguments', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'subclass', 'content': 'Claims and arguments'}), ('Personalization', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'category'}), ('Personalization:User preferences', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'subclass', 'content': 'User preferences'}), ('Personalization:User information', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'subclass', 'content': 'User information'}), ('Natural Language Text', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'category'}), ('Natural Language Text:News stories and blog posts', {'created_at': '2024-02-28 10:24:56', 'updated_at': '2024-02-28 10:24:56', 'type': 'subclass', 'content': 'News stories and blog posts'})]\n",
"\n",
"Edges in the graph:\n",
"[('user123', 'Temporal', {'relationship': 'created'}), ('user123', 'Positional', {'relationship': 'created'}), ('user123', 'Propositions', {'relationship': 'created'}), ('user123', 'Personalization', {'relationship': 'created'}), ('user123', 'Natural Language Text', {'relationship': 'created'}), ('Temporal', 'Temporal:Historical events', {'relationship': 'includes'}), ('Temporal', 'Temporal:Schedules and timelines', {'relationship': 'includes'}), ('Positional', 'Positional:Geographical locations', {'relationship': 'includes'}), ('Positional', 'Positional:Spatial data', {'relationship': 'includes'}), ('Propositions', 'Propositions:Hypotheses and theories', {'relationship': 'includes'}), ('Propositions', 'Propositions:Claims and arguments', {'relationship': 'includes'}), ('Personalization', 'Personalization:User preferences', {'relationship': 'includes'}), ('Personalization', 'Personalization:User information', {'relationship': 'includes'}), ('Natural Language Text', 'Natural Language Text:News stories and blog posts', {'relationship': 'includes'})]\n"
]
}
],
"source": [
"# Example usage\n",
"user_id = 'user123'\n",
"custom_user_properties = {\n",
" 'username': 'exampleUser',\n",
" 'email': 'user@example.com'\n",
"}\n",
"\n",
"# additional_categories = {\n",
"# \"Natural Language Text\": [\"Articles, essays, and reports\", \"Books and manuscripts\"]\n",
"# }\n",
"\n",
"G = create_user_content_graph(user_id, custom_user_properties, required_layers_one)\n",
"\n",
"# Accessing the graph\n",
"print(\"Nodes in the graph:\")\n",
"print(G.nodes(data=True))\n",
"print(\"\\nEdges in the graph:\")\n",
"print(G.edges(data=True))"
]
},
{
"cell_type": "code",
"execution_count": 273,
"id": "b3160a1d-a6ea-40ce-a521-37ad26d31ffb",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"CognitiveCategory(name='Natural Language Text', cognitive_subgroups=[CognitiveLayerSubgroup(id=1, name='News stories and blog posts', data_type='TEXT')])"
]
},
"execution_count": 273,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"required_layers_one"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b254dfc9-ce85-4175-9d1e-c0f1ede67e3b",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "a77b4f24-3046-4ab6-9ba1-c802096498df",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 268,
"id": "4dab2ff0-0d12-4a00-a4e4-fb901e701bd3",
"metadata": {},
"outputs": [],
"source": [
"B = create_user_content_graph(user_id, custom_user_properties, required_layers_two, existing_graph=G)"
]
},
{
"cell_type": "code",
"execution_count": 269,
"id": "627d42fd-d2ce-4ccd-a2a1-2f7ac2f463cf",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"MultiDiGraph with 16 nodes and 15 edges\n"
]
}
],
"source": [
"print(B)"
]
},
{
"cell_type": "code",
"execution_count": 272,
"id": "512f15be-0114-4c8c-9754-e82f2fa16344",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <iframe id=\"11311f6a-1877-4ad3-9fa3-f065f4e5910f\" src=\"https://hub.graphistry.com/graph/graph.html?dataset=718110b7a33e42309bb4a3fa755afa9c&type=arrow&viztoken=efaa5844-717a-4e54-a0e2-9862da71a560&usertag=1daaf574-pygraphistry-0.33.0&splashAfter=1709112416&info=true\"\n",
" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\"\n",
" oallowfullscreen=\"true\" msallowfullscreen=\"true\"\n",
" style=\"width:100%; height:500px; border: 1px solid #DDD; overflow: hidden\"\n",
" \n",
" >\n",
" </iframe>\n",
" \n",
" <script>\n",
" try {\n",
" $(\"#11311f6a-1877-4ad3-9fa3-f065f4e5910f\").bind('mousewheel', function(e) { e.preventDefault(); });\n",
" } catch (e) { console.error('exn catching scroll', e); }\n",
" </script>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 272,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import graphistry\n",
"import pandas as pd\n",
"\n",
"# Assuming Graphistry is already configured with API key\n",
"# graphistry.register(api=3, username='your_username', password='your_password')\n",
"\n",
"# Convert NetworkX graph to a Pandas DataFrame\n",
"edges = nx.to_pandas_edgelist(B)\n",
"graphistry.register(api=3, username='Vasilije1990', password='Q@HLdgv5SMUsGxy') \n",
"\n",
"# Visualize the graph\n",
"graphistry.edges(edges, 'source', 'target').plot()"
]
},
{
"cell_type": "code",
"execution_count": 231,
"id": "40866ff1-7c2d-4682-851c-de2442984cd5",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"MultiDiGraph with 15 nodes and 14 edges\n"
]
}
],
"source": [
"print(G)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a3127724-3bef-416e-8631-ba6cea645196",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 274,
"id": "fe634bcb-0c00-4a2a-8bcb-687a2fcf847c",
"metadata": {},
"outputs": [],
"source": [
"def append_data_to_graph(G, category_name, subclass_content, new_data, layer_uuid, layer_decomposition_uuid):\n",
" # Find the node ID for the subclass within the category\n",
" subclass_node_id = None\n",
" for node, data in G.nodes(data=True):\n",
" if subclass_content in node:\n",
" subclass_node_id = node\n",
"\n",
" print(subclass_node_id)\n",
"\n",
" if not subclass_node_id:\n",
" print(f\"Subclass '{subclass_content}' under category '{category_name}' not found in the graph.\")\n",
" return G\n",
"\n",
" # Mapping from old node IDs to new node IDs\n",
" node_id_mapping = {}\n",
"\n",
" # Add nodes from the Pydantic object\n",
" for node in new_data.nodes:\n",
" unique_node_id =uuid.uuid4()\n",
" new_node_id = f\"{node.description} - {str(layer_uuid)} - {str(layer_decomposition_uuid)} - {str(unique_node_id)}\"\n",
" G.add_node(new_node_id, \n",
" created_at=datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\"), \n",
" updated_at=datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\"), \n",
" description=node.description, \n",
" category=node.category, \n",
" memory_type=node.memory_type, \n",
" layer_uuid = str(layer_uuid),\n",
" layer_decomposition_uuid = str(layer_decomposition_uuid),\n",
" id = str(unique_node_id),\n",
" type='detail')\n",
" G.add_edge(subclass_node_id, new_node_id, relationship='detail')\n",
"\n",
" # Store the mapping from old node ID to new node ID\n",
" node_id_mapping[node.id] = new_node_id\n",
"\n",
" # Add edges from the Pydantic object using the new node IDs\n",
" for edge in new_data.edges:\n",
" # Use the mapping to get the new node IDs\n",
" source_node_id = node_id_mapping.get(edge.source)\n",
" target_node_id = node_id_mapping.get(edge.target)\n",
"\n",
" if source_node_id and target_node_id:\n",
" G.add_edge(source_node_id, target_node_id, description=edge.description, relationship='relation')\n",
" else:\n",
" print(f\"Could not find mapping for edge from {edge.source} to {edge.target}\")\n",
"\n",
" return G\n",
"\n",
"\n",
"\n",
"\n",
"# Assuming `pydata` is your Pydantic model instance containing the nodes and edges information\n",
"# and `G` is your existing graph\n",
"\n",
"# # Here's how you would call this function:\n",
"# category_name = list(additional_categories.keys())[0]\n",
"# subclass_content = list(additional_categories.values())[0][0]\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8d6a9eb5-387e-45a3-9dc9-5f8ac36fdd38",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 302,
"id": "7f1cde10-3d83-4800-9ef4-f8eaa39cf772",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"CognitiveCategory(name='Natural Language Text', cognitive_subgroups=[CognitiveLayerSubgroup(id=1, name='News stories and blog posts', data_type='TEXT')])"
]
},
"execution_count": 302,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"required_layers_one"
]
},
{
"cell_type": "code",
"execution_count": 282,
"id": "66630223-3ba0-4384-95d2-df2995e15271",
"metadata": {},
"outputs": [],
"source": [
"def append_to_graph(layer_graphs, required_layers, G):\n",
" layer_uuid = uuid.uuid4()\n",
" category_name = required_layers.dict()['name']\n",
" subgroup_names = [subgroup['name'] for subgroup in required_layers.dict()['cognitive_subgroups']]\n",
" for subgroup in subgroup_names:\n",
"\n",
" for layer_decomposition in layer_graphs:\n",
" layer_decomposition_uuid = uuid.uuid4()\n",
" F = append_data_to_graph(G, category_name[0], subgroup, layer_decomposition, layer_uuid, layer_decomposition_uuid)\n",
" \n",
" # Print updated graph for verification\n",
" print(\"Updated Nodes:\", F)\n",
" return F\n"
]
},
{
"cell_type": "code",
"execution_count": 283,
"id": "89ae9422-e26e-4180-be99-e21bae5229e5",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Natural Language Text:News stories and blog posts\n",
"Updated Nodes: MultiDiGraph with 64 nodes and 101 edges\n",
"Natural Language Text:News stories and blog posts\n",
"Updated Nodes: MultiDiGraph with 75 nodes and 121 edges\n",
"Natural Language Text:News stories and blog posts\n",
"Updated Nodes: MultiDiGraph with 88 nodes and 145 edges\n"
]
}
],
"source": [
"\n",
"U = append_to_graph(layer_1_graph, required_layers_one, G)"
]
},
{
"cell_type": "code",
"execution_count": 284,
"id": "b15feb48-6c19-4b18-81d8-d28651ea63f4",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Natural Language Text:News stories and blog posts\n",
"Updated Nodes: MultiDiGraph with 98 nodes and 166 edges\n",
"Natural Language Text:News stories and blog posts\n",
"Updated Nodes: MultiDiGraph with 105 nodes and 179 edges\n",
"Natural Language Text:News stories and blog posts\n",
"Updated Nodes: MultiDiGraph with 113 nodes and 197 edges\n",
"Natural Language Text:Personal narratives and stories\n",
"Updated Nodes: MultiDiGraph with 123 nodes and 218 edges\n",
"Natural Language Text:Personal narratives and stories\n",
"Updated Nodes: MultiDiGraph with 130 nodes and 231 edges\n",
"Natural Language Text:Personal narratives and stories\n",
"Updated Nodes: MultiDiGraph with 138 nodes and 249 edges\n"
]
}
],
"source": [
"R = append_to_graph(layer_2_graph, required_layers_two, U)"
]
},
{
"cell_type": "code",
"execution_count": 285,
"id": "17199837-35b8-4530-bf03-efbc3486b71d",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <iframe id=\"6a464f8d-7a64-4e3a-a9e5-afe908e36a97\" src=\"https://hub.graphistry.com/graph/graph.html?dataset=001d149953cd44158c082667f0d6662c&type=arrow&viztoken=915d30f8-5f8d-4995-b025-5a5f5bbe5b35&usertag=1daaf574-pygraphistry-0.33.0&splashAfter=1709112650&info=true\"\n",
" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\"\n",
" oallowfullscreen=\"true\" msallowfullscreen=\"true\"\n",
" style=\"width:100%; height:500px; border: 1px solid #DDD; overflow: hidden\"\n",
" \n",
" >\n",
" </iframe>\n",
" \n",
" <script>\n",
" try {\n",
" $(\"#6a464f8d-7a64-4e3a-a9e5-afe908e36a97\").bind('mousewheel', function(e) { e.preventDefault(); });\n",
" } catch (e) { console.error('exn catching scroll', e); }\n",
" </script>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 285,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import graphistry\n",
"import pandas as pd\n",
"\n",
"# Assuming Graphistry is already configured with API key\n",
"# graphistry.register(api=3, username='your_username', password='your_password')\n",
"\n",
"# Convert NetworkX graph to a Pandas DataFrame\n",
"edges = nx.to_pandas_edgelist(R)\n",
"graphistry.register(api=3, username='Vasilije1990', password='Q@HLdgv5SMUsGxy') \n",
"\n",
"# Visualize the graph\n",
"graphistry.edges(edges, 'source', 'target').plot()"
]
},
{
"cell_type": "code",
"execution_count": 315,
"id": "187f4220-45b1-43cc-9ab3-1e51264544c5",
"metadata": {},
"outputs": [],
"source": [
"# print(R.nodes(data=True))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f17dc174-f325-44b9-8fc7-761146aca2d0",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "e4eee8a7-5d3b-4848-9cdb-2b397e158519",
"metadata": {},
"outputs": [],
"source": [
"## Utility to check if relationships are as they should be"
]
},
{
"cell_type": "code",
"execution_count": 212,
"id": "3adc8483-3207-44f1-abf5-275e925e04d4",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Graph Relationships with Node Attributes:\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, username: exampleUser, email: user@example.com] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category]: Relationship [created]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, username: exampleUser, email: user@example.com] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category]: Relationship [created]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, username: exampleUser, email: user@example.com] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category]: Relationship [created]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, username: exampleUser, email: user@example.com] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category]: Relationship [created]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, username: exampleUser, email: user@example.com] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category]: Relationship [created]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: subclass, content: Historical events]: Relationship [includes]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: subclass, content: Schedules and timelines]: Relationship [includes]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: subclass, content: Geographical locations]: Relationship [includes]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: subclass, content: Spatial data]: Relationship [includes]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: subclass, content: Hypotheses and theories]: Relationship [includes]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: subclass, content: Claims and arguments]: Relationship [includes]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: subclass, content: User preferences]: Relationship [includes]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: subclass, content: User information]: Relationship [includes]\n",
"Source [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: category] -> Target [created_at: 2024-02-28 07:42:21, updated_at: 2024-02-28 07:42:21, type: subclass, content: News stories and blog posts]: Relationship [includes]\n"
]
}
],
"source": [
"def list_graph_relationships_with_node_attributes(graph):\n",
" print(\"Graph Relationships with Node Attributes:\")\n",
" for source, target, data in graph.edges(data=True):\n",
" # Get source and target node attributes\n",
" source_attrs = graph.nodes[source]\n",
" target_attrs = graph.nodes[target]\n",
" relationship = data.get('relationship', 'No relationship specified')\n",
"\n",
" # Format and print source and target node attributes along with the relationship\n",
" source_attrs_formatted = ', '.join([f\"{k}: {v}\" for k, v in source_attrs.items()])\n",
" target_attrs_formatted = ', '.join([f\"{k}: {v}\" for k, v in target_attrs.items()])\n",
" \n",
" print(f\"Source [{source_attrs_formatted}] -> Target [{target_attrs_formatted}]: Relationship [{relationship}]\")\n",
"\n",
"# Assuming 'F' is your graph instance\n",
"list_graph_relationships_with_node_attributes(G)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "734a1d1d-a583-4d3f-a1e2-a33f339bfaf0",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "1ace3c0f-93f3-47aa-81d6-0e3297971b5a",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 2,
"id": "de96473f-620c-4d14-8e43-380507d06988",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting qdrant-client\n",
" Using cached qdrant_client-1.7.3-py3-none-any.whl.metadata (9.3 kB)\n",
"Collecting grpcio>=1.41.0 (from qdrant-client)\n",
" Downloading grpcio-1.62.0-cp311-cp311-macosx_10_10_universal2.whl.metadata (4.0 kB)\n",
"Collecting grpcio-tools>=1.41.0 (from qdrant-client)\n",
" Downloading grpcio_tools-1.62.0-cp311-cp311-macosx_10_10_universal2.whl.metadata (6.2 kB)\n",
"Requirement already satisfied: httpx>=0.14.0 in ./.venv/lib/python3.11/site-packages (from httpx[http2]>=0.14.0->qdrant-client) (0.27.0)\n",
"Requirement already satisfied: numpy>=1.21 in ./.venv/lib/python3.11/site-packages (from qdrant-client) (1.26.4)\n",
"Collecting portalocker<3.0.0,>=2.7.0 (from qdrant-client)\n",
" Using cached portalocker-2.8.2-py3-none-any.whl.metadata (8.5 kB)\n",
"Requirement already satisfied: pydantic>=1.10.8 in ./.venv/lib/python3.11/site-packages (from qdrant-client) (2.6.2)\n",
"Requirement already satisfied: urllib3<3,>=1.26.14 in ./.venv/lib/python3.11/site-packages (from qdrant-client) (2.0.7)\n",
"Collecting protobuf<5.0dev,>=4.21.6 (from grpcio-tools>=1.41.0->qdrant-client)\n",
" Downloading protobuf-4.25.3-cp37-abi3-macosx_10_9_universal2.whl.metadata (541 bytes)\n",
"Requirement already satisfied: setuptools in ./.venv/lib/python3.11/site-packages (from grpcio-tools>=1.41.0->qdrant-client) (69.1.1)\n",
"Requirement already satisfied: anyio in ./.venv/lib/python3.11/site-packages (from httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant-client) (3.7.1)\n",
"Requirement already satisfied: certifi in ./.venv/lib/python3.11/site-packages (from httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant-client) (2024.2.2)\n",
"Requirement already satisfied: httpcore==1.* in ./.venv/lib/python3.11/site-packages (from httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant-client) (1.0.4)\n",
"Requirement already satisfied: idna in ./.venv/lib/python3.11/site-packages (from httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant-client) (3.6)\n",
"Requirement already satisfied: sniffio in ./.venv/lib/python3.11/site-packages (from httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant-client) (1.3.1)\n",
"Requirement already satisfied: h11<0.15,>=0.13 in ./.venv/lib/python3.11/site-packages (from httpcore==1.*->httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant-client) (0.14.0)\n",
"Collecting h2<5,>=3 (from httpx[http2]>=0.14.0->qdrant-client)\n",
" Using cached h2-4.1.0-py3-none-any.whl.metadata (3.6 kB)\n",
"Requirement already satisfied: annotated-types>=0.4.0 in ./.venv/lib/python3.11/site-packages (from pydantic>=1.10.8->qdrant-client) (0.6.0)\n",
"Requirement already satisfied: pydantic-core==2.16.3 in ./.venv/lib/python3.11/site-packages (from pydantic>=1.10.8->qdrant-client) (2.16.3)\n",
"Requirement already satisfied: typing-extensions>=4.6.1 in ./.venv/lib/python3.11/site-packages (from pydantic>=1.10.8->qdrant-client) (4.10.0)\n",
"Collecting hyperframe<7,>=6.0 (from h2<5,>=3->httpx[http2]>=0.14.0->qdrant-client)\n",
" Using cached hyperframe-6.0.1-py3-none-any.whl.metadata (2.7 kB)\n",
"Collecting hpack<5,>=4.0 (from h2<5,>=3->httpx[http2]>=0.14.0->qdrant-client)\n",
" Using cached hpack-4.0.0-py3-none-any.whl (32 kB)\n",
"Using cached qdrant_client-1.7.3-py3-none-any.whl (206 kB)\n",
"Downloading grpcio-1.62.0-cp311-cp311-macosx_10_10_universal2.whl (10.0 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m10.0/10.0 MB\u001b[0m \u001b[31m19.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m0:01\u001b[0m\n",
"\u001b[?25hDownloading grpcio_tools-1.62.0-cp311-cp311-macosx_10_10_universal2.whl (5.1 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.1/5.1 MB\u001b[0m \u001b[31m21.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
"\u001b[?25hUsing cached portalocker-2.8.2-py3-none-any.whl (17 kB)\n",
"Using cached h2-4.1.0-py3-none-any.whl (57 kB)\n",
"Downloading protobuf-4.25.3-cp37-abi3-macosx_10_9_universal2.whl (394 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m394.2/394.2 kB\u001b[0m \u001b[31m13.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hUsing cached hyperframe-6.0.1-py3-none-any.whl (12 kB)\n",
"Installing collected packages: protobuf, portalocker, hyperframe, hpack, grpcio, h2, grpcio-tools, qdrant-client\n",
"Successfully installed grpcio-1.62.0 grpcio-tools-1.62.0 h2-4.1.0 hpack-4.0.0 hyperframe-6.0.1 portalocker-2.8.2 protobuf-4.25.3 qdrant-client-1.7.3\n",
"\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n"
]
}
],
"source": [
"!pip install qdrant-client"
]
},
{
"cell_type": "code",
"execution_count": 294,
"id": "c5e2c97c-9b80-4e4b-a80c-940e5428419e",
"metadata": {},
"outputs": [],
"source": [
"# def extract_node_descriptions(data):\n",
"# descriptions = []\n",
"# for node_id, attributes in data:\n",
"# # Check if both 'description' and 'layer_id' are in the attributes\n",
"# if 'description' in attributes and 'layer_id' in attributes and 'layer_uuid' in attributes:\n",
"# descriptions.append({\n",
"# 'node_id': node_id, \n",
"# 'description': attributes['description'],\n",
"# 'layer_uuid': attributes['layer_uuid'] # Include layer_id\n",
"# })\n",
"# return descriptions\n",
"\n",
"# # Extract the node descriptions\n",
"# node_descriptions = extract_node_descriptions(R.nodes(data=True))\n",
"\n",
"# # Display the results (displaying a subset for brevity)\n",
"# for item in node_descriptions[:5]: # Adjust the slice as needed for display\n",
"# print(item)"
]
},
{
"cell_type": "code",
"execution_count": 303,
"id": "a0a7fac1-0e8b-41de-b33f-435496ec1865",
"metadata": {},
"outputs": [],
"source": [
"# descriptions = []\n",
"# for node_id, attributes in R.nodes(data=True):\n",
"# if 'description' in attributes:\n",
"# descriptions.append({'node_id': node_id, 'description': attributes['description'], 'layer_uuid': attributes['layer_uuid'], 'layer_decomposition_uuid': attributes['layer_decomposition_uuid']})\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fee432d0-75de-43b2-9a3b-3b8844a2cf19",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 306,
"id": "c214724e-4bb3-4b75-b104-77ac98348394",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'node_id': 'In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs - 08b965ee-470a-4133-979b-0003edef15d0 - 97597864-a11a-4058-b854-8f21864c7e06 - 58fc3b86-be82-4d50-9578-2b157924ef23', 'description': 'In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs', 'layer_uuid': '08b965ee-470a-4133-979b-0003edef15d0', 'layer_decomposition_uuid': '97597864-a11a-4058-b854-8f21864c7e06'}\n",
"{'node_id': 'Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability - 08b965ee-470a-4133-979b-0003edef15d0 - 97597864-a11a-4058-b854-8f21864c7e06 - e7929623-23e0-4b43-80b6-52fdbf4ce154', 'description': 'Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability', 'layer_uuid': '08b965ee-470a-4133-979b-0003edef15d0', 'layer_decomposition_uuid': '97597864-a11a-4058-b854-8f21864c7e06'}\n",
"{'node_id': \"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments - 08b965ee-470a-4133-979b-0003edef15d0 - 97597864-a11a-4058-b854-8f21864c7e06 - 48191bec-b329-460e-8de3-7957ffa9909c\", 'description': \"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\", 'layer_uuid': '08b965ee-470a-4133-979b-0003edef15d0', 'layer_decomposition_uuid': '97597864-a11a-4058-b854-8f21864c7e06'}\n",
"{'node_id': 'Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains - 08b965ee-470a-4133-979b-0003edef15d0 - 97597864-a11a-4058-b854-8f21864c7e06 - 0915d7f3-9a6d-4461-af9d-d222079dd52d', 'description': 'Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains', 'layer_uuid': '08b965ee-470a-4133-979b-0003edef15d0', 'layer_decomposition_uuid': '97597864-a11a-4058-b854-8f21864c7e06'}\n",
"{'node_id': 'The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022 - 08b965ee-470a-4133-979b-0003edef15d0 - 97597864-a11a-4058-b854-8f21864c7e06 - 41a19992-d932-47c3-b1dc-41c4e673ab43', 'description': 'The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022', 'layer_uuid': '08b965ee-470a-4133-979b-0003edef15d0', 'layer_decomposition_uuid': '97597864-a11a-4058-b854-8f21864c7e06'}\n"
]
}
],
"source": [
"def extract_node_descriptions(data):\n",
" descriptions = []\n",
" for node_id, attributes in data:\n",
" if 'description' in attributes:\n",
" descriptions.append({'node_id': node_id, 'description': attributes['description'], 'layer_uuid': attributes['layer_uuid'], 'layer_decomposition_uuid': attributes['layer_decomposition_uuid']})\n",
" return descriptions\n",
"\n",
"# Extract the node descriptions\n",
"node_descriptions = extract_node_descriptions(R.nodes(data=True))\n",
"\n",
"# Display the results (displaying a subset for brevity)\n",
"for item in node_descriptions[:5]: # Adjust the slice as needed for display\n",
" print(item)"
]
},
{
"cell_type": "markdown",
"id": "74b65ea2-b325-4bed-8286-0f2030462794",
"metadata": {},
"source": [
"## HOW TO CONNECT INTERLAYERS WITH SEMANTIC SEARCH"
]
},
{
"cell_type": "code",
"execution_count": 295,
"id": "7adbc416-bca9-47e2-9bfc-7ab5de5aeabf",
"metadata": {},
"outputs": [],
"source": [
"## Idea here is to pass descriptions to the vectorstore and embed them, then do a semantic search for each description to other one and retrieve only those between layers that have a connection\n",
"## We load each layer as a qdrant collection and then search the terms in other collection to establish links between layers, after that is done, we save the relevant IDs and create connections in the graph"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "65178488-6424-4f40-8420-edf921ff1678",
"metadata": {},
"outputs": [],
"source": [
"from openai import OpenAI\n",
"client = OpenAI()"
]
},
{
"cell_type": "code",
"execution_count": 36,
"id": "19ba87f3-a9d9-43d6-8a8d-b2491ace5330",
"metadata": {},
"outputs": [],
"source": [
"def get_embedding(text):\n",
" response = client.embeddings.create(\n",
" input=[text],\n",
" model=\"text-embedding-3-large\" # Choose an appropriate engine for your use case\n",
" ).data[0].embedding\n",
"\n",
" return response"
]
},
{
"cell_type": "code",
"execution_count": 37,
"id": "0c4670d9-c7e3-476e-be90-7cb52efd6f3b",
"metadata": {},
"outputs": [],
"source": [
"# embedding = get_embedding(\"Example text to encode\")"
]
},
{
"cell_type": "code",
"execution_count": 51,
"id": "d9ce8103-375d-4e77-8d64-46edc753b375",
"metadata": {},
"outputs": [],
"source": [
"# some_embeddings = []\n",
"# some_text = [\"bla\", \"blwea\"]\n",
"# for st in some_text:\n",
"# some_embeddings.append(get_embedding(st))"
]
},
{
"cell_type": "code",
"execution_count": 40,
"id": "91763457-bf41-4e60-ad8f-0bd5542b250a",
"metadata": {},
"outputs": [],
"source": [
"from qdrant_client import models, QdrantClient"
]
},
{
"cell_type": "code",
"execution_count": 41,
"id": "c35342d7-a3ce-491b-971d-142b52110bca",
"metadata": {},
"outputs": [],
"source": [
"qdrant = QdrantClient(\":memory:\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e8ccd86e-01d0-44ac-9376-c848bed1adad",
"metadata": {},
"outputs": [],
"source": [
"from qdrant_client.http import models as rest"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "92c76fe6-bdbb-40d6-b136-3b83b1d85b32",
"metadata": {},
"outputs": [],
"source": [
"\n",
"unique_layer_uuids = set(node['layer_decomposition_uuid'] for node in node_descriptions)\n",
"# Create a new collection in Qdrant\n",
"def create_collection(collection_name):\n",
" qdrant.recreate_collection(\n",
" collection_name=collection_name,\n",
" vectors_config={\n",
" 'content': rest.VectorParams(\n",
" distance=rest.Distance.COSINE,\n",
" size=3072,\n",
" )\n",
" }\n",
" )\n",
"for layer in unique_layer_uuids:\n",
" create_collection(layer)"
]
},
{
"cell_type": "code",
"execution_count": 311,
"id": "3c53de05-65d2-4232-bb23-f1b50fbd36c8",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'node_id': 'In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs - 08b965ee-470a-4133-979b-0003edef15d0 - 97597864-a11a-4058-b854-8f21864c7e06 - 58fc3b86-be82-4d50-9578-2b157924ef23', 'description': 'In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs', 'layer_uuid': '08b965ee-470a-4133-979b-0003edef15d0', 'layer_decomposition_uuid': '97597864-a11a-4058-b854-8f21864c7e06'}\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"{'node_id': 'Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability - 08b965ee-470a-4133-979b-0003edef15d0 - 97597864-a11a-4058-b854-8f21864c7e06 - e7929623-23e0-4b43-80b6-52fdbf4ce154', 'description': 'Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability', 'layer_uuid': '08b965ee-470a-4133-979b-0003edef15d0', 'layer_decomposition_uuid': '97597864-a11a-4058-b854-8f21864c7e06'}\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"{'node_id': \"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments - 08b965ee-470a-4133-979b-0003edef15d0 - 97597864-a11a-4058-b854-8f21864c7e06 - 48191bec-b329-460e-8de3-7957ffa9909c\", 'description': \"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\", 'layer_uuid': '08b965ee-470a-4133-979b-0003edef15d0', 'layer_decomposition_uuid': '97597864-a11a-4058-b854-8f21864c7e06'}\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"{'node_id': 'Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains - 08b965ee-470a-4133-979b-0003edef15d0 - 97597864-a11a-4058-b854-8f21864c7e06 - 0915d7f3-9a6d-4461-af9d-d222079dd52d', 'description': 'Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains', 'layer_uuid': '08b965ee-470a-4133-979b-0003edef15d0', 'layer_decomposition_uuid': '97597864-a11a-4058-b854-8f21864c7e06'}\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"{'node_id': 'The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022 - 08b965ee-470a-4133-979b-0003edef15d0 - 97597864-a11a-4058-b854-8f21864c7e06 - 41a19992-d932-47c3-b1dc-41c4e673ab43', 'description': 'The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022', 'layer_uuid': '08b965ee-470a-4133-979b-0003edef15d0', 'layer_decomposition_uuid': '97597864-a11a-4058-b854-8f21864c7e06'}\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n"
]
}
],
"source": [
"for item in node_descriptions[:5]: # Adjust the slice as needed for display\n",
" print(item)\n",
" print(item['description'])"
]
},
{
"cell_type": "code",
"execution_count": 56,
"id": "313a893d-31b5-4599-8f6f-2a2cd0759fa0",
"metadata": {},
"outputs": [],
"source": [
"# collection_name = 'Articles'\n",
"\n",
"# # Create a new collection in Qdrant\n",
"# def create_collection(collection_name):\n",
"# qdrant.recreate_collection(\n",
"# collection_name=collection_name,\n",
"# vectors_config={\n",
"# 'content': rest.VectorParams(\n",
"# distance=rest.Distance.COSINE,\n",
"# size=3072,\n",
"# )\n",
"# }\n",
"# )\n",
"\n",
"# Function to upload embeddings to Qdrant\n",
"# def upload_embedding(id, metadata, some_embeddings, collection_name):\n",
"# qdrant.upload_points(\n",
"# collection_name=collection_name,\n",
"# points=[\n",
"# models.PointStruct(\n",
"# id=idx, vector={\"content\":doc}, payload=metadata\n",
"# )\n",
"# for idx, doc in enumerate(some_embeddings)\n",
"# ],\n",
"# )\n",
"\n",
"# # Example usage\n",
"# upload_embedding(1, (\"meta\":1}, some_embeddings, collection_name)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1aed2283-f889-42d2-bbc2-05341a145583",
"metadata": {},
"outputs": [],
"source": [
"def upload_embedding(id, metadata, some_embeddings, collection_name):\n",
" qdrant.upload_points(\n",
" collection_name=collection_name,\n",
" points=\n",
" models.PointStruct(\n",
" id=id, vector={\"content\":some_embeddings}, payload=metadata\n",
" )\n",
" \n",
" ,\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "302dc698-2c14-4408-81d7-76282524dba3",
"metadata": {},
"outputs": [],
"source": [
"for item in node_descriptions[:5]: \n",
" upload_embedding(id = item['node_id'], metadata = {\"meta\":item['description']}, some_embeddings = get_embedding(item['description']), collection_name= item['layer_decomposition_uuid'])"
]
},
{
"cell_type": "code",
"execution_count": 312,
"id": "e48f1104-829d-4150-82f6-e42cc53c8e8c",
"metadata": {},
"outputs": [],
"source": [
"grouped_data = {}\n",
"\n",
"# Iterate through each dictionary in the list\n",
"for item in node_descriptions:\n",
" # Get the layer_decomposition_uuid of the current dictionary\n",
" uuid = item['layer_decomposition_uuid']\n",
" \n",
" # Check if this uuid is already a key in the grouped_data dictionary\n",
" if uuid not in grouped_data:\n",
" # If not, initialize a new list for this uuid\n",
" grouped_data[uuid] = []\n",
" \n",
" # Append the current dictionary to the list corresponding to its uuid\n",
" grouped_data[uuid].append(item)"
]
},
{
"cell_type": "code",
"execution_count": 324,
"id": "a507c77e-9190-4a71-8321-ccc081121534",
"metadata": {},
"outputs": [],
"source": [
"# grouped_data"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "95cfd736-f2c1-40d3-920c-ebc14c230f21",
"metadata": {},
"outputs": [],
"source": [
"def qdrant_search (collection_name, embedding):\n",
" hits = qdrant.search(\n",
" collection_name=\"Articles\",\n",
" query_vector=(\n",
" \"content\", get_embedding(embedding)\n",
" ),\n",
" limit=3,\n",
")\n",
" return hits\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 61,
"id": "5210715c-66ae-430a-a5d5-469fa2ca860c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'bv': 'bjdjdj'} score: 0.9999999947315471\n",
"{'bv': 'bjdjdj'} score: 0.497255529710952\n"
]
}
],
"source": [
"# hits = qdrant.search(\n",
"# collection_name=\"Articles\",\n",
"# query_vector=(\n",
"# \"content\", get_embedding(\"bla\")\n",
"# ),\n",
"# limit=3,\n",
"# )\n",
"# for hit in hits:\n",
"# print(hit.payload, \"score:\", hit.score)"
]
},
{
"cell_type": "code",
"execution_count": 316,
"id": "91fcac9b-04ec-4238-800d-f291c8e7c13b",
"metadata": {},
"outputs": [],
"source": [
"unique_layer_uuids = set(node['layer_decomposition_uuid'] for node in node_descriptions)\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 323,
"id": "a23a7517-64f2-4d9f-8cc0-f6dfdd0fe3c1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s 97597864-a11a-4058-b854-8f21864c7e06\n",
"In British culture, keeping pets is an integral way of life and an outlet for emotions, with a particular fondness for dogs\n",
"Dogs serve as an acceptable outlet for typically controlled British emotions, facilitating affection and sociability\n",
"Public spaces in the UK are accommodating of dogs, with signs such as 'Dogs welcome, people tolerated' and treats offered in establishments\n",
"Dogs act as social catalysts, making it more acceptable to converse with strangers in parks rather than more formal settings like trains\n",
"The COVID-19 pandemic caused a surge in pet ownership in the UK, with the dog population rising from 9 million to 13 million between 2019 and 2022\n",
"England and Wales saw a significant increase in dog attacks between 2018 and 2022, aligning with a rise in the number of dogs and changes in ownership dynamics\n",
"There is a concerning trend of treating living beings, particularly popular 'designer' dog breeds, as commodities rather than sentient beings\n",
"The cultural shift in Britain towards treating pets as substitutes for children, favoring aesthetics over the animal's natural function and well-being\n",
"Consumerism in pet care is escalating in the UK with a significant increase in unnecessary spending on pets, including trends and luxury items\n",
"Pets are often indulged with unnecessary treats and services that do not align with their genuine needs or desires, indicative of human emotional solace through consumption\n",
"Modern lifestyles with busy schedules are causing dogs to live monotonous lives, leading to behavioral problems that are often placated by trivial indulgences\n",
"Proper pet care advocates for prioritizing pets' quality of life and well-being over anthropomorphic indulgences and misguided expressions of affection\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s 92ae1b09-3dfb-4e0b-920d-83341d1d8c7b\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s b40f5ed5-45cf-43f5-902c-d4928743f8fd\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s f3b1dd35-0640-40a0-a664-fb037aeb43c7\n",
"Kate Fox, an anthropologist who described Britons' affection towards pets as a way of life in her book 'Watching the English'\n",
"Dogs serve as an outlet for emotions and social engagement for Britons\n",
"In the UK, dogs are accepted and encouraged in various public spaces like transport, pubs, and shops\n",
"Despite societal changes, the passion for animals in the UK has been consistent\n",
"The COVID-19 pandemic led to a surge in pet ownership, increasing the number of dogs in the UK\n",
"'A dog is for life, not just for Christmas' is a slogan by Dogs Trust charity to advocate responsible pet ownership\n",
"The number of dog attacks in England and Wales saw a significant rise\n",
"Certain dog breeds are increasingly perceived as commodities, particularly 'designer' breeds\n",
"Consumer spending on pets in the UK has increased, extending to non-essential items and services\n",
"Many dogs experience lack of socialization and extended periods of isolation due to modern human schedules\n",
"Ensuring the well-being of pets should be a priority, demanding sacrifices and quality care from the owners\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s e81660f7-b9a2-4266-a468-404a49b05888\n",
"Britons have a significant and emotional connection with animals, particularly dogs.\n",
"Kate Fox, an anthropologist who wrote about the English way of life with pets.\n",
"Number of pet dogs in the UK increased from about nine million to 13 million between 2019 and 2022.\n",
"In the UK, dogs are often encouraged to accompany their owners in public places such as pubs and shops.\n",
"The number of dog attacks recorded by police in England and Wales rose by more than a third between 2018 and 2022.\n",
"Pets, particularly dogs, are increasingly being treated as commodities rather than sentient beings.\n",
"Popularity of designer breeds like French bulldogs and pugs, which often suffer due to their physical features.\n",
"Controversial American XL bully dogs are sought after as a signifier of masculinity.\n",
"Pets are increasingly being treated as substitutes for children, altering the traditional British perspective of valuing dogs for their natural qualities.\n",
"Spending on pets in the UK has more than doubled in the past decade, reaching nearly £10bn in the previous year.\n",
"Rise in dog-friendly establishments like restaurants, theaters, and even churches, catering to dog owners more than the dogs themselves.\n",
"Many dogs suffer from daily deprivation and lack engagement due to their owner's busy schedules.\n",
"Behavioral issues in dogs often stem from insufficient exercise, supervision, and consistent routines.\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s 48c1a502-48b1-4240-87ac-6558d41e1b6f\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s 4ef6847a-7036-4861-8df6-a209c53038ca\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s 7b147696-3654-4e4c-b177-da5a1b44a2c0\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s 27a76d52-5b5e-4e8e-8726-29be55c8b2f1\n",
"Lee Parkin, 50, owner of the late terrier-spaniel cross Izzy, suffers from PTSD\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin, killed by an XL bully\n",
"An XL bully attacked and killed Izzy during a walk with Lee Parkin in Doncaster\n",
"Doncaster, the location where Izzy was attacked and killed by an XL bully\n",
"Naevia, Marie Hay's Siberian husky, survived an attack by two XL bullies with life-changing injuries\n",
"Marie Hay, owner of Naevia, who survived an XL bully attack with mental and physical scars\n",
"Two XL bullies attacked Naevia on a beach in Redcar, causing severe injuries\n",
"Redcar Beach on the North Yorkshire coast, where Naevia was attacked by two XL bullies\n",
"XL bully, a breed involved in attacks on Izzy and Naevia, seen as dangerously out of control\n",
"An incoming ban on XL bullies supported by Lee Parkin and Marie Hay but with reservations on its effectiveness\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s c306c248-bbab-44a9-9ae2-448f992e415c\n",
"Lee Parkin - 50-year-old dog owner, suffers from post-traumatic stress disorder after his dog was killed.\n",
"Izzy - Terrier-spaniel cross, pet dog owned by Lee Parkin for nearly 10 years, killed in dog attack.\n",
"Doncaster - The location near where Lee Parkin was walking his dog Izzy when she was attacked.\n",
"XL Bully - Breed of dog that attacked and killed Izzy, described as dangerously out of control.\n",
"Marie Hay - Dog owner whose Siberian Husky, Naevia, survived an attack but suffered life-changing injuries.\n",
"Naevia - Siberian Husky owned by Marie Hay, survived a savage attack by two XL Bullies.\n",
"Redcar Beach on the North Yorkshire coast - The location where Naevia was attacked by two XL Bullies.\n",
"this id is orig %s 771e3cc9-fb2f-422e-a8f8-e067d6b44e34\n",
"this uuid is relevant for search %s dbcbc6c6-db82-48f3-8fa9-e3d372ff3483\n",
"Lee Parkin, a 50-year-old man and owner of the dog Izzy.\n",
"Izzy, a terrier-spaniel cross owned by Lee Parkin for nearly 10 years.\n",
"Attack by an XL bully on Izzy resulting in her death.\n",
"Lee Parkin was diagnosed with post-traumatic stress disorder after the attack.\n",
"Marie Hay, owner of seven-year-old Siberian husky Naevia, also victim of an XL bully attack.\n",
"Naevia, a seven-year-old Siberian husky owned by Marie Hay, survived an attack by two XL bullies with life-changing injuries.\n",
"The incoming ban on XL bullies that both Lee Parkin and Marie Hay support.\n",
"Anxiety and fear faced by Lee Parkin and Marie Hay when walking dogs post-attack.\n"
]
}
],
"source": [
"relationship_dict={}\n",
"for id in unique_layer_uuids:\n",
" if id not in relationship_dict:\n",
" relationship_dict[id] = []\n",
"\n",
" for uuid, items in grouped_data.items():\n",
" if uuid != id:\n",
" print(\"this id is orig %s\", id)\n",
" print(\"this uuid is relevant for search %s\", uuid)\n",
" for item in items:\n",
" result = qdrant_search(uuid, item['description'])\n",
"\n",
" for result in results:\n",
" if result.score > 0.9: # Only consider hits with a score greater than 0.9\n",
" # Append result information to the relationship_dict under the current id\n",
" relationship_dict[id].append({\n",
" 'collection_name_uuid': uuid, # The uuid used for the search\n",
" 'searched_node_id': item['node_id'], # The node_id of the hit\n",
" 'score': result.score,\n",
" 'score_metadata': result.payload\n",
" 'score_id': result.id\n",
" })\n",
" \n",
" \n",
" print(item['description'])\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 317,
"id": "97302500-241e-41b3-9355-4523bcb4d01b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'27a76d52-5b5e-4e8e-8726-29be55c8b2f1',\n",
" '48c1a502-48b1-4240-87ac-6558d41e1b6f',\n",
" '4ef6847a-7036-4861-8df6-a209c53038ca',\n",
" '771e3cc9-fb2f-422e-a8f8-e067d6b44e34',\n",
" '7b147696-3654-4e4c-b177-da5a1b44a2c0',\n",
" '92ae1b09-3dfb-4e0b-920d-83341d1d8c7b',\n",
" '97597864-a11a-4058-b854-8f21864c7e06',\n",
" 'b40f5ed5-45cf-43f5-902c-d4928743f8fd',\n",
" 'c306c248-bbab-44a9-9ae2-448f992e415c',\n",
" 'dbcbc6c6-db82-48f3-8fa9-e3d372ff3483',\n",
" 'e81660f7-b9a2-4266-a468-404a49b05888',\n",
" 'f3b1dd35-0640-40a0-a664-fb037aeb43c7'}"
]
},
"execution_count": 317,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def connect_nodes_in_graph(graph, relationship_dict):\n",
" \"\"\"\n",
" For each relationship in relationship_dict, check if both nodes exist in the graph.\n",
" If they do, create a connection (edge) between them.\n",
"\n",
" :param graph: A NetworkX graph object\n",
" :param relationship_dict: A dictionary containing relationships between nodes\n",
" \"\"\"\n",
" for id, relationships in relationship_dict.items():\n",
" for relationship in relationships:\n",
" searched_node_id = relationship['searched_node_id']\n",
" score_id = relationship['score_id']\n",
" score = relationship['score']\n",
"\n",
" # Check if both nodes exist in the graph\n",
" if graph.has_node(searched_node_id) and graph.has_node(score_id):\n",
" # If both nodes exist, create an edge between them\n",
" # You can customize the edge attributes as needed, here we use 'score' as an attribute\n",
" graph.add_edge(searched_node_id, score_id, weight=score, score_metadata=relationship.get('score_metadata'))\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "50b67330-db2f-45ab-86a9-7170564c56de",
"metadata": {},
"outputs": [],
"source": [
"## SEARCH \n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "36354c1f-17c3-419a-9c71-4618d2bde8ed",
"metadata": {},
"outputs": [],
"source": [
"search_term = 'what kind of dog is the most dangerous one?'\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8cfe6574-e079-495b-b820-1b361d62c25d",
"metadata": {},
"outputs": [],
"source": [
"def classify_input(input) -> CognitiveCategory:\n",
" \"\"\"Classify input\"\"\"\n",
" model = \"gpt-4-1106-preview\"\n",
" user_prompt = f\"Use the given format to extract information from the following input: {input}.\"\n",
"\n",
"\n",
" out = aclient.chat.completions.create(\n",
" model=model,\n",
" messages=[\n",
" {\n",
" \"role\": \"user\",\n",
" \"content\": user_prompt,\n",
" },\n",
" {\n",
" \"role\": \"system\",\n",
" \"content\": system_prompt,\n",
" },\n",
" \n",
" {\n",
" \"role\": \"system\",\n",
" \"content\": \"Make sure both values are returned. Incomplete results will result in termination\",\n",
" },\n",
" ],\n",
" response_model=CognitiveCategory,\n",
" )\n",
" return out"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "17d27c7b-5a6d-4ef4-b785-76f5c239afc1",
"metadata": {},
"outputs": [],
"source": [
"relevant_categories = c"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "eebe4f53-c6ba-466a-8ba2-adee16fb6e21",
"metadata": {},
"outputs": [],
"source": [
"def get_nodes_with_high_weight_edges(graph, weight_threshold=0.9):\n",
" \"\"\"\n",
" Fetch nodes in the graph that are connected by edges with a weight higher than the specified threshold.\n",
"\n",
" :param graph: A NetworkX graph object.\n",
" :param weight_threshold: The minimum weight threshold for edges to consider (default is 0.9).\n",
" :return: A set of nodes that are connected by edges with weight greater than the specified threshold.\n",
" \"\"\"\n",
" nodes_set = set()\n",
"\n",
" # Iterate over all edges in the graph\n",
" for u, v, data in graph.edges(data=True):\n",
" # Check if the edge weight is greater than the threshold\n",
" if data.get('weight', 0) > weight_threshold:\n",
" # If so, add both nodes connected by this edge to the set\n",
" nodes_set.add(u)\n",
" nodes_set.add(v)\n",
"\n",
" return nodes_set"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cca2637a-eace-4763-ada4-0ce925afd7ce",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 213,
"id": "418ef758-64e1-4c44-a844-9e3960d9db50",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Nodes in the graph: ['user123', 'Temporal', 'Temporal:Historical events', 'Temporal:Schedules and timelines', 'Positional', 'Positional:Geographical locations', 'Positional:Spatial data', 'Propositions', 'Propositions:Hypotheses and theories', 'Propositions:Claims and arguments', 'Personalization', 'Personalization:User preferences', 'Personalization:User information', 'Natural Language Text', 'Natural Language Text:News stories and blog posts']\n"
]
}
],
"source": [
"nodes = list(G.nodes())\n",
"\n",
"print(\"Nodes in the graph:\", nodes)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "675e2037-65a8-4f97-974a-1bfc8789ea78",
"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.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}