diff --git "a/nano-graphrag/examples/generate_entity_relationship_dspy.ipynb" "b/nano-graphrag/examples/generate_entity_relationship_dspy.ipynb" new file mode 100644--- /dev/null +++ "b/nano-graphrag/examples/generate_entity_relationship_dspy.ipynb" @@ -0,0 +1,2062 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Generate Examples for Entity Relationship Extraction\n", + "\n", + "- Taking datasets from Huggingface containing news articles and generate entities and relationships out of each news article.\n", + "- Save them as DSPy examples locally to be used for fine-tuning prompt instructions." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import nest_asyncio\n", + "nest_asyncio.apply()" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/homebrew/Caskroom/miniconda/base/envs/nano-graphrag/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", + " from .autonotebook import tqdm as notebook_tqdm\n" + ] + } + ], + "source": [ + "import dspy\n", + "import asyncio\n", + "import os\n", + "import numpy as np\n", + "from dotenv import load_dotenv\n", + "from datasets import load_dataset\n", + "import logging\n", + "import pickle\n", + "\n", + "from nano_graphrag._utils import compute_mdhash_id\n", + "from nano_graphrag.entity_extraction.extract import generate_dataset" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "WORKING_DIR = \"./nano_graphrag_cache_generate_dspy_examples\"\n", + "\n", + "load_dotenv()\n", + "\n", + "logging.basicConfig(level=logging.WARNING)\n", + "logging.getLogger(\"nano-graphrag\").setLevel(logging.DEBUG)\n", + "\n", + "np.random.seed(1337)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "system_prompt = \"\"\"\n", + " You are a world-class AI system, capable of complex reasoning and reflection. \n", + " Reason through the query, and then provide your final response. \n", + " If you detect that you made a mistake in your reasoning at any point, correct yourself.\n", + " Think carefully.\n", + "\"\"\"\n", + "lm = dspy.OpenAI(\n", + " model=\"deepseek-chat\", \n", + " model_type=\"chat\", \n", + " api_key=os.environ[\"DEEPSEEK_API_KEY\"], \n", + " base_url=os.environ[\"DEEPSEEK_BASE_URL\"], \n", + " system_prompt=system_prompt, \n", + " temperature=1.0,\n", + " top_p=1.0,\n", + " max_tokens=4096\n", + ")\n", + "dspy.settings.configure(lm=lm, experimental=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "train_len = 100\n", + "val_len = 100\n", + "dev_len = 200" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "os.makedirs(WORKING_DIR, exist_ok=True)\n", + "entity_relationship_trainset_path = os.path.join(WORKING_DIR, \"entity_relationship_extraction_news_trainset.pkl\")\n", + "entity_relationship_valset_path = os.path.join(WORKING_DIR, \"entity_relationship_extraction_news_valset.pkl\")\n", + "entity_relationship_devset_path = os.path.join(WORKING_DIR, \"entity_relationship_extraction_news_devset.pkl\")" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/homebrew/Caskroom/miniconda/base/envs/nano-graphrag/lib/python3.10/site-packages/datasets/table.py:1421: FutureWarning: promote has been superseded by promote_options='default'.\n", + " table = cls._concat_blocks(blocks, axis=0)\n" + ] + } + ], + "source": [ + "fin_news = load_dataset(\"ashraq/financial-news-articles\")\n", + "cnn_news = load_dataset(\"AyoubChLin/CNN_News_Articles_2011-2022\")\n", + "fin_shuffled_indices = np.random.permutation(len(fin_news['train']))\n", + "cnn_train_shuffled_indices = np.random.permutation(len(cnn_news['train']))\n", + "cnn_test_shuffled_indices = np.random.permutation(len(cnn_news['test']))\n", + "train_data = cnn_news['train'].select(cnn_train_shuffled_indices[:train_len])\n", + "val_data = cnn_news['test'].select(cnn_test_shuffled_indices[:val_len])\n", + "dev_data = fin_news['train'].select(fin_shuffled_indices[:dev_len])" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 100 chunks, 907 entities(duplicated), 667 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:nano-graphrag:Saved 100 examples with keys: ['input_text', 'entities', 'relationships'], filtered 0 examples\n" + ] + } + ], + "source": [ + "train_chunks = {compute_mdhash_id(text, prefix=f\"chunk-trainset-\"): {\"content\": text} for text in train_data[\"text\"]}\n", + "trainset = asyncio.run(generate_dataset(chunks=train_chunks, filepath=entity_relationship_trainset_path))" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Example({'input_text': ' (CNN)Former Russian spy Sergei Skripal and his daughter, Yulia, are continuing to recover from a nerve agent attack, and their rehabilitation has been \"slow and extremely painful,\" the daughter said Wednesday. Sergei, 66, and Yulia Skripal were found March 4 slumped on a bench in Salisbury, England, after being exposed to novichok, a military-grade nerve agent.While Yulia Skripal, 33, spent 20 days in a coma before she was released from the hospital in April and taken to a safe location, her father remained hospitalized until last week. \"We are so lucky to have both survived this attempted assassination,\" she said Wednesday from an undisclosed location, her first public appearance since the attack. \"I don\\'t want to describe the details, but the clinical treatment was invasive, painful and depressing. Our recovery has been slow and extremely painful.\"JUST WATCHEDYulia Skripal released from hospitalReplayMore Videos ...MUST WATCHYulia Skripal released from hospital 01:48They both are progressing, she said, but her life has been turned upside down, and she\\'s experienced physical and emotional changes, on which she did not elaborate. Read More\"I take one day at a time and want to help care for my father until his full recovery. In the longer term, I hope to return home to my country,\" she said. In requesting privacy and emphasizing that no one speaks for either her or her father, Yulia Skripal thanked the Salisbury District Hospital staff and others involved in their care. She added, \"I\\'m grateful for the offers of assistance from the Russian Embassy, but at the moment I do not wish to avail myself of their services.\"Former Russian spy Sergei Skripal and his daughter, Yulia Skripal, at a restaurant in Salisbury, UK.Lorna Wilkinson, director of nursing at the hospital, said last week that Sergei Skripal would continue his recovery outside the hospital, the UK Press Association reported. The poisoning of the Skripals sparked a diplomatic row between the UK and Russia, which has consistently denied allegations it was behind the poisoningThe UK expelled 23 Russian diplomats who had been declared as unidentified intelligence officers.The United States, Canada, Australia and 18 European Union states kicked out Russian diplomats in a show of support for the UK.Detectives with London\\'s Metropolitan Police believe the Skripals first came into contact with a nerve agent at Sergei Skripal\\'s home.JUST WATCHEDWho is Sergei Skripal? ReplayMore Videos ...MUST WATCHWho is Sergei Skripal? 01:56In late March, police identified the highest concentration of the nerve agent on the home\\'s front door.Upon Sergei Skripal\\'s release, Russian President Vladimir Putin wished him good health, but questioned the British claim that a military-grade nerve agent was responsible for his illness. \"A military-grade poisonous substance is so powerful that the person dies within seconds or minutes,\" Putin said at a news conference alongside German Chancellor Angela Merkel in Sochi, Russia.\"We repeatedly offered UK authorities our help, and we asked to be given access to the investigation, but there is no response,\" he said. \"Our offer stands.\"CNN\\'s James Masters contributed to this report.', 'entities': [{'entity_name': 'SERGEI SKRIPAL', 'entity_type': 'PERSON', 'description': 'Former Russian spy who was attacked with a nerve agent.', 'importance_score': 1.0}, {'entity_name': 'YULIA SKRIPAL', 'entity_type': 'PERSON', 'description': 'Daughter of Sergei Skripal, also attacked with a nerve agent.', 'importance_score': 0.9}, {'entity_name': 'SALISBURY', 'entity_type': 'LOCATION', 'description': 'City in England where the Skripals were found after the attack.', 'importance_score': 0.8}, {'entity_name': 'UK', 'entity_type': 'LOCATION', 'description': 'Country where the attack on the Skripals took place.', 'importance_score': 0.7}, {'entity_name': 'RUSSIA', 'entity_type': 'LOCATION', 'description': 'Country of origin for Sergei Skripal and the suspected source of the attack.', 'importance_score': 0.8}, {'entity_name': 'VLADIMIR PUTIN', 'entity_type': 'PERSON', 'description': 'Russian President who commented on the Skripal case.', 'importance_score': 0.7}, {'entity_name': 'ANGELA MERKEL', 'entity_type': 'PERSON', 'description': 'German Chancellor who was alongside Putin during a news conference.', 'importance_score': 0.6}, {'entity_name': 'SOCHI', 'entity_type': 'LOCATION', 'description': 'City in Russia where Putin and Merkel held a news conference.', 'importance_score': 0.5}, {'entity_name': 'NOVICHOK', 'entity_type': 'CHEMICAL', 'description': 'Military-grade nerve agent used in the attack on the Skripals.', 'importance_score': 0.9}], 'relationships': [{'src_id': 'SERGEI SKRIPAL', 'tgt_id': 'YULIA SKRIPAL', 'description': 'Father-daughter relationship between Sergei Skripal and Yulia Skripal.', 'weight': 1.0, 'order': 1}, {'src_id': 'SERGEI SKRIPAL', 'tgt_id': 'SALISBURY', 'description': 'Sergei Skripal was found in Salisbury after the attack.', 'weight': 0.8, 'order': 1}, {'src_id': 'YULIA SKRIPAL', 'tgt_id': 'SALISBURY', 'description': 'Yulia Skripal was found in Salisbury after the attack.', 'weight': 0.8, 'order': 1}, {'src_id': 'SERGEI SKRIPAL', 'tgt_id': 'UK', 'description': 'Sergei Skripal was attacked in the UK.', 'weight': 0.7, 'order': 1}, {'src_id': 'YULIA SKRIPAL', 'tgt_id': 'UK', 'description': 'Yulia Skripal was attacked in the UK.', 'weight': 0.7, 'order': 1}, {'src_id': 'SERGEI SKRIPAL', 'tgt_id': 'RUSSIA', 'description': 'Sergei Skripal is from Russia and the attack is suspected to be from Russia.', 'weight': 0.8, 'order': 2}, {'src_id': 'YULIA SKRIPAL', 'tgt_id': 'RUSSIA', 'description': 'Yulia Skripal is from Russia and the attack is suspected to be from Russia.', 'weight': 0.8, 'order': 2}, {'src_id': 'VLADIMIR PUTIN', 'tgt_id': 'SERGEI SKRIPAL', 'description': 'Vladimir Putin commented on the Skripal case.', 'weight': 0.7, 'order': 2}, {'src_id': 'VLADIMIR PUTIN', 'tgt_id': 'ANGELA MERKEL', 'description': 'Vladimir Putin and Angela Merkel held a news conference together.', 'weight': 0.6, 'order': 1}, {'src_id': 'VLADIMIR PUTIN', 'tgt_id': 'SOCHI', 'description': 'Vladimir Putin and Angela Merkel held a news conference in Sochi.', 'weight': 0.5, 'order': 1}, {'src_id': 'SERGEI SKRIPAL', 'tgt_id': 'NOVICHOK', 'description': 'Sergei Skripal was exposed to novichok in the attack.', 'weight': 0.9, 'order': 1}, {'src_id': 'YULIA SKRIPAL', 'tgt_id': 'NOVICHOK', 'description': 'Yulia Skripal was exposed to novichok in the attack.', 'weight': 0.9, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': ' (CNN)Roger Federer thinks the professional tennis circuit won\\'t return for a while due to the coronavirus pandemic but, when the time does come, the Swiss superstar said he would find it difficult to play without fans. While European football\\'s Bundesliga resurfaced last week behind closed doors and Spain\\'s La Liga is set to resume the middle of next month, the last official word from tennis authorities essentially saw all action suspended through July. The hiatus began in March, with Federer already sidelined since he was recuperating from knee surgery. Sunday would have marked the first day of the French Open in its usual spot on the tennis calendar -- in March, though, it was rescheduled for September -- and another grand slam, Wimbledon in July, was called off. \"I\\'m not training at the moment because I don\\'t see a reason for that to be honest,\" Federer told three-time French Open champion Gustavo Kuerten -- who is raising funds for coronavirus relief efforts in his native Brazil -- in a video interview reported by Tennis.com.Read More\"I am happy with my body now and I still believe that the return of the tour\\xa0is a long way off,\" continued the 38-year-old. \"And I think it\\'s important\\xa0mentally to enjoy this break, having played so much tennis.\\xa0\"When I\\'m getting towards returning and have a goal to train for, I think I will be super motivated.\"We should be sliding into @rolandgarros right now, thinking of our mates in Paris 👋 pic.twitter.com/0PLKryyIjj— #AusOpen (@AustralianOpen) May 24, 2020 Federer is arguably tennis\\' best supported player ever, and the prospect of competing without spectators doesn\\'t appeal to him. \"Most of the time when we are training, there is no one,\" said the men\\'s record 20-time grand slam champion. \"For us, of course, it is possible to play if there are no fans. But on the other hand, I really hope that the circuit can return as it normally is. \"And hold off till the time is appropriate, minimum\\xa0a third of the stadium or half full. But, for me, completely empty when playing big tournaments is very difficult.\"Federer has been active on social media during the lockdown, sparking a public discussion on the merging of the men\\'s and women\\'s tours with a tweet last month and embarking on a funny Instagram Live with tennis rival Rafael Nadal.Nadal, unlike Federer, has started practicing, though only very recently. The Spaniard would have been favored to win a 20th major and tie Federer had the French Open been played as usual given he has collected a record 12 titles at Roland Garros. Here I am, the first pictures I am posting for you on court. This is my practice earlier today at @rnadalacademy #BackOnCourt #BabolatFamily 🎾👍🏻💪🏻😉 pic.twitter.com/x7tzgLj9pc— Rafa Nadal (@RafaelNadal) May 22, 2020 The next grand slam is scheduled to be late August\\'s US Open in New York, with organizers expected to announce in June if it will go ahead. ', 'entities': [{'entity_name': 'ROGER FEDERER', 'entity_type': 'PERSON', 'description': \"Swiss tennis superstar who thinks the professional tennis circuit won't return for a while due to the coronavirus pandemic.\", 'importance_score': 1.0}, {'entity_name': 'GUSTAVO KUERTEN', 'entity_type': 'PERSON', 'description': 'Three-time French Open champion who is raising funds for coronavirus relief efforts in his native Brazil.', 'importance_score': 0.8}, {'entity_name': 'RAFAEL NADAL', 'entity_type': 'PERSON', 'description': 'Tennis rival of Roger Federer who has started practicing recently.', 'importance_score': 0.9}, {'entity_name': 'FRENCH OPEN', 'entity_type': 'EVENT', 'description': 'A grand slam tennis tournament that was rescheduled for September.', 'importance_score': 0.7}, {'entity_name': 'WIMBLEDON', 'entity_type': 'EVENT', 'description': 'A grand slam tennis tournament in July that was called off.', 'importance_score': 0.7}, {'entity_name': 'US OPEN', 'entity_type': 'EVENT', 'description': 'A grand slam tennis tournament scheduled for late August in New York.', 'importance_score': 0.7}, {'entity_name': 'ROLAND GARROS', 'entity_type': 'LOCATION', 'description': 'The location where the French Open is usually held.', 'importance_score': 0.6}], 'relationships': [{'src_id': 'ROGER FEDERER', 'tgt_id': 'GUSTAVO KUERTEN', 'description': 'Roger Federer discussed the return of the tennis tour with Gustavo Kuerten in a video interview.', 'weight': 0.8, 'order': 1}, {'src_id': 'ROGER FEDERER', 'tgt_id': 'RAFAEL NADAL', 'description': 'Roger Federer has engaged in social media discussions and a funny Instagram Live with tennis rival Rafael Nadal.', 'weight': 0.9, 'order': 1}, {'src_id': 'ROGER FEDERER', 'tgt_id': 'FRENCH OPEN', 'description': 'Roger Federer mentioned the rescheduling of the French Open in September.', 'weight': 0.7, 'order': 1}, {'src_id': 'ROGER FEDERER', 'tgt_id': 'WIMBLEDON', 'description': 'Roger Federer mentioned the cancellation of Wimbledon.', 'weight': 0.7, 'order': 1}, {'src_id': 'RAFAEL NADAL', 'tgt_id': 'FRENCH OPEN', 'description': 'Rafael Nadal would have been favored to win the French Open if it had been played as usual.', 'weight': 0.8, 'order': 1}, {'src_id': 'RAFAEL NADAL', 'tgt_id': 'US OPEN', 'description': \"Rafael Nadal's practice is in preparation for the upcoming US Open.\", 'weight': 0.7, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': 'London (CNN)Top archbishops in the Church of England have apologized for guidance issued by the church last week that said only married heterosexuals should have sex -- while same-sex or heterosexual Christians in civil partnerships should remain abstinent. Archbishop of Canterbury Justin Welby and Archbishop of York John Sentamu said in a statement Thursday that they took responsibility for last week\\'s announcement, \"which we acknowledge has jeopardized trust.\" \"We are very sorry and recognize the division and hurt this has caused,\" Welby and Sentamu wrote.The statement stopped short of retracting the \"pastoral guidance\" issued by the bishops of the Church of England, which was in response to the extension of civil partnerships to heterosexual couples in the UK.Church of England backs climate-friendly stock index that excludes BP and Exxon MobilThe guidance, published January 22, said \"for Christians, marriage -- that is the lifelong union between a man and a woman, contracted with the making of vows -- remains the proper context for sexual activity.\"Read MoreWhen it comes to civil partnerships, the church sought \"to affirm the value of committed, sexually abstinent friendships.\" It highlighted division between conservatives -- who want the church to stick to a traditional biblical teachings on marriage -- and the church\\'s progressive members. The guidance was described as \"a laughingstock to a nation that believes it (the church) is obsessed with sex,\" in an open letter to the archbishops. The letter, signed by more than 3,000 people, including dozens of members of the clergy, said the bishops\\' guidance \"has significantly damaged the mission of the church and it has broken the trust of those it seeks to serve.\"It goes on to express dismay that a public pronouncement on sex and marriage was made while the church was still undergoing a review of of the issue, called the \"Living in Love and Faith\" project. The letter said its signatories had not expected an announcement on the matter until the project\\'s report was published. \"It seems our trust has been misplaced and we feel badly let down.\" ', 'entities': [{'entity_name': 'LONDON', 'entity_type': 'LOCATION', 'description': 'The capital city of the United Kingdom, mentioned as the location of the news source.', 'importance_score': 0.8}, {'entity_name': 'JUSTIN WELBY', 'entity_type': 'PERSON', 'description': \"The Archbishop of Canterbury, who apologized for the church's guidance on sexual activity.\", 'importance_score': 0.9}, {'entity_name': 'JOHN SENTAMU', 'entity_type': 'PERSON', 'description': \"The Archbishop of York, who also apologized for the church's guidance on sexual activity.\", 'importance_score': 0.9}, {'entity_name': 'CHURCH OF ENGLAND', 'entity_type': 'ORGANIZATION', 'description': 'The established church of England, which issued controversial guidance on sexual activity.', 'importance_score': 0.9}, {'entity_name': 'JANUARY 22', 'entity_type': 'DATE', 'description': 'The date when the pastoral guidance was published by the Church of England.', 'importance_score': 0.7}], 'relationships': [{'src_id': 'JUSTIN WELBY', 'tgt_id': 'CHURCH OF ENGLAND', 'description': \"Justin Welby, as the Archbishop of Canterbury, is responsible for the Church of England's guidance on sexual activity.\", 'weight': 0.9, 'order': 1}, {'src_id': 'JOHN SENTAMU', 'tgt_id': 'CHURCH OF ENGLAND', 'description': \"John Sentamu, as the Archbishop of York, is responsible for the Church of England's guidance on sexual activity.\", 'weight': 0.9, 'order': 1}, {'src_id': 'CHURCH OF ENGLAND', 'tgt_id': 'JUSTIN WELBY', 'description': 'The Church of England issued guidance on sexual activity under the leadership of Justin Welby.', 'weight': 0.9, 'order': 1}, {'src_id': 'CHURCH OF ENGLAND', 'tgt_id': 'JOHN SENTAMU', 'description': 'The Church of England issued guidance on sexual activity under the leadership of John Sentamu.', 'weight': 0.9, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': ' (CNN)Germans will file into polling stations to vote in an unpredictable federal election on Sunday -- but for the first time in nearly two decades, their longtime leader won\\'t be in contention.Chancellor Angela Merkel has been a symbol of stability in Europe since she took on the role in 2005; the chemist-turned-political mainstay has withstood a wave of populism, a financial crisis, a pandemic and Brexit to carve out an impressive legacy as the world\\'s most successful female leader.But Merkel, 67, will step down once the repercussions of Sunday\\'s vote become clear, a move that has cast a sense of uncertainty over the weekend\\'s election.Compared to the previous votes in 2017 and 2013, there is \"much more chance of a significant shift in German politics and policy after the election,\" according to Pepijn Bergsen, a research fellow who monitors the country for international think tank Chatham House.The race to become Merkel\\'s successor is tight, and the ultimate victor may not be known for days or even weeks after polls close. Read MoreBut for the first time in a generation, Germans will be deciding what post-Merkel Germany will look like. Whoever they turn to will face a catalog of challenges, both at home and abroad.Merkel has provided a steady hand domestically and abroad, but Germans must now decide on her successor.Where is Merkel?Merkel\\'s departure from the front lines of global politics has been a long time coming; she first announced in 2018 that she would not seek re-election at the end of her term, following a series of setbacks in regional elections.In her time in office, she has dealt with five UK prime ministers, four French presidents, seven Italian prime ministers, and four American commanders-in-chief. Her period in power has been a remarkably eventful one, and Merkel\\'s imperturbable presence throughout has earned her an international reputation for stability and level-headedness. \"That worked very well politically for her in Germany, and on the world stage,\" Bergsen told CNN. \"Germany has done very well over the last 15 years from an economic perspective ... (and) Germany didn\\'t do that badly during the financial crisis, but the realization has crept in that that won\\'t last.\"The European refugee crisis of the mid-2010s proved a major challenge to Merkel\\'s party, the Christian Democratic Union (CDU), and she has also earned detractors over her close relationship with China. But after a pandemic which saw Germany fare better than many of its neighbors, analysts and polling suggest Merkel will leave office with the respect of most Germans. \"She\\'s seen very positively in Germany, because she\\'s associated with stability -- people know what they\\'re getting,\" said Ben Schreer, from the International Institute for Strategic Studies\\' (IISS) Berlin-based Europe office.Who\\'s in the race to replace her?German politics is dominated by two parties -- the center-right CDU and the left-leaning Social Democratic Party, or SPD -- who have governed together in a coalition for the past eight years. But other parties have grown in popularity over the past decade as the CDU and SPD have lost ground. This election is particularly close; the CDU and SPD have both held polling advantages, and the Green Party has also emerged as a serious contender.Merkel\\'s successor at the helm of the CDU is Armin Laschet, 60, a long-time ally of the Chancellor and the party\\'s deputy leader since 2012. A devout Catholic whose father was at one point a coal mining engineer, he was selected as the party\\'s candidate after a torturous leadership tussle.Laschet has a background in law and journalism, and was elected to the German Bundestag in 1994.Laschet won a protracted leadership campaign to replace Merkel, but he is struggling to attract voters on the national stage.Merkel has voiced her support for Laschet, but despite her efforts to persuade Germans to stick with the CDU, polling suggests her replacement as the party\\'s leader has struggled to win over Germans.His foremost opponent is the SPD\\'s Olaf Scholz, who has taken a surprise lead in the polls in recent weeks, leaving him as the marginal frontrunner heading into Sunday\\'s vote. Like Laschet, Scholz has a long history as a political player in Germany. He has been Merkel\\'s finance minister and vice chancellor since 2018, placing him arguably in a better position to run as her natural successor than her own party\\'s candidate.Scholz has earned increased visibility as he navigated Germany\\'s economic response to the pandemic, and cleared the last electoral hurdle with an assured performance in the final television debate. But polls nonetheless suggest a huge number of undecided voters late in the campaign, increasing the unpredictability of the vote.The Green Party\\'s leader Annalena Baerbock caused a brief sensation in German politics when she surged in the polls early in the campaign, prompting voters to wonder whether she could become the country\\'s first ever Green chancellor.Olaf Scholz has taken a surprise lead in polling in recent weeks.A 40-year-old former professional trampolinist, Baerbock stands out in a field of mostly male political leaders. And although her star has faded somewhat in the closing stretch, she has capitalized on voters\\' climate concerns to establish her group as the third party in the race. The far-right AfD remains a stubborn presence on the political scene, scrapping with the liberal Free Democratic Party for fourth place. The refugee crisis that sparked the AfD\\'s surge in German politics has subsided as a pressing political issue, but the party remains an outlet for voters angered by immigration issues. In March, they became the first German party since the Nazi era to be put under government surveillance. How does the voting work?German elections to the Bundestag are run on a system of proportional representation, meaning that each party\\'s vote share relates directly to how many seats they get in parliament. That principle makes it virtually impossible for a party to lead a government alone; coalitions must instead be formed after the vote, and these often contain more than two groups.Many Germans have already cast their ballots; the pandemic has increased the amount of postal voting that took place before polling day. Regardless of how they choose to vote, Germans are asked to pick their local lawmaker, and also their preferred overall party. Once the results come in, a race will start to put together enough seats to govern -- meaning smaller parties can become kingmakers.\"Whoever wins on paper on Sunday night probably can\\'t be sure that he or she will actually lead the government, because there\\'s going to be so many permutations,\" Schreer explained, adding: \"We may not know until November, if we\\'re lucky.\"What are the issues?All the candidates are caught in a Merkel-sized conundrum, as they attempt to define their own agendas while allaying Germans\\' fears over a change in leadership. Climate change has been a major factor in the country\\'s national debate, particularly after devastating flooding hit the country in July. In Canada and Germany, the climate crisis is finally on the ballot. But can it win?A push from Merkel has put environmental issues at the heart of German politics, and virtually all parties have stressed their green credentials. In this campaign the Green Party has called for a 70% cut in greenhouse gas emissions from 1990 levels by 2030, compared to the current government goal of a 55% cut.Economic worries have also come to the fore; in a last-gasp pitch to voters, Laschet said Monday that a left-wing coalition led by the SPD would cause a \"severe economic crisis,\" Reuters reported. Laschet has also followed Merkel\\'s line regarding the European Union; in the final pre-election debate, he emphasized European cohesion as one of his flagship policies. But the campaign has been mostly defined by domestic matters; a minimum wage hike and pension reforms are at the heart of Scholz\\'s campaign, and he stressed those plans again in the debate.Will a Merkel-less Germany still lead on the world stage?The global consequences of Sunday\\'s vote are clear; Merkel\\'s longevity saw her become Europe\\'s de facto leader, and it\\'s unclear whether her successor will fill the same role.\"Germany\\'s going to be faced with some significant foreign policy challenges which the new government has to take on,\" Schreer said. \"The question is, who\\'s going to replace (Merkel), and will that person have the same charisma and ability that she did?\" he added. \"Allies are skeptical, and Germans as well are quite cautious in that regard.\"A key part of Merkel\\'s role was her steadfast determination to maintain European cohesion and paper over the cracks between EU member states. Merkel has outlasted dozens of major leaders during her 16-year period in power.\"Macron will try to usurp Merkel\\'s position in Europe,\" predicted Bergsen, signaling a possible shift in the balance of power towards France, Germany\\'s western neighbor. \"The German position won\\'t necessarily change, but whoever now comes to power will have to deal with a broader (domestic) coalition so they will find it slightly harder to lead on the international stage.\"Looking further afield, Germany\\'s new leader will also have to balance the country\\'s relationships with the United States and China, two nations with whom Merkel attempted to maintain close ties.And keeping the United Kingdom close after its departure from the EU is key. \"The UK remains an important partner in strategic terms, and Germany knows that if the UK isn\\'t engaged in the European continent, then you will split the Europeans,\" said Schreer.\"(Germany) is a well-respected country at the international stage -- that is undoubtedly the case,\" he added. \"The question is: Does that now enable Germany to weather those international storms that are certainly coming?\"', 'entities': [{'entity_name': 'ANGELA MERKEL', 'entity_type': 'PERSON', 'description': 'Chancellor of Germany, symbol of stability in Europe, chemist-turned-political mainstay', 'importance_score': 1.0}, {'entity_name': 'GERMANY', 'entity_type': 'LOCATION', 'description': 'Country where the federal election is taking place', 'importance_score': 0.9}, {'entity_name': 'CHRISTIAN DEMOCRATIC UNION (CDU)', 'entity_type': 'POLITICAL_PARTY', 'description': \"Merkel's party, faced challenges during the European refugee crisis\", 'importance_score': 0.8}, {'entity_name': 'ARMIN LASCHET', 'entity_type': 'PERSON', 'description': \"Merkel's successor at the helm of the CDU, long-time ally of the Chancellor\", 'importance_score': 0.8}, {'entity_name': 'OLAF SCHOLZ', 'entity_type': 'PERSON', 'description': \"SPD's candidate, took a surprise lead in the polls, Merkel's finance minister and vice chancellor\", 'importance_score': 0.8}, {'entity_name': 'SOCIAL DEMOCRATIC PARTY (SPD)', 'entity_type': 'POLITICAL_PARTY', 'description': 'Left-leaning party, governed together with CDU in a coalition', 'importance_score': 0.7}, {'entity_name': 'ANNALENA BAERBOCK', 'entity_type': 'PERSON', 'description': \"Green Party's leader, former professional trampolinist\", 'importance_score': 0.7}, {'entity_name': 'GREEN PARTY', 'entity_type': 'POLITICAL_PARTY', 'description': 'Serious contender in the election, focused on climate change', 'importance_score': 0.7}, {'entity_name': 'AFD', 'entity_type': 'POLITICAL_PARTY', 'description': 'Far-right party, remains a presence on the political scene', 'importance_score': 0.6}], 'relationships': [{'src_id': 'ANGELA MERKEL', 'tgt_id': 'ARMIN LASCHET', 'description': \"Merkel's successor at the helm of the CDU\", 'weight': 0.9, 'order': 1}, {'src_id': 'ANGELA MERKEL', 'tgt_id': 'OLAF SCHOLZ', 'description': \"Merkel's finance minister and vice chancellor\", 'weight': 0.8, 'order': 1}, {'src_id': 'ARMIN LASCHET', 'tgt_id': 'CHRISTIAN DEMOCRATIC UNION (CDU)', 'description': 'Laschet is the candidate for the CDU', 'weight': 0.9, 'order': 1}, {'src_id': 'OLAF SCHOLZ', 'tgt_id': 'SOCIAL DEMOCRATIC PARTY (SPD)', 'description': 'Scholz is the candidate for the SPD', 'weight': 0.9, 'order': 1}, {'src_id': 'ANNALENA BAERBOCK', 'tgt_id': 'GREEN PARTY', 'description': 'Baerbock is the leader of the Green Party', 'weight': 0.9, 'order': 1}, {'src_id': 'GERMANY', 'tgt_id': 'CHRISTIAN DEMOCRATIC UNION (CDU)', 'description': 'CDU is a major political party in Germany', 'weight': 0.8, 'order': 1}, {'src_id': 'GERMANY', 'tgt_id': 'SOCIAL DEMOCRATIC PARTY (SPD)', 'description': 'SPD is a major political party in Germany', 'weight': 0.8, 'order': 1}, {'src_id': 'GERMANY', 'tgt_id': 'GREEN PARTY', 'description': 'Green Party is a serious contender in the German election', 'weight': 0.7, 'order': 1}, {'src_id': 'GERMANY', 'tgt_id': 'AFD', 'description': 'AfD is a far-right party in Germany', 'weight': 0.6, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': 'Story highlightsBrazil beat Spain 3-0 in Confederations Cup finalBrazilian striker Neymar named as the best player of Confederations Cup Tournament permeated by protests over staging of 2014 World Cup in BrazilBrazil\\'s 3-0 win over Spain in the Confederations Cup final brought to an end an event that was designed as a test run for the 2014 World Cup hosts.It was a tournament that was permeated by social unrest, with protesters partly unhappy over the degree of public money devoted to the staging of the World Cup.CNN looks at five things we learned from the event.1. Neymar is the real dealNeymar has been touted as the latest in a line of Brazilian superstars that stretches all the way back to the great Pele, but outside Brazil many were beginning to believe the hype surrounding the young star was just that. Prior to the Confederations Cup his performances for the national team had been lacklustre, particular in the 2-2 draw against Chile in April, when he was singled out for jeers by Brazil\\'s own fans.JUST WATCHEDTour Brazilian football\\'s spiritual homeReplayMore Videos ...MUST WATCHTour Brazilian football\\'s spiritual home 02:24JUST WATCHEDBrazil wins Confederations CupReplayMore Videos ...MUST WATCHBrazil wins Confederations Cup 01:57JUST WATCHEDSpotlight on Paulinho ReplayMore Videos ...MUST WATCHSpotlight on Paulinho 00:46JUST WATCHEDThiago Silva targets PSG dominance ReplayMore Videos ...MUST WATCHThiago Silva targets PSG dominance 03:07Read: Maracana magic by Brazil to claim Confederations CupWhile most would argue that he\\'s in no position to judge, Marseille midfielder Joey Barton\\'s Tweet likening Neymar to Justin Bieber, and something rather unpleasant relating to cats, seemed to sum up the views of many European observers.Following the Brazilian\\'s $75 million transfer to Barcelona -- just before the tournament kicked off -- some were even suggesting the Catalan club had been fleeced by Brazilian side Santos. Not any more: this was no tantalizing glimpse of what La Liga fans might be watching next season, it was incontrovertible proof of what Neymar can bring. The 21-year-old produced a string of vibrant, flamboyant, but above all effective performances throughout the tournament, his goals and guile serving notice that he is every inch a superstar.2. Time may be up for Buffon and companyAfter winning friends at Euro 2012, the Azzurri continued to show that the days of \"catenaccio\" are long gone, with some fast attacking football. Italy\\'s run in the tournament was certainly invigorating, lurching from near disaster in an extraordinary first-half capitulation against Japan, to a sublime (albeit goalless) first-half domination of Spain.Read: Spain edge past Italy In the end they were well worth their third place, but it could and possibly should have been more. Gianluigi Buffon is widely and justifiably regarded as one of the world\\'s finest goalkeepers; yet his penalty saves in the third place play-off against Uruguay masked his culpability in goals conceded at key moments in the tournament.This was not the dominant, steely-eyed Buffon of old -- particularly against Brazil, where he looked anything but solid. Likewise, there are other old hands whose time in the famous blue shirt may be nearing its end. Given Cesare Prandelli\\'s reluctance to start AC Milan\\'s exciting midfielder Stephan El Shaarawy, major surgery is unlikely. Photos: Brazil\\'s most painful moment Photos: Brazil\\'s most painful momentA national tragedy – Moacyr Barbosa Nascimento\\'s life was forever changed after the 1950 World Cup. With Brazil needing just a draw against Uruguay in its final game to lift the trophy for the first time, the team lost 2-1 and he was blamed for the second goal. The goalkeeper\\'s perceived mistake haunted him. Twenty years later he overheard a woman in a supermarket say to her son, \"There is the man who made Brazil cry.\"Hide Caption 1 of 8 Photos: Brazil\\'s most painful momentThe Maracana – The Maracana Stadium in Rio de Janeiro was the venue for the 1950 final, with 200,000 spectators packed into the purpose-built arena. The stadium has been redeveloped and a crowd of 78,000 people will watch the final of 2014 World Cup at the iconic ground.Hide Caption 2 of 8 Photos: Brazil\\'s most painful momentBrazil\\'s golden boy – All eyes will be on Neymar during both June\\'s Confederations Cup and next year\\'s World Cup. The attacker, who recently signed for Barcelona in a deal reportedly worth in excess of $80 million, is Brazil\\'s star player and must perform to his best if \"La Selecao\" are to satisfy an expectant public.Hide Caption 3 of 8 Photos: Brazil\\'s most painful momentThe greatest ever? – The Brazil team of 1970, which beat Italy 4-1 in the World Cup final in Mexico, is widely regarded as the greatest of all time. Pele, a three-time World Cup winner seen here leaping on his teammates, says Brazil must recover from the failure of 63 years ago.Hide Caption 4 of 8 Photos: Brazil\\'s most painful momentThree-peat – Carlos Alberto, captain of the 1970 team, lifts the Jules Rimet trophy which Brazil was allowed to keep after becoming the first nation to win the World Cup three times. The former fullback thinks next year\\'s World Cup will come too soon for Brazil\\'s inexperienced team.Hide Caption 5 of 8 Photos: Brazil\\'s most painful momentThe second coming – Luiz Felipe Scolari was the coach of the last Brazil team to lift the World Cup, in Japan and South Korea in 2002. The veteran has been reappointed in a bid to inject life into an ailing Brazil team. His results have so far left much to be desired: two wins, one defeat and four draws since November 2012.Hide Caption 6 of 8 Photos: Brazil\\'s most painful momentGrand reopening – England was Brazil\\'s first opponent at a refurbished Maracana earlier this month. A half-volley from midfielder Paulinho, pictured, rescued a 2-2 draw for the 2014 World Cup host.Hide Caption 7 of 8 Photos: Brazil\\'s most painful momentA flourish against France – Brazil\\'s most recent match, the last before the Confederations Cup starts, ended in a comfortable 3-0 defeat of France. A penalty from Lucas Moura, right, completed the scoring.Hide Caption 8 of 8 Photos: Brazil\\'s greatest footballers Photos: Brazil\\'s greatest footballersHeleno – Actor Rodrigo Santoro signs a poster for the film \"Heleno\", in which he plays the mercurial striker. A destructive personality, together with illness and drug problems prevented Heleno from becoming one of Brazil\\'s greatest ever players. But he helped pave the way for some of the world\\'s greatest soccer icons...Hide Caption 1 of 8 Photos: Brazil\\'s greatest footballersPele – Ask many Brazilians who is the greatest footballer of all time and their answer will be simple: \"Pele.\" The striker won three World Cups with Brazil between 1958 and 1970 and is his country\\'s leading goalscorer with 77 goals from 92 caps.Hide Caption 2 of 8 Photos: Brazil\\'s greatest footballersGarrincha – Most football fans would say Argentina\\'s Diego Maradona is the only player who can rival Pele for the title of greatest ever. In Brazil, however, Garrincha is regarded as the only player who comes close to the great man. The tricky winger was a key part of Brazil\\'s World Cup triumphs in 1958 and 1962. Sadly, Garrincha struggled with alcohol problems and died of liver cirrhosis aged 49.Hide Caption 3 of 8 Photos: Brazil\\'s greatest footballersZico – After a Pele-inspired triumph in 1970, Brazil would wait 24 years before lifting the World Cup again. Although the 1980s was a barren decade in terms of trophies for Brazil, the team which the South Americans sent to the 1982 World Cup is heralded as one of the most entertaining in history. Central to its free-flowing, attacking style was Zico, a midfielder of considerable craft and guile who collected 72 caps between 1976 and 1988.Hide Caption 4 of 8 Photos: Brazil\\'s greatest footballersRomario – When Brazil finally won the World Cup for a fourth time in 1994 in the U.S., the team was derided by some for being too functional. In a team short of star quality, striker Romario was the shining light, scoring five goals as Brazil lifted the trophy thanks to a penalty-shootout victory over Italy.Hide Caption 5 of 8 Photos: Brazil\\'s greatest footballersRonaldo – Ronaldo watched on as Romario fired Brazil to victory in 1994, four years later he was the star man at France 1998. Brazil lost the final 3-0 to the hosts, with mystery surrounding their starting 11 as Ronaldo was left out of, then reinstated to, the team for the deciding match at the Stade de France. Ronaldo\\'s redemption arrived in 2002, when he scored both goals as Brazil beat Germany 2-0 to lift the World Cup for a fifth time.Hide Caption 6 of 8 Photos: Brazil\\'s greatest footballersRonaldinho – While Ronaldo was the star man in Japan and South Korea, he was ably supported by flamboyant playmaker Ronaldinho. Ronaldinho\\'s performance in the World Cup earned him a move to Barcelona in 2003, where he went on to win the European Champions League in 2006. He was twice named FIFA World Player of the Year.Hide Caption 7 of 8 Photos: Brazil\\'s greatest footballersNeymar? – The latest Brazilian tipped for stardom is Neymar, who recently followed in Ronaldinho\\'s footsteps by joining Barcelona. All eyes will be on the forward when Brazil host the World Cup in 2014. Neymar has made a good start to Brazil\\'s Confederations Cup campaign, scoring two goals in two matches.Hide Caption 8 of 8 Photos: Confederations Cup: Brazil beats Mexico as Fortaleza protests Photos: Confederations Cup: Brazil beats Mexico as Fortaleza protestsGolden Boy – Hours after declaring himself saddened by the need for protests against Brazil\\'s social conditions, Neymar brought joy to his compatriots with the opening goal in a 2-0 win over Mexico. Hide Caption 1 of 5 Photos: Confederations Cup: Brazil beats Mexico as Fortaleza protestsNo Ordinary Game – A family of four negotiate their way to the game as riot police prevent protesters from gaining access to Fortaleza\\'s Castelao Stadium. Hide Caption 2 of 5 Photos: Confederations Cup: Brazil beats Mexico as Fortaleza protestsStalemate – Protesters confront riot police officers on the distant outskirts of the Castelao Stadium, which has been newly built for next year\\'s World Cup at a cost of $240 million.Hide Caption 3 of 5 Photos: Confederations Cup: Brazil beats Mexico as Fortaleza protestsLone Marksman – A police officer holds his weapon as protesters continue their demonstration ahead of Brazil\\'s Group A match with Mexico in the ongoing Confederations Cup.Hide Caption 4 of 5 Photos: Confederations Cup: Brazil beats Mexico as Fortaleza protestsPower Play – Fans hold up banners - which state that they are protesting against corruption, rather than the national team - ahead of Brazil\\'s 2-0 win over Mexico.Hide Caption 5 of 5The Italian national side has always been resistant to change, as its ageing spine suggests, but it may need to pick up the pace of its evolution. The likes of Buffon and the peerless Andrea Pirlo may have one more big tournament in them, but Prandelli would do well to blood some fresh talent in the meantime, just in case -- especially given the physical demands next year\\'s World Cup will present. 3. Protests are a wake-up call to FIFA and BrazilFor a country that is synonymous with football, there were times during this tournament when Brazil seemed to have fallen well and truly out of love with the game -- or at least, with FIFA and the Brazilian government\\'s interpretation of what a World Cup should look like. As simmering social unrest threatened to boil into something more serious, the tournament\\'s detractors grew in volume and number. Even former star striker Romario joined a critical chorus that cited ticket prices, infrastructure costs and a questionable legacy as reasons why the Confederations Cup, and next year\\'s World Cup, were bad for Brazil. Read: A fair World Cup deal for BrazilIn anticipation of trouble, a reported 10,000 police were on duty in Rio de Janeiro ahead of Brazil\\'s clash with Spain, but in the end protests were relatively low-key. Following their team\\'s emphatic triumph over the world and European champions, crowds spilled out onto the street and into a carnival atmosphere.Clearly this story is not over, and there is much work to do; for now, however, football\\'s primacy has been restored. In fact there was much cause for optimism on the pitch. This was a well-deserved win from a team that looks to be gaining in stature, and the atmosphere inside the Maracana for the final was profoundly imposing.Of course Brazil won the 2009 Confederations Cup before limping out in the quarterfinals in South Africa; but this time they will be at home. The World Cup will be a tougher test; but don\\'t bet against them.4. Spain needs a re-bootFinally, after a seemingly interminable period of dominance, Spain\\'s champions look to have been found out. For clues as to how, it is hard to see beyond the Germans. Italy really should have beaten the Spaniards after playing them off the park for significant chunks of their semi-final; Brazil\\'s 3-0 defeat of the world champions was a muscular and ruthless final execution.Both owed much to the approaches of Bayern Munich and Borussia Dortmund in their UEFA Champions League defeats of Barcelona and Real Madrid.Spain were hustled and hassled, with attempts to impose their intricate passing game met by fiercely committed opponents, closing them down until the Europeans simply folded.Fernando Torres only won the golden boot because of his goals against Tahiti\\'s part-timers. Xavi and Iniesta are still fabulously creative, but elsewhere Spain\\'s weak links were exploited with a kind of physicality this team now seems incapable of countering. Drained of confidence, or possibly just appetite, they looked listless and in dire need of fresh ideas. The sight of a defender, Sergio Ramos, taking a penalty that could have brought them back into the final spoke volumes. True Brazil had had an extra day of rest before the final, but the mask of invincibility has slipped; Spain has 12 months to work out how to set it back in place.5. The Confederations Cup comes of ageIn theory at least, the Confederations Cup is the unloved second cousin of the World Cup, the Euros and the Copa America. Traditionally these games are seen by the cynics as little more than jumped up exhibition matches -- a mere aperitif before the main meal of the World Cup. By and large, no one really cares who wins. This time, however, something seemed to click. Maybe it was the location. Brazil may have some serious issues to confront, but there is something about the host country that elevated this tournament onto a different plane.In football terms, this is about as educated as any crowd can get. The enthusiastic way in which local fans adopted teams such as Japan, Uruguay, Tahiti and Italy conveyed atmosphere and meaning to fixtures where normally none would exist, and more than made up for the absence of traveling support. The outcome, for the neutrals at least, was first class entertainment. Brazil 2013 served up some of the most memorable international games of recent memory, played in front of passionate crowds in some spectacular arenas. Read: Brazil\\'s beautiful game?If Brazil 2014 can pick up where this rehearsal left off, then we are truly in for a treat.', 'entities': [{'entity_name': 'BRAZIL', 'entity_type': 'LOCATION', 'description': 'Brazil is a country that hosted the Confederations Cup and is preparing to host the 2014 World Cup. It experienced social unrest during the Confederations Cup due to public money being devoted to the World Cup.', 'importance_score': 1.0}, {'entity_name': 'SPAIN', 'entity_type': 'LOCATION', 'description': 'Spain is a country whose national football team was defeated 3-0 by Brazil in the Confederations Cup final. The Spanish team is known for its dominance in international football.', 'importance_score': 0.9}, {'entity_name': 'NEYMAR', 'entity_type': 'PERSON', 'description': 'Neymar is a Brazilian footballer who was named the best player of the Confederations Cup. He is considered a rising superstar in the football world and recently transferred to Barcelona for $75 million.', 'importance_score': 1.0}, {'entity_name': 'CONFEDERATIONS CUP', 'entity_type': 'EVENT', 'description': 'The Confederations Cup is an international football tournament held in Brazil, serving as a test run for the 2014 World Cup. It was marked by social unrest and protests.', 'importance_score': 0.9}, {'entity_name': '2014 WORLD CUP', 'entity_type': 'EVENT', 'description': 'The 2014 World Cup is an upcoming international football tournament to be hosted by Brazil. It is preceded by the Confederations Cup, which highlighted social issues and protests.', 'importance_score': 1.0}], 'relationships': [{'src_id': 'BRAZIL', 'tgt_id': 'SPAIN', 'description': 'Brazil defeated Spain 3-0 in the Confederations Cup final, showcasing their strength as potential hosts of the 2014 World Cup.', 'weight': 1.0, 'order': 1}, {'src_id': 'NEYMAR', 'tgt_id': 'CONFEDERATIONS CUP', 'description': 'Neymar was named the best player of the Confederations Cup, demonstrating his skill and potential as a future football superstar.', 'weight': 1.0, 'order': 1}, {'src_id': 'CONFEDERATIONS CUP', 'tgt_id': '2014 WORLD CUP', 'description': 'The Confederations Cup served as a test run for the 2014 World Cup, highlighting both the potential and the challenges faced by Brazil as hosts.', 'weight': 0.9, 'order': 2}]}) (input_keys={'input_text'})]" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "trainset[:5]" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 99 chunks, 901 entities(duplicated), 631 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 400 Bad Request\"\n", + "ERROR:nano-graphrag:Error in TypedEntityRelationshipExtractor: Error code: 400 - {'error': {'message': 'Content Exists Risk', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_request_error'}}\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 100 chunks, 901 entities(duplicated), 631 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:nano-graphrag:Saved 99 examples with keys: ['input_text', 'entities', 'relationships'], filtered 1 examples\n" + ] + } + ], + "source": [ + "val_chunks = {compute_mdhash_id(text, prefix=f\"chunk-valset-\"): {\"content\": text} for text in val_data[\"text\"]}\n", + "valset = asyncio.run(generate_dataset(chunks=val_chunks, filepath=entity_relationship_valset_path))" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Example({'input_text': 'Story highlightsPortugal qualifies for Euro 2016 finalDefeats Wales 2-0 in semifinalCristiano Ronaldo and Nani on targetFrance or Germany awaits in the final (CNN)Cristiano Ronaldo proved himself the man for the big occasion once again by firing Portugal into the final of Euro 2016 Wednesday.Ronaldo\\'s second-half header and a strike by his former Manchester United teammate Nani secured a 2-0 win against Wales in Lyon.Follow @cnnsport\\n\\nPortugal, which last reached the final of the competition in 2004, will face either host nation France or world champion Germany in Paris on Sunday.This contest had been billed as clash between two of the world\\'s top players -- Ronaldo and his Real Madrid teammate Gareth Bale.But Bale, who has enjoyed a stellar tournament for a country which had never before qualified for the tournament, failed to match the exploits of his rival.Read MoreRonaldo, who equaled Michel Platini\\'s record of scoring nine career goals at the Euros, will now hope to exorcise the ghosts of 2004 when Portugal was beaten by Greece in a final held in its own backyard. When you know you\\'re going to Paris. 🎉 #PORWAL #EURO2016 pic.twitter.com/7FXah0E6QE— UEFA EURO 2016 (@UEFAEURO) July 6, 2016\\n\"I hope that [after the final] we\\'ll be smiling and that it will be tears of joy in the end,\" Ronaldo told the tournament\\'s official website.\"I\\'ve always said my dream was to win a trophy with Portugal. We\\'re closer to doing it and I believe that we\\'ll win. \"With a lot of work, humility and the spirit of self-sacrifice, which I have always shown in my career, these sorts of things are doable.\"Bale and Ronaldo embraced at the end of the game.Rocky roadFor Portugal, the road to the final has been long and arduous, often due to the team\\'s own inadequacies.While Wales enjoyed a rather enchanting run to its first major semifinal, Portugal\\'s journey to its fifth could scarcely have been more different.No other team had arrived at the last-four stage of the European Championship finals without winning a game in 90 minutes -- but Portugal, which drew all three of its group matches and only qualified in third place, has always managed to do just enough.A last-16 win over Croatia, secured with just three minutes of extra-time remaining, was then followed by a penalty shootout triumph over Poland after the game had finished 1-1.For all the exciting talent, and there is plenty even if this may not be a vintage Portuguese team, rarely has it looked impressive.Wales paid special attention to Cristiano Ronaldo in the opening stages of the contest.And yet, what it has done, is use its experience, its know-how and a resolute determination to ensure it will not be beaten.In Renato Sanches, an 18-year-old midfielder recently bought by Bayern Munich for $36 million, Portugal has a player who will surely go on to take on Ronaldo\\'s mantle.But even the youngest and most precocious need guidance.That guidance has come from Ronaldo, who despite failing to find his best form, has carried this team for long periods of the tournament.His two goals in the 3-3 draw with Hungary, a game in which it trailed on three separate occasions, enabled Portugal to qualify as the third of the four best third-placed teams.Cristiano Ronaldo: Is Euro 2016 the last chance for Portugal great?\"It\\'s what we have dreamed of since the beginning,\" Ronaldo added.\"We knew it would be a long road and we\\'re still in the tournament. We have believed right from the start. \"We had difficult moments, but it\\'s like I always say: it\\'s better to start poorly and have a positive ending. \"We haven\\'t won anything yet as I said a few days ago, but the dream is still alive.\"LeaderFor so long Ronaldo has been the one who has been responsible for pushing his team forward, but even he has appeared to be struggling both on and off the field of play.First there was his outburst after his side\\'s group draw against Iceland, when he accused the island team of having a \"small mentality\" and claiming it would never achieve anything in the tournament -- a prediction which proved rather wide of the mark.Then there was his penalty miss in the goalless draw with Austria which was followed a few days later by his decision to throw a reporter\\'s microphone into a lake while out on a prematch walk.But for all his histrionics and his ability to split public opinion, few can doubt his talents and the records he has broken.🎉 Bravo @selecaoportugal: #EURO2016 finalists! 🎉#POR #PORWAL pic.twitter.com/kizafyy7EI— UEFA EURO 2016 (@UEFAEURO) July 6, 2016\\nHis 61 goals in 132 games makes him Portugal\\'s top scorer, while he is the only player to have scored in four consecutive European Championship finals.But his struggles in France have been well documented -- his wayward shooting, the lack of usual poise on front of goal and his waning influence on games has become more noticeable.It is in sharp contrast to his Real Madrid teammate Bale, who was responsible for creating one of the only real opportunities of a tight and cagey first period.Bale, who scored in each of Wales\\' first three group games, picked the ball up in his own half and drove through the Portuguese midfield before unleashing a fierce effort straight at goalkeeper Rui Patricio.Turning pointWhile the first half may have been rather uninspiring, the second was anything but as Ronaldo and Portugal took control of the contest.Just five minutes of the second half had passed when Ronaldo rose highest at the far post to meet Raphael Guerreiro\\'s cross and power a header into the top corner.Wales, still dazed from conceding the opening goal, was then dealt another blow just three minutes later.FT #Por 2-0 #Wal. Cristiano Ronaldo leads Portugal into the #Euro2016 final! pic.twitter.com/Z8vl4YUfxR— CNN Football Club (@CNNFC) July 6, 2016\\nOnce again it was Ronaldo at the heart of the move, flashing a driven effort into the penalty area -- and Nani, who on Tuesday joined Valencia, diverted the ball past stranded goalkeeper Wayne Hennessey.Wales, pushing forward in search of a way back into the contest, began to leave holes at the back and was fortunate not to fall further behind.First, Hennessey failed to hold Nani\\'s shot and Joao Mario somehow contrived to fire the rebound wide of the post with the goal gaping.Moments later it was Danilo who came close, his short squirming under Hennessey\\'s body before the goalkeeper recovered to stop the ball on the line.Bale had a couple efforts from long-range but failed to find a way past the Portuguese defense.Wales huffed and puffed, with Bale unleashing a couple of efforts from long range as Portugal sat back and hit its opponent on the counter attack.Roared on by thousands of fans, Wales continued to move forward but it lacked the precision and quality which had been so evident during its run to the final four.In the immediate aftermath of this defeat, it is easy to to forget that when Chris Coleman took over this team four years ago that it sat 117th in the world rankings and had not qualified for a major tournament since 1958.Just to play in these finals was an achievement -- but what this team has done over the past month will change the landscape of football in Wales forever.Here\\'s another look at the Ronaldo header that gave #Por the lead. What a leap! #PORWAL pic.twitter.com/2tuSLXU9vI— CNN Football Club (@CNNFC) July 6, 2016\\nNot only did it qualify ahead of England and outlast it, it played with a sense of pride, passion and least of all, quality.Some had labeled Wales a \"one-man team\" with Bale cast as the superstar dragging 10 other players along with him.Yet, such an assertion was to prove folly. Read more: Full Euro 2016 coverageWales have been a joy to watch throughout the tournament. Like Iceland, it boasts a connection between the team and supporters which few others can match, bar the Irish of course.It has inspired, it has brought hope and it has revitalized football in the country -- but this was a fairy tale without the ending so many had yearned for.For Ronaldo, though, the end is not yet written.', 'entities': [{'entity_name': 'PORTUGAL', 'entity_type': 'ORGANIZATION', 'description': 'The national football team of Portugal that qualified for the Euro 2016 final.', 'importance_score': 1.0}, {'entity_name': 'CRISTIANO RONALDO', 'entity_type': 'PERSON', 'description': 'A Portuguese footballer who scored in the Euro 2016 semifinal against Wales.', 'importance_score': 1.0}, {'entity_name': 'NANI', 'entity_type': 'PERSON', 'description': 'A Portuguese footballer and former Manchester United teammate of Cristiano Ronaldo who scored in the Euro 2016 semifinal against Wales.', 'importance_score': 0.8}, {'entity_name': 'WALES', 'entity_type': 'ORGANIZATION', 'description': 'The national football team of Wales that was defeated by Portugal in the Euro 2016 semifinal.', 'importance_score': 0.9}, {'entity_name': 'EURO 2016', 'entity_type': 'EVENT', 'description': 'The 2016 UEFA European Championship, a major football tournament held in France.', 'importance_score': 1.0}, {'entity_name': 'FRANCE', 'entity_type': 'LOCATION', 'description': 'The host nation of Euro 2016 and a potential opponent for Portugal in the final.', 'importance_score': 0.8}, {'entity_name': 'GERMANY', 'entity_type': 'ORGANIZATION', 'description': 'The national football team of Germany, the world champion and a potential opponent for Portugal in the final.', 'importance_score': 0.8}], 'relationships': [{'src_id': 'PORTUGAL', 'tgt_id': 'WALES', 'description': 'Portugal defeated Wales 2-0 in the semifinal of Euro 2016.', 'weight': 1.0, 'order': 1}, {'src_id': 'CRISTIANO RONALDO', 'tgt_id': 'NANI', 'description': 'Cristiano Ronaldo and Nani, both Portuguese footballers, scored in the semifinal against Wales.', 'weight': 0.9, 'order': 1}, {'src_id': 'PORTUGAL', 'tgt_id': 'FRANCE', 'description': 'Portugal may face France in the final of Euro 2016.', 'weight': 0.8, 'order': 2}, {'src_id': 'PORTUGAL', 'tgt_id': 'GERMANY', 'description': 'Portugal may face Germany in the final of Euro 2016.', 'weight': 0.8, 'order': 2}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': ' (CNN)A Swedish train operator is investigating the forcible removal of a pregnant woman from a train in Stockholm.A video clip posted on social media shows security guards working for Stockholm public transport authority SL dragging the woman off the train and pushing her down onto a bench on the platform.The woman had allegedly refused to accept a fine after failing to show a valid ticket, according to transport officials. Security guards stepped in after she allegedly became aggressive.The woman\\'s daughter can be seen crying as she tries to hold on to her mother, before another security guard leads the child away.\"In these two videos you can see the victim dragged out of the train, her child taken from her and whilst she attempts to stand up she is held down,\" wrote popular blogger and activist Lovette Jallow, who posted mobile phone footage of the incident on Instagram. Read More View this post on Instagram Tomorrow all the witnesses that came forth with their evidence will be making their own reports. . . In these two videos you can see the victim dragged out of the train, her child taken from her and whilst she attempts to stand up she is held down. The full video is over 5 minutes long and I will try and edit and put it up tonight or tomorrow. . . After everything the Swedish public was shown in the recent @kallafaktatv4 documentary about how aftiswedes are racially profiled and mistreated this shouldn\\'t surprise anyone even if the victim is pregnant. The victim is currently in the hospital and all I can do is hope the baby is alright because if anything happens to that child. There will be hell to pay. A post shared by ᒪOᐯETTE ᒍᗩᒪᒪOᗯ (@action4humanity_se) on Jan 31, 2019 at 1:17pm PST\\nIn the post, Jallow also criticized how Swedes of African origin are \"racially profiled and mistreated.\"The woman visited hospital for treatment after the incident, which took place at Hötorget metro station on January 31, according to a police report.\"All I can do is hope the baby is alright because if anything happens to that child. There will be hell to pay,\" wrote Jallow.The post drew many comments from other Instagram users. Sofie Fisen Jakopsohn, @sofiejakopsohn, left a comment calling the incident a crime against human rights, while others said that things would have been different if the woman had listened to the guards\\' instructions.SL spokesman Henrik Palmer told CNN that the security guards are subject to rigorous training to prevent these kinds of incidents.An internal investigation is being carried out to work out what went wrong, he said.\"We take this very seriously,\" said Palmer, adding that the security guards have been suspended until the investigation is complete.There are cameras on the train and the platform, said Palmer, and police have access to all of the footage.Stockholm police are investigating the incident but could not be reached for comment.', 'entities': [{'entity_name': 'SWEDISH TRAIN OPERATOR', 'entity_type': 'ORGANIZATION', 'description': 'The organization responsible for operating trains in Sweden.', 'importance_score': 0.8}, {'entity_name': 'STOCKHOLM PUBLIC TRANSPORT AUTHORITY SL', 'entity_type': 'ORGANIZATION', 'description': 'The public transport authority in Stockholm responsible for managing public transportation.', 'importance_score': 0.9}, {'entity_name': 'LOVETTE JALLOW', 'entity_type': 'PERSON', 'description': 'A popular blogger and activist who posted the incident on Instagram.', 'importance_score': 0.7}, {'entity_name': 'HÖTORGET METRO STATION', 'entity_type': 'LOCATION', 'description': 'The metro station where the incident took place.', 'importance_score': 0.6}, {'entity_name': 'JANUARY 31, 2019', 'entity_type': 'DATE', 'description': 'The date when the incident occurred.', 'importance_score': 0.5}, {'entity_name': 'HENRIK PALMER', 'entity_type': 'PERSON', 'description': 'The spokesman for Stockholm public transport authority SL.', 'importance_score': 0.6}], 'relationships': [{'src_id': 'SWEDISH TRAIN OPERATOR', 'tgt_id': 'STOCKHOLM PUBLIC TRANSPORT AUTHORITY SL', 'description': 'The Swedish train operator is investigating an incident involving the Stockholm public transport authority SL.', 'weight': 0.8, 'order': 1}, {'src_id': 'STOCKHOLM PUBLIC TRANSPORT AUTHORITY SL', 'tgt_id': 'LOVETTE JALLOW', 'description': 'The Stockholm public transport authority SL is mentioned in a post by Lovette Jallow on Instagram.', 'weight': 0.7, 'order': 2}, {'src_id': 'LOVETTE JALLOW', 'tgt_id': 'HÖTORGET METRO STATION', 'description': 'Lovette Jallow posted about an incident that occurred at Hötorget metro station.', 'weight': 0.6, 'order': 2}, {'src_id': 'HÖTORGET METRO STATION', 'tgt_id': 'JANUARY 31, 2019', 'description': 'The incident at Hötorget metro station took place on January 31, 2019.', 'weight': 0.5, 'order': 1}, {'src_id': 'STOCKHOLM PUBLIC TRANSPORT AUTHORITY SL', 'tgt_id': 'HENRIK PALMER', 'description': 'Henrik Palmer is the spokesman for the Stockholm public transport authority SL.', 'weight': 0.6, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': 'Portrush, Northern Ireland (CNN)He grew up with a famous Gaelic football-playing dad, but Shane Lowry\\'s dream as one of the only golfers in a school of 500 was always to win the Open.He accomplished that in spectacular fashion Sunday with a momentous six-shot victory over England\\'s Tommy Fleetwood to clinch his first major title at Royal Portrush.The Open, the oldest of golf\\'s four majors, had not been held in Northern Ireland for 68 years because of the Troubles that dogged the nation, but Lowry\\'s charge to the Claret Jug united fans from both sides of the border.They roared him on in thunderous fashion and chanted his name in scenes reminiscent of the raucous atmosphere at the Ryder Cup.Judging by his nerve to build on a four-shot lead in the face of eye-popping pressure, he will be an asset to European captain Padraig Harrington\\'s side in the white-hot atmosphere of Whistling Straits, Wisconsin, in 2020. Read MoreThe 32-year-old described the experience of winning the Open as \"surreal,\" saying he can\\'t quite believe he is a major champion.\"To do it here in Portrush is even more special, it is a dream come true,\" Lowry told CNN Sport in the Royal Portrush clubhouse during a whirlwind tour of media engagements.\"I didn\\'t know if I would achieve anything like this and I have and I\\'m really going to enjoy it.\"READ: Shane Lowry clinches Claret Jug for first major titleShane Lowry was roared on by raucous home support at Royal Portrush. \\'Dream come true\\'Shane Lowry.... That is all https://t.co/B7T3bHR24z— Carl Frampton MBE (@RealCFrampton) July 21, 2019 Lowry joins an illustrious roll call of recent success stories from the Republic of Ireland and Northern Ireland, alongside three-time major champion Harrington, Portrush\\'s Graeme McDowell the 2010 US Open champion, 2011 Open winner Darren Clarke and former world No.1 Rory McIlroy, who bagged four majors between 2011 and 2014.And who should be one of his close group of family and friends watching behind the 18th green but Harrington, who won the Open in 2007 and 2008, and McDowell. \"Paddy and G-Mac (McDowell) are two really good friends of mine now and I\\'m just so happy I can add my name to the list of major champions,\" he said. \"Like, you go into Paddy\\'s house and the Claret Jug is sitting on the kitchen table, and I\\'m going to have one on my kitchen table as well.\" Now he has set his sights on making Harrington\\'s team in the biennial Europe against the USA match next year.\"The Ryder Cup, that\\'s the plan,\" he added. \"It was very kind of Paddy to wait for me on the 18th green.\"READ: Emotional McIlroy feels \\'love\\' after epic Open missREAD: Tiger Woods misses Open cut, yearns for \\'hot weeks\\'Shane Lowry joins an illustrious list of major champions from both sides of the border in Ireland. Golf is fickleLowry\\'s previous best finished in a major was tied second in the US Open at Oakmont in 2016 -- but the sting in the tail was blowing a four-shot overnight lead going into the final round.He suffered no such blips on a testing day at Portrush Sunday, feeding off the lively crowd and seemingly oblivious to the at times torrential rain and gusty winds.Lowry won his first European Tour title -- the 2009 Irish Open -- when still an amateur and added a fourth in Abu Dhabi in January.But he missed his fourth consecutive cut in the Open at Carnoustie last year and says he had fallen out of love with the game.\"Carnoustie, that just shows you how fickle golf is,\" said Lowry, whose dad Brendan followed his round Sunday. \"Golf is a weird sport and you never know what\\'s around the corner. That\\'s why you need to fight through the bad times. \"It was something that became very stressful and it was weighing on me and I just didn\\'t like doing it. What a difference a year makes.\"McDowell told a story outlining Lowry\\'s early potential as a member of the Irish amateur team alongside McIIroy. Renowned coach Pete Cowen, mentor now to multiple major champions, was asked down to Dublin to look at the squad and see what he thought. According to McDowell, he said: \"Rory McIlroy looks pretty good, but that slightly overweight kid with the glasses looks good, too.\" That was the young Lowry. READ: Why Holywood star McIlroy has always been box officeREAD: Golfers feud after caddie\\'s mom is hit by ballShane Lowry celebrates as he walks up the 18th fairway on his way to winning the Open.Lowry also lost his PGA Tour card last year but credits the turnaround in fortunes to the people around him, including new caddie Bo Martin and coach Neil Manchip, who delivered a crucial pep talk over coffee at a hotel in nearby Bushmills on the eve of the Open.\"I suppose hard work and belief in myself and belief from the people around me,\" he told CNN of his reversal.\"I wouldn\\'t be here without any of them.\"Lowry also says the perspective that comes from becoming a father to Iris, born in 2017, helps him to process the bad days on the golf course.\"It has a lot. If things didn\\'t go to plan [Sunday] I would have been unbelievably disappointed but at the end of the day you\\'re going back to a warm home with a family. \"It could be worse.\"He won the Open at Royal Portrush in front of an excited and proud home crowd.It couldn\\'t be much better.', 'entities': [{'entity_name': 'SHANE LOWRY', 'entity_type': 'PERSON', 'description': 'A professional golfer who won the Open at Royal Portrush.', 'importance_score': 1.0}, {'entity_name': 'TOMMY FLEETWOOD', 'entity_type': 'PERSON', 'description': 'A professional golfer from England who was runner-up in the Open.', 'importance_score': 0.8}, {'entity_name': 'ROYAL PORTRUSH', 'entity_type': 'LOCATION', 'description': 'A golf course in Northern Ireland where the Open was held.', 'importance_score': 0.9}, {'entity_name': 'PADRAIG HARRINGTON', 'entity_type': 'PERSON', 'description': 'A professional golfer and European captain who is a friend of Shane Lowry.', 'importance_score': 0.7}, {'entity_name': 'GRAEME MCDOWELL', 'entity_type': 'PERSON', 'description': 'A professional golfer from Portrush who is a friend of Shane Lowry.', 'importance_score': 0.6}, {'entity_name': 'RORY MCILROY', 'entity_type': 'PERSON', 'description': 'A professional golfer and former world No.1 who is from Northern Ireland.', 'importance_score': 0.7}, {'entity_name': 'DARREN CLARKE', 'entity_type': 'PERSON', 'description': 'A professional golfer who won the Open in 2011.', 'importance_score': 0.6}, {'entity_name': 'CLARET JUG', 'entity_type': 'AWARD', 'description': 'The trophy awarded to the winner of the Open.', 'importance_score': 0.8}, {'entity_name': 'RYDER CUP', 'entity_type': 'EVENT', 'description': 'A biennial golf match between Europe and the USA.', 'importance_score': 0.7}, {'entity_name': 'WHISTLING STRAITS', 'entity_type': 'LOCATION', 'description': 'A golf course in Wisconsin where the Ryder Cup will be held in 2020.', 'importance_score': 0.6}], 'relationships': [{'src_id': 'SHANE LOWRY', 'tgt_id': 'TOMMY FLEETWOOD', 'description': 'Shane Lowry won the Open with a six-shot victory over Tommy Fleetwood.', 'weight': 0.9, 'order': 1}, {'src_id': 'SHANE LOWRY', 'tgt_id': 'ROYAL PORTRUSH', 'description': 'Shane Lowry won the Open at Royal Portrush.', 'weight': 1.0, 'order': 1}, {'src_id': 'SHANE LOWRY', 'tgt_id': 'PADRAIG HARRINGTON', 'description': \"Shane Lowry is an asset to European captain Padraig Harrington's side in the Ryder Cup.\", 'weight': 0.8, 'order': 1}, {'src_id': 'SHANE LOWRY', 'tgt_id': 'GRAEME MCDOWELL', 'description': 'Shane Lowry is friends with Graeme McDowell.', 'weight': 0.7, 'order': 1}, {'src_id': 'SHANE LOWRY', 'tgt_id': 'RORY MCILROY', 'description': 'Shane Lowry joins an illustrious roll call of recent success stories from Ireland, alongside Rory McIlroy.', 'weight': 0.7, 'order': 1}, {'src_id': 'SHANE LOWRY', 'tgt_id': 'DARREN CLARKE', 'description': 'Shane Lowry joins an illustrious roll call of recent success stories from Ireland, alongside Darren Clarke.', 'weight': 0.6, 'order': 1}, {'src_id': 'SHANE LOWRY', 'tgt_id': 'CLARET JUG', 'description': 'Shane Lowry won the Claret Jug at the Open.', 'weight': 0.9, 'order': 1}, {'src_id': 'SHANE LOWRY', 'tgt_id': 'RYDER CUP', 'description': \"Shane Lowry has set his sights on making Padraig Harrington's team in the Ryder Cup.\", 'weight': 0.7, 'order': 1}, {'src_id': 'RYDER CUP', 'tgt_id': 'WHISTLING STRAITS', 'description': 'The Ryder Cup will be held at Whistling Straits in 2020.', 'weight': 0.6, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': ' (CNN)Tampa Bay Buccaneers head coach Bruce Arians says he cares about wide receiver Antonio Brown and hopes the best for him.\"I wish him well,\" Arians said at his weekly press conference on Monday remotely. \"I hope if he needs help, get some ... It\\'s very hard because I do care about him.\"While Brown\\'s future remains unclear, he was not released by the Buccaneers on Monday, according to the NFL\\'s transactions report.On Sunday, the seven-time Pro Bowler left the game against the New York Jets late in the third quarter. Following the Buccaneers\\' victory against the Jets, Arians said Brown was \"no longer a Buc.\"The broadcast showed the 33-year-old appearing to be upset on the sideline, removing his jersey and pads while teammates pleaded with him to stay. A shirtless Brown could be seen throwing his undershirt into the stands as he made his way into the stadium\\'s tunnel while waving a peace sign.Read MoreArians would not share the nature of the conversation he had with Brown and said the last time he saw the receiver was when Brown left the field. The Bucs head coach also said he has not heard from Brown or his representatives. When asked if there was any mental health evaluation performed on Brown before he left the stadium, Arians said he had no idea.Arians said he has no regrets on bringing Brown onto the team and \"hopes the best for him.\" Brown looks on against the New York Jets during the game.Before exiting the game, Brown had three receptions for 26 yards.After the game, Brown tweeted a photo of himself with the cryptic caption \"Super Gremlin.\" He also tweeted a link to his new single, \"Pit Not The Palace\" and posted a series of sponsored images showing himself wearing items from clothing company Fashion Nova on Instagram.The incident comes weeks after Brown said he was suspended in December for three games without pay following a league investigation, which determined he violated Covid-19 protocols.Visit CNN.com/sport for more news, features, and videosThe Pittsburgh Steelers drafted Brown in 2010, and he played for them the first nine seasons of his career. Brown was traded to the then-Oakland Raiders ahead of the 2019 season but was released before playing in a regular season game.Brown then signed with the New England Patriots and played one game before being released again, days after one of his former offseason athletic trainers filed a lawsuit accusing him of rape and assault in 2017 and 2018. Brown denied the allegations and said he would fight to clear his name. The NFL said at the time there was an ongoing investigation into Brown\\'s conduct.Brown signed a one-year deal with the Buccaneers in October 2020 and was part of the Bucs team that won the Super Bowl last season. CNN\\'s Amir Vera, Homero De la Fuente and Jacob Lev contributed to this report.', 'entities': [{'entity_name': 'BRUCE ARIANS', 'entity_type': 'PERSON', 'description': 'Tampa Bay Buccaneers head coach who expresses care for Antonio Brown and hopes for the best for him.', 'importance_score': 0.9}, {'entity_name': 'ANTONIO BROWN', 'entity_type': 'PERSON', 'description': 'Wide receiver for the Tampa Bay Buccaneers who left the game against the New York Jets and had a cryptic tweet after the game.', 'importance_score': 0.9}, {'entity_name': 'TAMPA BAY BUCCANEERS', 'entity_type': 'ORGANIZATION', 'description': 'NFL team that Antonio Brown plays for and Bruce Arians coaches.', 'importance_score': 0.8}, {'entity_name': 'NEW YORK JETS', 'entity_type': 'ORGANIZATION', 'description': 'NFL team that played against the Tampa Bay Buccaneers.', 'importance_score': 0.7}], 'relationships': [{'src_id': 'BRUCE ARIANS', 'tgt_id': 'ANTONIO BROWN', 'description': 'Bruce Arians, the head coach of the Tampa Bay Buccaneers, expresses care for Antonio Brown, the wide receiver, and hopes for the best for him.', 'weight': 0.9, 'order': 1}, {'src_id': 'ANTONIO BROWN', 'tgt_id': 'TAMPA BAY BUCCANEERS', 'description': 'Antonio Brown is a wide receiver for the Tampa Bay Buccaneers.', 'weight': 0.8, 'order': 1}, {'src_id': 'TAMPA BAY BUCCANEERS', 'tgt_id': 'NEW YORK JETS', 'description': 'The Tampa Bay Buccaneers played against the New York Jets in an NFL game.', 'weight': 0.7, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': 'Story highlights Death toll rises to more than 6,200Pemba Tamang, 15, shows no apparent signs of serious injury after rescueU.S. special forces helicopter 30, including 3 Americans, to safetyKathmandu, Nepal (CNN)On Day Six of Nepal\\'s tragedy, life triumphed as rescuers pulled an 15-year-old from the rubble of a multistory residential building in one of Kathmandu\\'s hard-hit neighborhoods.A large crowd erupted in cheers as Pemba Tamang was carried out on a stretcher. He was wearing a New York shirt and a blue neck brace, was blanketed by dust and had the look of a deer in the headlights. His rescuer, Inspector Lakshman Basnet of the Nepalese Armed Police Force, said Tamang was responsive and showed no apparent signs of serious injury. He was given an IV drip and rushed from the Gongapur area to a temporary emergency hospital run by an Israeli aid team. The Nepalese rescuers had been working for five hours to locate Tamang after they heard his voice coming from under the debris.Read MoreGroup helicoptered out by U.S. special forcesAlso Thursday, a U.S. special operations forces team rescued 30 people, including three Americans, by helicopter from an area of Nepal called Bamboo Village, according to the U.S. ambassador to Nepal.The group was trapped in the village and living in a makeshift shelter, Ambassador Peter Bodde said. The families had contacted the U.S. government to let officials know where their relatives were stuck, he said.They had no other way to get out of the area, Bodde said.\\'It\\'s dangerous, but it\\'s what we do\\'An American disaster response team was also involved in the rescue of the 15 year old boy. The team was at a nearby damaged bus station when it got word that someone might be alive. Andrew Olvera, the head of the U.S. team, said his men rushed over with search dogs and equipment ranging from breaching tools to sophisticated cameras that can probe under the rubble. Pemba Tamang being pulled alive from the rubble, five days after a huge earthquake hit Nepal.He said the operation carried enormous risk, as chunks of the collapsed building hung precariously on rebar. Entire floors of what used to be people\\'s homes were visible -- ceiling fans and beds still draped with cotton sheets. It was a mountain of loss and sorrow. \"It\\'s dangerous, but it\\'s what we do,\" said Olvera, who has a daughter and twin 11-year-old boys. \"It\\'s risk versus gain. To save a human life, we will risk almost everything. \"The way the building is, it\\'s definitely a miracle,\" he said. Man \\'survived by good faith\\' Tamang cried for water in a muffled voice. He had been buried for five days under a building that pancaked. He dodged death because of a motorcycle that shielded him from the pressure of the concrete and steel, according to Basnet. Photos: Powerful earthquake hits Nepal Photos: Powerful earthquake hits NepalNepalese police officers clear debris from Durbar Square in Kathmandu on Sunday, May 3. A magnitude-7.8 earthquake centered less than 50 miles from Kathmandu rocked Nepal with devastating force Saturday, April 25. The earthquake and its aftershocks have turned one of the world\\'s most scenic regions into a panorama of devastation, killing and injuring thousands.Hide Caption 1 of 64 Photos: Powerful earthquake hits NepalAn injured Nepalese woman is carried by villagers toward an Indian army helicopter to be airlifted from Philim village in Gorkha district in Nepal on May 3.Hide Caption 2 of 64 Photos: Powerful earthquake hits NepalMembers of the Tsayana family warm themselves next to a fire outside their damaged house on May 3 in Bhaktapur, Nepal.Hide Caption 3 of 64 Photos: Powerful earthquake hits NepalA woman receives comfort during the funeral of her mother, a victim of Nepal\\'s deadly earthquake, on Friday, May 1, in Kathmandu. Hide Caption 4 of 64 Photos: Powerful earthquake hits NepalHindu priests perform rituals during the cremations of victims at the Pashupatinath Temple on the banks of the Bagmati River in Kathmandu on May 1.Hide Caption 5 of 64 Photos: Powerful earthquake hits NepalPeople await aid from an Indian army helicopter in front of damaged homes in Kulgaun, Nepal, on May 1.Hide Caption 6 of 64 Photos: Powerful earthquake hits NepalAn injured woman gets carried on a stretcher at Kathmandu\\'s airport after being evacuated from Melamchi, Nepal, on May 1.Hide Caption 7 of 64 Photos: Powerful earthquake hits NepalA member of the Los Angeles County Fire Department guides his sniffing dog through a collapsed building in Kathmandu on Thursday, April 30.Hide Caption 8 of 64 Photos: Powerful earthquake hits NepalA teenage boy gets rushed to a hospital April 30 after being rescued from the debris of a building in Kathmandu days after the earthquake.Hide Caption 9 of 64 Photos: Powerful earthquake hits NepalA man is freed from the ruins of a hotel by French rescuers in the Gangabu area of Kathmandu on Tuesday, April 28. Reuters identified the man as Rishi Khanal.Hide Caption 10 of 64 Photos: Powerful earthquake hits NepalNepalese military police search through rubble outside Kathmandu on April 28.Hide Caption 11 of 64 Photos: Powerful earthquake hits NepalPeople rest April 28 in a temporary housing camp in Kathmandu. Large encampments of tents have sprung up in open areas, including a wide space belonging to the military in the center of the capital. Hide Caption 12 of 64 Photos: Powerful earthquake hits NepalA family collects belongings from their home in Bhaktapur, Nepal, on Monday, April 27. Hide Caption 13 of 64 Photos: Powerful earthquake hits NepalDamaged buildings lean to the side in Kathmandu on April 27.Hide Caption 14 of 64 Photos: Powerful earthquake hits NepalHide Caption 15 of 64 Photos: Powerful earthquake hits NepalMembers of the Nepalese army retrieve bodies from a collapsed building in Bhaktapur near Kathmandu on April 27.Hide Caption 16 of 64 Photos: Powerful earthquake hits NepalNepalese soldiers carry a wounded woman to a helicopter as they evacuate people from Trishuli Bazar, Nepal, on April 27.Hide Caption 17 of 64 Photos: Powerful earthquake hits NepalPeople charge their cell phones in an open area in Kathmandu on April 27.Hide Caption 18 of 64 Photos: Powerful earthquake hits NepalEmergency personnel evacuate an injured man to a waiting helicopter in Trishuli Bazar on April 27.Hide Caption 19 of 64 Photos: Powerful earthquake hits NepalAn aerial view of the devastation in Kathmandu on April 27. The destruction in Nepal\\'s capital is stark: revered temples reduced to rubble, people buried in the wreckage of their homes, hospitals short on medical supplies overflowing with patients.Hide Caption 20 of 64 Photos: Powerful earthquake hits NepalResidents rescue items from the debris of houses damaged in the quake in Kathmandu on April 27.Hide Caption 21 of 64 Photos: Powerful earthquake hits NepalAn aervial view shows ruined buildings in Trishuli Bazar on April 27.Hide Caption 22 of 64 Photos: Powerful earthquake hits NepalA woman prays at a ruined temple in Kathmandu on April 27.Hide Caption 23 of 64 Photos: Powerful earthquake hits NepalPeople rest in temporary shelters in Kathmandu on April 27.Hide Caption 24 of 64 Photos: Powerful earthquake hits NepalResidents cycle over damaged roads on the outskirts of Kathmandu on Sunday, April 26.Hide Caption 25 of 64 Photos: Powerful earthquake hits NepalFour-month-old Sonit Awal is held up by Nepalese army soldiers after being rescued from the rubble of his house in Bhaktapur, Nepal, on April 26.Hide Caption 26 of 64 Photos: Powerful earthquake hits NepalThe newspaper that provided photographs of the baby\\'s rescue says the Nepalese army initially left the site, thinking the baby had not survived. Hours later when the infant\\'s cries were heard, soldiers came back and rescued him.Hide Caption 27 of 64 Photos: Powerful earthquake hits NepalThe newspaper adds the Nepalese Army had initially failed to rescue the baby and left the site thinking the baby had not survived. Hours later when the baby\\'s cries were heard the army came back and rescued him.Hide Caption 28 of 64 Photos: Powerful earthquake hits NepalA woman cries after identifying the body of a relative in Bhaktapur on April 26.Hide Caption 29 of 64 Photos: Powerful earthquake hits NepalMen clear debris in Bhaktapur on April 26.Hide Caption 30 of 64 Photos: Powerful earthquake hits NepalA truck evacuates residents from Kathmandu on April 26. Hide Caption 31 of 64 Photos: Powerful earthquake hits NepalA Buddha statue is surrounded by debris on April 26 from a collapsed temple in the UNESCO world heritage site of Bhaktapur.Hide Caption 32 of 64 Photos: Powerful earthquake hits NepalAn elderly woman is helped to her home after being treated for her injuries in Bhaktapur on April 26. Hide Caption 33 of 64 Photos: Powerful earthquake hits NepalFamily members break down on April 26 during the cremation of a loved one killed in\\xa0Bhaktapur. Hide Caption 34 of 64 Photos: Powerful earthquake hits NepalSmoke from funeral pyres fills the air at the Pashupatinath temple on the banks of Bagmati River in Kathmandu on April 26.Hide Caption 35 of 64 Photos: Powerful earthquake hits NepalMembers of India\\'s National Disaster Response Force look for survivors in Kathmandu on April 26. Hide Caption 36 of 64 Photos: Powerful earthquake hits NepalRescue workers remove debris on April 26 as they search for victims in Bhaktapur.Hide Caption 37 of 64 Photos: Powerful earthquake hits NepalPeople look at the debris of one of the oldest temples in Kathmandu on April 26.Hide Caption 38 of 64 Photos: Powerful earthquake hits NepalPeople sleep on a street in Kathmandu, Nepal, on Saturday, April 25. A seemingly endless series of aftershocks continued to roil the area, further traumatizing survivors. Hide Caption 39 of 64 Photos: Powerful earthquake hits NepalCivilian rescuers carry a person on a stretcher in Kathmandu on April 25.Hide Caption 40 of 64 Photos: Powerful earthquake hits NepalPeople try to free a man from the rubble in Kathmandu on April 25. Cheers rose from the piles when people were found alive -- but mostly bodies turned up. Hide Caption 41 of 64 Photos: Powerful earthquake hits NepalPedestrians walk past collapsed buildings in Kathmandu on April 25.Hide Caption 42 of 64 Photos: Powerful earthquake hits NepalAzim Afif, of the Universiti Teknologi Malaysia climbing team, provided this photo of their Mount Everest base camp after it was ravaged by an avalanche triggered by the earthquake on April 25. All of Afif\\'s five-member team survived.Hide Caption 43 of 64 Photos: Powerful earthquake hits NepalRescuers clear rubble in Kathmandu\\'s Basantapur Durbar Square on April 25.Hide Caption 44 of 64 Photos: Powerful earthquake hits NepalA temple on Hanumandhoka Durbar Square lies in ruins after an earthquake in Kathmandu on April 25. Hide Caption 45 of 64 Photos: Powerful earthquake hits NepalDharahara, a tower dating back to 1832 that rose more than 60 meters (200 feet) and provided breathtaking views of Kathmandu and the surrounding Himalayas, collapsed in the earthquake on April 25.Hide Caption 46 of 64 Photos: Powerful earthquake hits NepalThe hand of a statue is seen under debris in Basantapur Durbar Square in Kathmandu.Hide Caption 47 of 64 Photos: Powerful earthquake hits NepalA Nepalese man and woman hold each other in Kathmandu\\'s Basantapur Durbar Square on April 25.Hide Caption 48 of 64 Photos: Powerful earthquake hits NepalA victim of Nepal\\'s earthquake lies in the debris of Dharahara after it collapsed on April 25 in Kathmandu, Nepal. Hide Caption 49 of 64 Photos: Powerful earthquake hits NepalRescuers look for victims under a collapsed building in Kathmandu on April 25. Hide Caption 50 of 64 Photos: Powerful earthquake hits NepalVolunteers carry a body recovered from the debris of a collapsed building in Kathmandu.Hide Caption 51 of 64 Photos: Powerful earthquake hits NepalA victim\\'s body is seen in the debris of the collapsed Dharahara on April 25. Hide Caption 52 of 64 Photos: Powerful earthquake hits NepalEmergency rescue workers carry a victim from Dharahara after the tower in Kathmandu collapsed on April 25. Hide Caption 53 of 64 Photos: Powerful earthquake hits NepalPeople free a man from the rubble of a destroyed building in Kathmandu.Hide Caption 54 of 64 Photos: Powerful earthquake hits NepalA man walks past a collapsed temple at Basantapur Durbar Square.Hide Caption 55 of 64 Photos: Powerful earthquake hits NepalRescue workers clear debris in Kathmandu while searching for survivors.Hide Caption 56 of 64 Photos: Powerful earthquake hits NepalPeople huddle together outside a hospital in Kathmandu. Eyewitnesses said residents were scared and waiting for aftershocks to end.Hide Caption 57 of 64 Photos: Powerful earthquake hits NepalPeople search for survivors stuck under the rubble of a destroyed building in Kathmandu.Hide Caption 58 of 64 Photos: Powerful earthquake hits NepalInjured people receive treatment in Kathmandu. A CNN reporter said medics were focused on treating the most severely injured.Hide Caption 59 of 64 Photos: Powerful earthquake hits NepalEmergency rescue workers search for survivors in the debris of Dharahara on April 25.Hide Caption 60 of 64 Photos: Powerful earthquake hits NepalAn injured child lies on the ground outside a hospital in Kathmandu on April 25.Hide Caption 61 of 64 Photos: Powerful earthquake hits NepalPeople help with rescue efforts at the site of a collapsed building in Kathmandu.Hide Caption 62 of 64 Photos: Powerful earthquake hits NepalAn injured child receives treatment outside Medicare Hospital in Kathmandu on April 25. Residents, after a relentless series of aftershocks, have been remaining outdoors.Hide Caption 63 of 64 Photos: Powerful earthquake hits NepalThe rubble of collapsed walls fills a street in Lalitpur, on the outskirts of Kathmandu, on April 25.Hide Caption 64 of 64And, Basnet said, he \"survived by good faith.\" Dennis Bautista, who went down to where Tamang was buried to administer medical aid, called the rescue amazing. \"It feels good to be able to help out. I can\\'t imagine what he went through,\" Bautista said. \"He is a brave young man.\" Basnet said once he got closer to Tamang, he tried to reassure him that he would be OK. \"I gave him water and talked to him regularly,\" Basnet said. Rescuers continue searchAfter Tamang was rushed to the hospital, the US Agency for International Development team continued the search. The possibility remained that someone else might have survived, like Tamang. Other search and rescue teams continued to scour through Kathmandu\\'s rubble Thursday. They are looking for survivors from the magnitude-7.8 earthquake that struck Saturday, killing at least 6,204 people and wounding almost 14,000, according to Nepali authorities. Another 72 people were reported dead in India and 25 in China.JUST WATCHEDEverest earthquake puts Nepal\\'s economy at riskReplayMore Videos ...MUST WATCHEverest earthquake puts Nepal\\'s economy at risk 02:22In Nepal, 19 of the deaths occurred on Mount Everest, where the quake triggered deadly avalanches. Despite the disaster, Nepali authorities plans to reopen routes up the mountain as soon as next week.Teams are clearing paths and and rebuilding ladders, Tourism Ministry spokesman Krishna Sapkota told CNN on Thursday. Officials are encouraging people who have already received permission to climb this season to go ahead with their plans.As the chances dimmed for finding people alive in the wreckage left by the quake across Nepal, Tamang\\'s rescue boosted hopes for all those who still have loved ones and friends missing. Other people have been saved from under collapsed buildings in previous days, including a 27-year-old man on Tuesday and a 4-month-old boy on Sunday. The Nepali military also released a photo of a dust-caked 11-year-old girl who they said was rescued Wednesday after 90 hours under the rubble.The rescuers, meanwhile, have no intention of giving up looking for more. The 2010 earthquake in Haiti, Olvera said, revised the benchmark for what was thought possible for survival. A man there was miraculously pulled from the rubble after 27 long days.360-degree view of earthquake zoneFollow @CNNbrk\\n\\n CNN\\'s Sugam Pokharel contributed to this report.', 'entities': [{'entity_name': 'PEMBA TAMANG', 'entity_type': 'PERSON', 'description': 'A 15-year-old boy rescued from the rubble of a multistory residential building in Kathmandu.', 'importance_score': 0.9}, {'entity_name': 'KATHMANDU', 'entity_type': 'LOCATION', 'description': 'A city in Nepal where the earthquake caused significant damage.', 'importance_score': 0.8}, {'entity_name': 'NEPAL', 'entity_type': 'LOCATION', 'description': 'The country where the earthquake occurred, causing widespread devastation.', 'importance_score': 0.9}, {'entity_name': 'U.S. SPECIAL FORCES', 'entity_type': 'ORGANIZATION', 'description': 'A team that rescued 30 people, including three Americans, by helicopter from Bamboo Village.', 'importance_score': 0.7}, {'entity_name': 'INSPECTOR LAKSHMAN BASNET', 'entity_type': 'PERSON', 'description': 'A rescuer from the Nepalese Armed Police Force who helped save Pemba Tamang.', 'importance_score': 0.7}, {'entity_name': 'BAMBOO VILLAGE', 'entity_type': 'LOCATION', 'description': 'An area in Nepal where a group of people, including Americans, were trapped and later rescued by U.S. special forces.', 'importance_score': 0.6}, {'entity_name': 'ANDREW OLVERA', 'entity_type': 'PERSON', 'description': 'The head of the U.S. disaster response team involved in the rescue of Pemba Tamang.', 'importance_score': 0.6}, {'entity_name': 'DENNIS BAUTISTA', 'entity_type': 'PERSON', 'description': 'A person who administered medical aid to Pemba Tamang after his rescue.', 'importance_score': 0.5}], 'relationships': [{'src_id': 'PEMBA TAMANG', 'tgt_id': 'INSPECTOR LAKSHMAN BASNET', 'description': 'Pemba Tamang was rescued by Inspector Lakshman Basnet.', 'weight': 0.9, 'order': 1}, {'src_id': 'U.S. SPECIAL FORCES', 'tgt_id': 'BAMBOO VILLAGE', 'description': 'U.S. special forces rescued people from Bamboo Village.', 'weight': 0.8, 'order': 1}, {'src_id': 'ANDREW OLVERA', 'tgt_id': 'PEMBA TAMANG', 'description': \"Andrew Olvera's team was involved in the rescue of Pemba Tamang.\", 'weight': 0.7, 'order': 1}, {'src_id': 'DENNIS BAUTISTA', 'tgt_id': 'PEMBA TAMANG', 'description': 'Dennis Bautista administered medical aid to Pemba Tamang after his rescue.', 'weight': 0.6, 'order': 1}]}) (input_keys={'input_text'})]" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "valset[:5]" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 49 chunks, 320 entities(duplicated), 222 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 50 chunks, 323 entities(duplicated), 224 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 51 chunks, 328 entities(duplicated), 227 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 53 chunks, 338 entities(duplicated), 234 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 54 chunks, 345 entities(duplicated), 238 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 55 chunks, 352 entities(duplicated), 244 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 56 chunks, 359 entities(duplicated), 249 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 57 chunks, 367 entities(duplicated), 253 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 58 chunks, 377 entities(duplicated), 259 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 59 chunks, 387 entities(duplicated), 268 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 60 chunks, 397 entities(duplicated), 276 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 61 chunks, 413 entities(duplicated), 281 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 63 chunks, 421 entities(duplicated), 287 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 65 chunks, 430 entities(duplicated), 294 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 66 chunks, 445 entities(duplicated), 303 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 67 chunks, 460 entities(duplicated), 316 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 68 chunks, 468 entities(duplicated), 323 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 69 chunks, 474 entities(duplicated), 326 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 70 chunks, 490 entities(duplicated), 334 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 71 chunks, 505 entities(duplicated), 348 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠹ Processed 72 chunks, 510 entities(duplicated), 351 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 74 chunks, 521 entities(duplicated), 359 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 75 chunks, 528 entities(duplicated), 362 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 76 chunks, 537 entities(duplicated), 365 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 78 chunks, 558 entities(duplicated), 380 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 79 chunks, 565 entities(duplicated), 385 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 80 chunks, 573 entities(duplicated), 391 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 81 chunks, 577 entities(duplicated), 394 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠹ Processed 82 chunks, 582 entities(duplicated), 397 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 83 chunks, 593 entities(duplicated), 406 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 84 chunks, 601 entities(duplicated), 411 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 85 chunks, 608 entities(duplicated), 417 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 86 chunks, 618 entities(duplicated), 426 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 87 chunks, 623 entities(duplicated), 430 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 88 chunks, 633 entities(duplicated), 439 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 90 chunks, 646 entities(duplicated), 448 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 91 chunks, 657 entities(duplicated), 455 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠹ Processed 92 chunks, 662 entities(duplicated), 459 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 93 chunks, 667 entities(duplicated), 462 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 94 chunks, 673 entities(duplicated), 466 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 95 chunks, 677 entities(duplicated), 468 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 96 chunks, 688 entities(duplicated), 474 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 97 chunks, 692 entities(duplicated), 476 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 98 chunks, 703 entities(duplicated), 485 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 99 chunks, 736 entities(duplicated), 499 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 100 chunks, 746 entities(duplicated), 504 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 101 chunks, 760 entities(duplicated), 517 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠹ Processed 102 chunks, 765 entities(duplicated), 521 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 103 chunks, 770 entities(duplicated), 525 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 104 chunks, 776 entities(duplicated), 528 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 106 chunks, 788 entities(duplicated), 537 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 107 chunks, 794 entities(duplicated), 541 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 109 chunks, 809 entities(duplicated), 552 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 110 chunks, 813 entities(duplicated), 555 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 111 chunks, 820 entities(duplicated), 561 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠹ Processed 112 chunks, 823 entities(duplicated), 563 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 114 chunks, 838 entities(duplicated), 571 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 115 chunks, 844 entities(duplicated), 574 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 116 chunks, 855 entities(duplicated), 578 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 117 chunks, 858 entities(duplicated), 579 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 118 chunks, 871 entities(duplicated), 590 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 119 chunks, 876 entities(duplicated), 590 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 120 chunks, 882 entities(duplicated), 596 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "�� Processed 121 chunks, 890 entities(duplicated), 598 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠹ Processed 122 chunks, 893 entities(duplicated), 600 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 123 chunks, 900 entities(duplicated), 615 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 124 chunks, 915 entities(duplicated), 620 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 125 chunks, 921 entities(duplicated), 624 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 126 chunks, 924 entities(duplicated), 627 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 128 chunks, 937 entities(duplicated), 636 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 129 chunks, 950 entities(duplicated), 644 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 130 chunks, 961 entities(duplicated), 648 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 131 chunks, 967 entities(duplicated), 653 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠹ Processed 132 chunks, 972 entities(duplicated), 654 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 133 chunks, 977 entities(duplicated), 658 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 134 chunks, 983 entities(duplicated), 663 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 135 chunks, 988 entities(duplicated), 667 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 136 chunks, 992 entities(duplicated), 670 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 137 chunks, 996 entities(duplicated), 671 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 138 chunks, 1010 entities(duplicated), 680 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 139 chunks, 1014 entities(duplicated), 683 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 140 chunks, 1021 entities(duplicated), 689 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 141 chunks, 1024 entities(duplicated), 690 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 143 chunks, 1032 entities(duplicated), 695 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 144 chunks, 1039 entities(duplicated), 699 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 145 chunks, 1045 entities(duplicated), 704 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 146 chunks, 1050 entities(duplicated), 708 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 147 chunks, 1054 entities(duplicated), 710 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 148 chunks, 1062 entities(duplicated), 716 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 149 chunks, 1066 entities(duplicated), 719 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 150 chunks, 1073 entities(duplicated), 725 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 151 chunks, 1083 entities(duplicated), 730 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠹ Processed 152 chunks, 1089 entities(duplicated), 735 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 153 chunks, 1099 entities(duplicated), 740 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 154 chunks, 1103 entities(duplicated), 742 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 155 chunks, 1108 entities(duplicated), 745 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 156 chunks, 1112 entities(duplicated), 746 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 157 chunks, 1118 entities(duplicated), 750 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 158 chunks, 1124 entities(duplicated), 753 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 159 chunks, 1128 entities(duplicated), 756 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 160 chunks, 1139 entities(duplicated), 766 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 161 chunks, 1145 entities(duplicated), 769 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠹ Processed 162 chunks, 1152 entities(duplicated), 775 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 163 chunks, 1156 entities(duplicated), 778 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 164 chunks, 1174 entities(duplicated), 795 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 165 chunks, 1177 entities(duplicated), 797 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 166 chunks, 1184 entities(duplicated), 801 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 167 chunks, 1192 entities(duplicated), 805 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 168 chunks, 1219 entities(duplicated), 824 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 169 chunks, 1230 entities(duplicated), 832 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 170 chunks, 1235 entities(duplicated), 837 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠙ Processed 171 chunks, 1253 entities(duplicated), 842 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠹ Processed 172 chunks, 1255 entities(duplicated), 843 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠸ Processed 173 chunks, 1263 entities(duplicated), 849 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠴ Processed 175 chunks, 1285 entities(duplicated), 864 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠦ Processed 176 chunks, 1294 entities(duplicated), 868 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠧ Processed 177 chunks, 1301 entities(duplicated), 873 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠇ Processed 178 chunks, 1308 entities(duplicated), 875 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠏ Processed 179 chunks, 1316 entities(duplicated), 882 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 180 chunks, 1319 entities(duplicated), 882 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠼ Processed 184 chunks, 1352 entities(duplicated), 903 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n", + "INFO:httpx:HTTP Request: POST https://api.deepseek.com/chat/completions \"HTTP/1.1 200 OK\"\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "⠋ Processed 200 chunks, 1470 entities(duplicated), 982 relations(duplicated)\r" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:nano-graphrag:Saved 197 examples with keys: ['input_text', 'entities', 'relationships'], filtered 3 examples\n" + ] + } + ], + "source": [ + "dev_chunks = {compute_mdhash_id(text, prefix=f\"chunk-devset-\"): {\"content\": text} for text in dev_data[\"text\"]}\n", + "devset = asyncio.run(generate_dataset(chunks=dev_chunks, filepath=entity_relationship_devset_path))" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Example({'input_text': \"As students from Marjory Stoneman Douglas High School confront lawmakers with demands to restrict sales of assault rifles, there were warnings by the president of the Florida school administration association that schools in the state were vulnerable to such an attack.\\nHighlights\\n“Nikolas Cruz was able to purchase an assault rifle before he was able to buy a beer,” said Stoneman Douglas student Laurenzo Prado, referring to a Florida law that allows people as young as 18 to buy assault weapons. Students galvanized by the deadly mass shooting at the Florida high school confronted lawmakers with demands to restrict sales of assault rifles, while President Donald Trump suggested arming teachers as a way to stop more U.S. rampages.\\nTwo weeks before a gunman fatally shot 17 people at a Florida high school, Bill Lee, the president of the state’s school administrators association, warned that Florida’s schools were vulnerable to just such an attack. “It’s not a matter of if, but when,” he wrote in the Orlando Sentinel on Jan. 29, calling on legislators to increase school security spending after two January school shootings in other states.\\nWorld\\nU.S. players pose for a photo as they celebrate their victory over Canada. REUTERS/Grigory Dukor She’s practiced the ‘Oops, I did it again’ thousands of times in training, and her signature trick was worth its weight in Olympic gold as American Jocelyne Lamoureux-Davidson’s shootout winner broke a Canadian 16-year stranglehold on the women’s ice hockey title. It was the perfect jaw-dropping finale to a game that was billed as a grudge match but swiftly developed into a classic for the ages at the Pyeongchang Winter Games.\\nWarplanes pounded the last rebel enclave near the Syrian capital for a fifth straight day, as the United Nations pleaded for a truce to halt one of the fiercest air assaults of the seven-year civil war and prevent a “massacre” .\\nBangladesh is racing to turn an uninhabited and muddy Bay of Bengal island into home for 100,000 Rohingya Muslims who have fled a military crackdown in Myanmar , amid conflicting signals from top Bangladeshi officials about whether the refugees would end up being stranded there.\\nCommentary\\nNorth Korea’s participation in the 2018 Winter Olympics has created an opening for renewed dialogue with the United States and South Korea, writes Peter App s. “By taking part so visibly alongside South Korea, Pyongyang has been able to present itself as a credible global and regional power in a way that has eluded North Korean leaders since the war that divided the peninsula. The real strategic winner, however, is the South Korean government, which has shrewdly used the games to reshape the diplomatic landscape.”\\nBusiness\\nLast March, executives at General Electric's power-plant business gave Wall Street a surprisingly bullish forecast for the year. Despite flat demand for new natural gas power plants, they said, GE Power’s revenue and profit would rise. But GE’s forecast turned out to be a mirage .\\nMexican buyers imported ten times more corn from Brazil last year amid concern that NAFTA renegotiations could disrupt their U.S. supplies, according to government data and top grains merchants.\\nWarren Buffett may use part of his annual letter to Berkshire Hathaway shareholders, due on Saturday , to renew his optimism about America, at a time economic growth is on the upswing and U.S. stocks sit near record highs despite rising interest rates.\\nWorld stocks tumbled to one-week lows after the U.S. Fed confirmed it was on track to raise interest rates several times this year, sending bond yields to new multi-year highs.\\nTop stories on Reuters TV\\n'Hand grenade' thrown at U.S. embassy in Montenegro\\nGM's potential Korea exit piles pressure on Moon Jae-in\\n \", 'entities': [{'entity_name': 'MARJORY STONEMAN DOUGLAS HIGH SCHOOL', 'entity_type': 'ORGANIZATION', 'description': 'A high school in Florida where students confronted lawmakers about restricting sales of assault rifles.', 'importance_score': 0.9}, {'entity_name': 'NIKOLAS CRUZ', 'entity_type': 'PERSON', 'description': 'A person who was able to purchase an assault rifle before he was able to buy a beer, according to a Florida law.', 'importance_score': 0.8}, {'entity_name': 'LAURENZO PRADO', 'entity_type': 'PERSON', 'description': \"A student from Marjory Stoneman Douglas High School who mentioned Nikolas Cruz's ability to purchase an assault rifle.\", 'importance_score': 0.7}, {'entity_name': 'FLORIDA', 'entity_type': 'LOCATION', 'description': 'A state in the United States where the events related to the high school and gun control are taking place.', 'importance_score': 0.8}, {'entity_name': 'BILL LEE', 'entity_type': 'PERSON', 'description': \"The president of the Florida school administrators association who warned about the vulnerability of Florida's schools to attacks.\", 'importance_score': 0.7}, {'entity_name': 'ORLANDO SENTINEL', 'entity_type': 'ORGANIZATION', 'description': 'A newspaper where Bill Lee wrote about the need for increased school security spending.', 'importance_score': 0.6}, {'entity_name': 'DONALD TRUMP', 'entity_type': 'PERSON', 'description': 'The President of the United States who suggested arming teachers as a way to stop more U.S. rampages.', 'importance_score': 0.8}, {'entity_name': 'GENERAL ELECTRIC', 'entity_type': 'ORGANIZATION', 'description': 'A company whose power-plant business gave a surprisingly bullish forecast for the year, which turned out to be a mirage.', 'importance_score': 0.6}, {'entity_name': 'WARREN BUFFETT', 'entity_type': 'PERSON', 'description': 'An investor who may use his annual letter to Berkshire Hathaway shareholders to renew his optimism about America.', 'importance_score': 0.7}], 'relationships': [{'src_id': 'MARJORY STONEMAN DOUGLAS HIGH SCHOOL', 'tgt_id': 'FLORIDA', 'description': 'Students from Marjory Stoneman Douglas High School are located in the state of Florida.', 'weight': 0.9, 'order': 1}, {'src_id': 'NIKOLAS CRUZ', 'tgt_id': 'ASSAULT RIFLE', 'description': 'Nikolas Cruz was able to purchase an assault rifle before he was able to buy a beer.', 'weight': 0.8, 'order': 1}, {'src_id': 'LAURENZO PRADO', 'tgt_id': 'NIKOLAS CRUZ', 'description': \"Laurenzo Prado, a student, mentioned Nikolas Cruz's ability to purchase an assault rifle.\", 'weight': 0.7, 'order': 1}, {'src_id': 'BILL LEE', 'tgt_id': \"FLORIDA'S SCHOOLS\", 'description': \"Bill Lee warned that Florida's schools were vulnerable to attacks.\", 'weight': 0.7, 'order': 1}, {'src_id': 'DONALD TRUMP', 'tgt_id': 'ARMING TEACHERS', 'description': 'Donald Trump suggested arming teachers as a way to stop more U.S. rampages.', 'weight': 0.8, 'order': 1}, {'src_id': 'GENERAL ELECTRIC', 'tgt_id': 'POWER-PLANT BUSINESS', 'description': \"General Electric's power-plant business gave a surprisingly bullish forecast for the year.\", 'weight': 0.6, 'order': 1}, {'src_id': 'WARREN BUFFETT', 'tgt_id': 'BERKSHIRE HATHAWAY', 'description': 'Warren Buffett may use his annual letter to Berkshire Hathaway shareholders to renew his optimism about America.', 'weight': 0.7, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': 'From ferrying people to and from their place of work to transporting nuclear waste and coal, railways are not only an integral part of 21st century life but have played a crucial role in shaping the modern world.\\nIn Belgium, one business is looking to use innovation to drive further change in the sector. Based in Brussels, Railnova is a technology company whose clients include Deutsche Bahn and French rail operator SNCF.\\nAccording to its CEO and founder Christian Sprauer, Railnova offers train operators the ability to be alerted to issues before failures occur.\\nA device designed and manufactured by the business is fitted to a train. The box gathers a host of data, a subset of which is sent to the cloud where it can be analyzed.\\n\"Before, they would have to wait until the failure happens and bring the train to the workshop,\" Sprauer said. \"Now… they can be alerted up front and they can avoid certain failures and… react much faster to other failures.\"\\nInnovation is being used across the rail industry to improve services. Instead of buying paper tickets, rail users in London can now touch their debit or credit cards on to sensors to pay for their journey. In China and Japan, magnetic levitation — or Maglev — trains offer a tantalizing glimpse of the high-speed rail travel that could be just around the corner.\\nExamples of the solutions offered by the Railnova technology range from measuring engine speed and braking force, to measuring traction force. Energy consumption was another area of interest, with Sprauer stating it was a good predictor of whether there was a problem with a train or not.\\nThe wealth of data being mined could, Sprauer said, offer a number of benefits. Reducing energy consumption was one such example. On diesel trains, he said, energy consumption could be cut by coaching drivers on best driving practices.\\n\"We call this the \\'golden run\\'… every driver tries to achieve the golden run and, as a whole, the company reduces… fuel expenses by 5 percent.\"\\nFollow CNBC International on Twitter and Facebook .', 'entities': [{'entity_name': 'RAILNOVA', 'entity_type': 'ORGANIZATION', 'description': 'A technology company based in Brussels whose clients include Deutsche Bahn and French rail operator SNCF.', 'importance_score': 0.9}, {'entity_name': 'DEUTSCHE BAHN', 'entity_type': 'ORGANIZATION', 'description': 'A client of Railnova, a German railway company.', 'importance_score': 0.8}, {'entity_name': 'SNCF', 'entity_type': 'ORGANIZATION', 'description': 'A client of Railnova, a French rail operator.', 'importance_score': 0.8}, {'entity_name': 'CHRISTIAN SPRAUER', 'entity_type': 'PERSON', 'description': 'The CEO and founder of Railnova.', 'importance_score': 0.9}, {'entity_name': 'BRUSSELS', 'entity_type': 'LOCATION', 'description': 'The location where Railnova is based.', 'importance_score': 0.7}, {'entity_name': 'LONDON', 'entity_type': 'LOCATION', 'description': 'A location where rail users can now touch their debit or credit cards on sensors to pay for their journey.', 'importance_score': 0.7}, {'entity_name': 'CHINA', 'entity_type': 'LOCATION', 'description': 'A country where magnetic levitation trains are being used.', 'importance_score': 0.7}, {'entity_name': 'JAPAN', 'entity_type': 'LOCATION', 'description': 'A country where magnetic levitation trains are being used.', 'importance_score': 0.7}, {'entity_name': 'MAGLEV', 'entity_type': 'TECHNOLOGY', 'description': 'Magnetic levitation trains that offer high-speed rail travel.', 'importance_score': 0.8}], 'relationships': [{'src_id': 'RAILNOVA', 'tgt_id': 'DEUTSCHE BAHN', 'description': 'Railnova provides technology solutions to Deutsche Bahn.', 'weight': 0.9, 'order': 1}, {'src_id': 'RAILNOVA', 'tgt_id': 'SNCF', 'description': 'Railnova provides technology solutions to SNCF.', 'weight': 0.9, 'order': 1}, {'src_id': 'CHRISTIAN SPRAUER', 'tgt_id': 'RAILNOVA', 'description': 'Christian Sprauer is the CEO and founder of Railnova.', 'weight': 1.0, 'order': 1}, {'src_id': 'RAILNOVA', 'tgt_id': 'BRUSSELS', 'description': 'Railnova is based in Brussels.', 'weight': 0.8, 'order': 1}, {'src_id': 'LONDON', 'tgt_id': 'DEBIT CARD', 'description': 'In London, rail users can touch their debit cards on sensors to pay for their journey.', 'weight': 0.7, 'order': 2}, {'src_id': 'LONDON', 'tgt_id': 'CREDIT CARD', 'description': 'In London, rail users can touch their credit cards on sensors to pay for their journey.', 'weight': 0.7, 'order': 2}, {'src_id': 'CHINA', 'tgt_id': 'MAGLEV', 'description': 'In China, magnetic levitation trains are being used.', 'weight': 0.8, 'order': 1}, {'src_id': 'JAPAN', 'tgt_id': 'MAGLEV', 'description': 'In Japan, magnetic levitation trains are being used.', 'weight': 0.8, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': \"Jan 22 (Reuters) - Shanghai Stock Exchange Filing\\n* SHOWS BLOCK TRADE OF YONGHUI SUPERSTORES Co LTd's 166.3 MILLION SHARES INVOLVING 1.63 BILLION YUAN ($254.68 million) ON JAN 22 Source text in Chinese: bit.ly/2yJZikT Further company coverage: ($1 = 6.4003 Chinese yuan renminbi) (Reporting by Hong Kong newsroom)\\n \", 'entities': [{'entity_name': 'YONGHUI SUPERSTORES CO LTD', 'entity_type': 'ORGANIZATION', 'description': 'YONGHUI SUPERSTORES Co LTd is involved in a block trade of 166.3 million shares.', 'importance_score': 1.0}, {'entity_name': '166.3 MILLION SHARES', 'entity_type': 'MONEY', 'description': '166.3 million shares are being traded in the block trade involving YONGHUI SUPERSTORES Co LTd.', 'importance_score': 0.9}, {'entity_name': '1.63 BILLION YUAN', 'entity_type': 'MONEY', 'description': 'The block trade involves 1.63 billion yuan ($254.68 million).', 'importance_score': 0.9}, {'entity_name': 'JAN 22', 'entity_type': 'DATE', 'description': 'The block trade occurred on January 22.', 'importance_score': 0.8}, {'entity_name': 'SHANGHAI STOCK EXCHANGE', 'entity_type': 'ORGANIZATION', 'description': 'The block trade was filed with the Shanghai Stock Exchange.', 'importance_score': 0.8}], 'relationships': [{'src_id': 'YONGHUI SUPERSTORES CO LTD', 'tgt_id': '166.3 MILLION SHARES', 'description': 'YONGHUI SUPERSTORES Co LTd is involved in a block trade of 166.3 million shares.', 'weight': 1.0, 'order': 1}, {'src_id': '166.3 MILLION SHARES', 'tgt_id': '1.63 BILLION YUAN', 'description': 'The block trade of 166.3 million shares involves 1.63 billion yuan.', 'weight': 1.0, 'order': 1}, {'src_id': 'SHANGHAI STOCK EXCHANGE', 'tgt_id': 'YONGHUI SUPERSTORES CO LTD', 'description': 'The block trade involving YONGHUI SUPERSTORES Co LTd was filed with the Shanghai Stock Exchange.', 'weight': 0.9, 'order': 1}, {'src_id': 'JAN 22', 'tgt_id': 'YONGHUI SUPERSTORES CO LTD', 'description': 'The block trade involving YONGHUI SUPERSTORES Co LTd occurred on January 22.', 'weight': 0.8, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': 'LONDON (Reuters) - Britain’s economy was weaker than previously thought in 2017, official data showed on Thursday, leaving the country lagging further behind the global recovery as it prepares to leave the European Union.\\nThe downgrade of the full-year and fourth-quarter growth rates also raised questions about the strength of the economy as the Bank of England prepares to raise interest rates.\\nGross domestic product growth slowed to a quarterly 0.4 percent from a previous estimate of 0.5 percent, wrong-footing economists and reducing 2017 growth as a whole to 1.7 percent, its lowest since 2012.\\nRelated Coverage UK retail sales growth eases further in February: CBI This was still stronger than most economists feared immediately after Britain voted to leave the EU in June 2016.\\nBut the country has relied heavily on the unexpectedly robust global economy to sustain its economic growth while consumers have been squeezed by higher inflation caused by the fall in the pound after the Brexit vote.\\nSterling was little changed after Thursday’s data and government bond prices rose slightly.\\nAlan Clarke, an economist at Scotiabank, said the figures showed Britain’s economy was growing at roughly the pace the BoE sees its new, lower speed limit, meaning a rate hike was still on the cards.\\nBut Samuel Tombs, at Pantheon Macroeconomics, said the data showed the central bank should delay any action for now.\\n“The latest GDP data suggest that the economy remains in a fragile state and does not need to be cooled with another rate rise as soon as May,” he said in a note to clients.\\nBoE Governor Mark Carney said this month that rates would probably need to rise sooner and by somewhat more than the central bank had thought in November, when it raised borrowing costs for the first time in a decade.\\nMost economists think rates will rise again in May, and financial markets expect a further increase, to 1 percent, by the end of the year.\\nLAGGARD UK Britain’s year-on-year economic growth of 1.4 percent in the last three months of 2017 was not just its weakest in five years but also the weakest of any of the economies in the Group of Seven, including long-term laggards such as Japan and Italy.\\nThere were only limited signs of a rebalancing of the economy away from consumer demand and toward business investment and net trade that Carney pointed to as positive signs in an appearance before lawmakers on Wednesday.\\nBusiness investment was flat on the quarter and 2.1 percent higher on the year, both readings coming in weaker than expected in a Reuters poll of economists. Net trade dragged on growth in most quarters of 2017, though it was positive on the year.\\nThe BoE said earlier this month that it expected the economy would grow by 1.8 percent this year, faster than its previous forecast of 1.6 percent, mostly because of the strength of the global economy.\\nReporting by David Milliken; Editing by Toby Chopra\\n ', 'entities': [{'entity_name': 'BRITAIN', 'entity_type': 'LOCATION', 'description': 'The country whose economy was weaker than previously thought in 2017.', 'importance_score': 0.9}, {'entity_name': 'EUROPEAN UNION', 'entity_type': 'ORGANIZATION', 'description': 'The political and economic union that Britain is preparing to leave.', 'importance_score': 0.8}, {'entity_name': 'BANK OF ENGLAND', 'entity_type': 'ORGANIZATION', 'description': 'The central bank of the United Kingdom, preparing to raise interest rates.', 'importance_score': 0.8}, {'entity_name': 'ALAN CLARKE', 'entity_type': 'PERSON', 'description': 'An economist at Scotiabank, commenting on the economic figures.', 'importance_score': 0.7}, {'entity_name': 'SAMUEL TOMBS', 'entity_type': 'PERSON', 'description': 'An economist at Pantheon Macroeconomics, suggesting the central bank should delay any action.', 'importance_score': 0.7}, {'entity_name': 'MARK CARNEY', 'entity_type': 'PERSON', 'description': 'The Governor of the Bank of England, stating that rates would probably need to rise sooner.', 'importance_score': 0.8}, {'entity_name': 'SCOTIABANK', 'entity_type': 'ORGANIZATION', 'description': 'A financial institution where Alan Clarke works as an economist.', 'importance_score': 0.6}, {'entity_name': 'PANTHEON MACROECONOMICS', 'entity_type': 'ORGANIZATION', 'description': 'A macroeconomic research firm where Samuel Tombs works as an economist.', 'importance_score': 0.6}], 'relationships': [{'src_id': 'BRITAIN', 'tgt_id': 'EUROPEAN UNION', 'description': 'Britain is preparing to leave the European Union.', 'weight': 0.9, 'order': 1}, {'src_id': 'BANK OF ENGLAND', 'tgt_id': 'INTEREST RATES', 'description': 'The Bank of England is preparing to raise interest rates.', 'weight': 0.8, 'order': 1}, {'src_id': 'ALAN CLARKE', 'tgt_id': 'BANK OF ENGLAND', 'description': \"Alan Clarke, an economist at Scotiabank, comments on the Bank of England's potential rate hike.\", 'weight': 0.7, 'order': 2}, {'src_id': 'SAMUEL TOMBS', 'tgt_id': 'BANK OF ENGLAND', 'description': 'Samuel Tombs, an economist at Pantheon Macroeconomics, suggests the Bank of England should delay any action.', 'weight': 0.7, 'order': 2}, {'src_id': 'MARK CARNEY', 'tgt_id': 'BANK OF ENGLAND', 'description': 'Mark Carney, the Governor of the Bank of England, states that rates would probably need to rise sooner.', 'weight': 0.8, 'order': 1}]}) (input_keys={'input_text'}),\n", + " Example({'input_text': \"Trump taps White House doctor as new VA secretary 2 Hours Ago CNBC's Kayla Tausche reports President Trump has tapped White House physician Rear Admiral Ronny Jackson to run the Department of Veterans Affairs amid a shakeup at the White House.\", 'entities': [{'entity_name': 'TRUMP', 'entity_type': 'PERSON', 'description': 'President Trump who tapped Ronny Jackson as new VA secretary.', 'importance_score': 1.0}, {'entity_name': 'WHITE HOUSE', 'entity_type': 'ORGANIZATION', 'description': 'The White House where Ronny Jackson is a physician.', 'importance_score': 0.8}, {'entity_name': 'VA', 'entity_type': 'ORGANIZATION', 'description': 'Department of Veterans Affairs, the organization Ronny Jackson is tapped to run.', 'importance_score': 0.9}, {'entity_name': 'RONNY JACKSON', 'entity_type': 'PERSON', 'description': 'Rear Admiral Ronny Jackson, the White House physician tapped to run the VA.', 'importance_score': 0.9}, {'entity_name': 'CNBC', 'entity_type': 'ORGANIZATION', 'description': 'CNBC, the news organization reporting on the event.', 'importance_score': 0.7}, {'entity_name': 'KAYLA TAUSCHE', 'entity_type': 'PERSON', 'description': 'Kayla Tausche, the CNBC reporter covering the story.', 'importance_score': 0.7}, {'entity_name': '2 HOURS AGO', 'entity_type': 'TIME', 'description': 'The time when the report was made.', 'importance_score': 0.5}], 'relationships': [{'src_id': 'TRUMP', 'tgt_id': 'RONNY JACKSON', 'description': 'President Trump taps Ronny Jackson as new VA secretary.', 'weight': 1.0, 'order': 1}, {'src_id': 'RONNY JACKSON', 'tgt_id': 'VA', 'description': 'Ronny Jackson is tapped to run the Department of Veterans Affairs.', 'weight': 1.0, 'order': 1}, {'src_id': 'KAYLA TAUSCHE', 'tgt_id': 'TRUMP', 'description': \"CNBC's Kayla Tausche reports President Trump has tapped Ronny Jackson.\", 'weight': 0.8, 'order': 2}]}) (input_keys={'input_text'})]" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "devset[:5]" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [], + "source": [ + "loaded_trainset = pickle.load(open(entity_relationship_trainset_path, \"rb\"))\n", + "loaded_valset = pickle.load(open(entity_relationship_valset_path, \"rb\"))\n", + "loaded_devset = pickle.load(open(entity_relationship_devset_path, \"rb\"))\n", + "assert loaded_trainset == trainset\n", + "assert loaded_valset == valset\n", + "assert loaded_devset == devset" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "nano-graphrag", + "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.10.14" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}