File size: 243,758 Bytes
b5d0e45 |
1 |
{"cells":[{"cell_type":"markdown","source":["# nepberta"],"metadata":{"id":"SaV7GpYo1h_2"}},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":502,"status":"ok","timestamp":1731307389266,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"},"user_tz":-345},"id":"2VWdmLpsq-ri","outputId":"99fc7384-a201-4f8c-e817-41f3a6a865e2"},"outputs":[{"output_type":"stream","name":"stdout","text":["/content/drive/MyDrive/Research/datasets/hf_datasets\n"]}],"source":["%cd /content/drive/MyDrive/Research/datasets/hf_datasets"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"cn0UpSL8q0QZ"},"outputs":[],"source":["# Probably should `clean_data(new_crawled_data)` before merging `new_crawled_data.csv` and previous`cleaned_data.csv`\n","\n","from bs4 import BeautifulSoup\n","import csv\n","import json\n","import re\n","import string\n","import pandas as pd\n","\n","from drive.MyDrive.Research.datasets.scrapy_engine.code.load_data import load_data\n","class CleanData:\n"," def __init__(self):\n"," pass\n"," # return text\n"," # Example of removing HTML tags\n"," def clean_html(self, text):\n"," '''\n"," # HTML Tag Removal:\n"," * removes html tags like: <h1>\n"," * Removes css or js code inside <style> and <script> tags\n"," '''\n"," soup = BeautifulSoup(text, \"lxml\")\n","\n"," # Remove all <script> and <style> tags\n"," for script_or_style in soup(['script', 'style']):\n"," script_or_style.decompose()\n","\n"," # Get text from the modified HTML\n"," text = soup.get_text(separator=' ', strip=True)\n"," # print(text)\n","\n"," return text\n","\n"," def convert_to_devanagari_digits(self, input_string):\n"," # Function to convert 0-9 to ० - ९\n"," # i.e. Mapping of ASCII digits to Devanagari digits\n"," devanagari_digits = {\n"," '0': '०',\n"," '1': '१',\n"," '2': '२',\n"," '3': '३',\n"," '4': '४',\n"," '5': '५',\n"," '6': '६',\n"," '7': '७',\n"," '8': '८',\n"," '9': '९'\n"," }\n"," # Convert each digit in the input string\n"," result = ''.join(devanagari_digits[char] if char in devanagari_digits else char for char in input_string)\n"," return result\n","\n"," def remove_non_devanagari_characters(self, text, keep_special_characters=True):\n"," '''\n"," # Function to find nepali sequences.\n"," * keep punctuations if they occur between devanagari characters.\n"," * Remove punctuation if previous character is not devanagari.\n"," # Examples\n"," texts = [\n"," \"उनले दुहेको दूध बेच्नका लागि बजार असाध्यै सानो थियो त्यसैले उनले चीज बनाउने विचार गरे। \\\"hi there\\\". what is your name? उनले दुहेको दूध\",\n"," \"\\\"hi there. \\\"उनले दुहेको\\\" दूध बेच्नका लागि बजार असाध्यै सानो थियो त्यसैले उनले चीज बनाउने विचार गरे। hi there. what is your name? उनले दुहेको दूध\\\"\",\n"," \"name? उनले दुहेको दूध\\\"\" #output: (last quatation, name?) should be ignored\n"," ]\n","\n"," for text in texts:\n"," removed = remove_non_devanagari_characters(text)\n"," print(f'text: {text}, \\nclen: {removed}\\n\\n')\n","\n","\n"," # output\n"," text: उनले दुहेको दूध बेच्नका लागि बजार असाध्यै सानो थियो त्यसैले उनले चीज बनाउने विचार गरे। \"hi there\". what is your name? उनले दुहेको दूध,\n"," clen: उनले दुहेको दूध बेच्नका लागि बजार असाध्यै सानो थियो त्यसैले उनले चीज बनाउने विचार गरे। उनले दुहेको दूध\n","\n","\n"," text: \"hi there. \"उनले दुहेको\" दूध बेच्नका लागि बजार असाध्यै सानो थियो त्यसैले उनले चीज बनाउने विचार गरे। hi there. what is your name? उनले दुहेको दूध\",\n"," clen: \"उनले दुहेको दूध बेच्नका लागि बजार असाध्यै सानो थियो त्यसैले उनले चीज बनाउने विचार गरे। उनले दुहेको दूध\"\n","\n","\n"," text: name? उनले दुहेको दूध\",\n"," clen: उनले दुहेको दूध\"\n"," '''\n"," def is_devanagari(char):\n"," pattern=r'[ऀ-ॿ]'\n"," return bool(re.match(pattern, char))\n","\n"," if not keep_special_characters:\n"," return re.sub(r\"[^ऀ-ॿ ]\", \" \", text)\n","\n"," sequences = []\n"," sequence = ''\n"," punctuation_symbols = string.punctuation # '!\"#$%&\\'()*+,-./:;<=>?@[\\\\]^_`{|}~'\n"," prefix_punctuations = '\\\"\\'(<[{'\n"," index=0\n"," while index < len(text):\n"," char = text[index]\n"," if is_devanagari(char) or char == ' ':\n"," # Character is devanagari\n"," sequence += char\n"," elif char in punctuation_symbols:\n"," # Character is punctuation\n"," if sequence != '':\n"," if (len(text) > index+1) and not is_devanagari(text[index+1]):\n"," # e.g. गरे। \"hi there\" : skip quotation before hi\n"," pass\n"," else:\n"," sequence += char # Sequence is no empty. i.e. previous char/sequence was devanagari otherwise ignore punctuation\n"," elif (len(text) > index+1) and is_devanagari(text[index+1]):\n"," # preserve prefix punctuations in devanagari. e.g. \"\"\"there. \\\"उनले \"\": preserve double-quotation before उनले\n"," sequence = char + text[index+1]\n"," index += 1 # another 1 is added at the end\n"," else:\n"," if sequence:\n"," sequences.append(sequence)\n"," sequence = '' # Reset sequence\n"," index += 1\n","\n"," # print(f'{sequences}\\n{sequence}\\n{char}{is_devanagari(char)}\\n\\n')\n"," if sequence: # last sequence\n"," sequences.append(sequence)\n"," return ' '.join(sequences)\n"," # Example of using regex for special character removal\n","\n"," def normalize_data(self, text):\n"," '''\n"," * Standerize special characters\n"," * e.g. convert different types of quotes to standard quotes\n"," '''\n"," characters_to_replace = {\n"," '₹': 'रु',\n"," 'ʻ': \"'\",\n"," 'ː': ':',\n"," '?': '?',\n"," '‟': '\"',\n"," '“' : '\"',\n"," '”': '\"',\n"," '`': \"'\",\n"," '৷': '।',\n"," 'ˈ': \"'\",\n"," '՛': \"'\",\n"," 'ǃ': '!',\n"," '(': '(',\n"," ':': ':',\n"," 'ˍ': '_',\n"," '﹣': '-',\n"," '״': '\"',\n"," 'ꞌ': \"'\",\n"," '₋': '-',\n"," '%': '%',\n"," '꞉': ':',\n"," '‵': \"'\"\n"," }\n"," # Replace each character in the dictionary with its corresponding standard character\n"," for char, replacement in characters_to_replace.items():\n"," text = text.replace(char, replacement)\n","\n"," return text\n","\n"," def clean_data(self, text):\n"," # Remove HTML tags\n"," text = self.clean_html(text)\n","\n"," # Normalize some characters\n"," text = self.normalize_data(text)\n","\n"," # Convert convert 0-9 to ० - ९\n"," text = self.convert_to_devanagari_digits(text)\n","\n"," text = self.remove_non_devanagari_characters(text, keep_special_characters=True)\n"," # text = text.lower() # No lower characters in devanagari\n","\n"," # Replace one or more spaces with a single space\n"," text = re.sub(r'\\s+', ' ', text).strip()\n","\n"," return text\n","\n","# Clean data and save to 'cleaned_data'\n","data_cleaner = CleanData()\n","\n","# if __name__==\"__main__\":\n","# # Assuming `data` is your raw dataset\n","# data0 = [\"<html><h1>Hi there</h1><style>color:red</style><script>console.log('hello world');</script>Example text</html>\", \"<div>Another example with special chars: !@#</div>\"]\n","# data = ['<html><h1>सुर्खेत र </h1><style> जुम्लामा बाहेक </style><script>console.log(\"कर्णालीका अरू जिल्लामा\");</script> कर्णालीका अरू जिल्लामा शिशुका लागि आवश्यक एनआईसीयू सेवा नै उपलब्ध छैन।', 'नेपालले करिब एक महिना अघि नै औपचारिक पत्र पठाएर जीबी राईलाई स्वदेश फर्काइदिन गरेको आग्रहबारे मलेशियाले कुनै औपचारिक जबाफ दिएको छैन।', '2024 बीबीसी। अन्य वेबसाइटका सामग्रीहरूका लागि बीबीसी जिम्मेवार छैन।', 'संसदीय छानबिन समिति गठन नभएसम्म संसद्\\u200cको कारबाही अघि बढ्न नदिने प्रतिपक्षी दलको अडानका कारण यसअघिको संसद् अधिवेशनको अन्त्यतिरका कामकारबाही प्रभावित भएका थिए।', 'भारतमा पनि भेपमा प्रतिबन्ध लगाइएको छ तर स्थानीय सञ्चार माध्यमका अनुसार यो व्यवस्था प्रभावकारी रूपमा कार्यान्वयन भएको छैन।', 'इजरेलले रफाहमा आक्रमण गर्न सक्ने आशङ्काका बीच अमेरिकाले गत साता इजरेललाई उपलब्ध गराउन लागेको हजारौँ बमको ढुवानी रोकिदिएको खुलासा भएको छ।', 'शुक्रवारको प्रयत्न सफल भएमा अन्तर्राष्ट्रिय अन्तरिक्ष स्टेशनतिर र बाट उडान गर्ने बोइङ दोस्रो निजी कम्पनी बन्नेछ। अहिलेसम्म इलोन मस्कको स्पेस एक्सले त्यस्तो काम गर्दै आएको छ।', 'हिरादेवी खतिवडाले दैनिक परामर्श दिनेहरूमा जबरजस्ती करणी, यौन दुर्व्यवहार लगायतका घटनाका पीडितहरू हुने गर्छन्।', 'युक्रेनी सेक्युरिटी सर्भिसका अनुसार गिरफ्तार गरिएका दुईजना कर्णेलले जेलेन्स्कीका अङ्गरक्षकहरूमध्ये त्यस्ता व्यक्तिको खोजी गरिरहेका थिए जो उनको अपहरण तथा हत्या गर्नका निम्ति इच्छुक होऊन्।', 'आधिकारिक रूपमा पुटिनले मार्चमा भएको राष्ट्रपतीय चुनावमा ८७ प्रतिशतभन्दा धेरै मत हासिल गरेका थिए। उक्त चुनावमा उनले गम्भीर प्रतिद्वन्दीको सामना गर्नुपरेको थिएन, न उक्त चुनावलाई धेरैले स्वतन्त्र र निष्पक्ष चुनावका रूपमा हेरेका थिए।', 'नेपालका ग्रामीण भेगमा विगतमा पाइने गरेका काठका पुराना ठेकीहरू अचेल नपाइने गरेका मानिसहरू बताउँछन्। आखिर कहाँ जादै छन् सारा ठेकीहरू?', 'चीनको अर्थतन्त्र सोचेभन्दा तीव्र गतिमा विकसित भए पनि यसका अगाडि विभिन्न सङ्कट रहेकाले \\nमहिलाहरू घरखर्च धान्न बचत बढाउन चाहन्छन्।', \"चार वर्षअघि जारी नेपालको पछिल्लो नक्सालाई अन्तर्राष्ट्रिय मान्यता दिलाउन उल्लेख्य प्रगति नभएको अवस्थामा सरकारको यो निर्णय 'लोकप्रियताका लागि मात्रै गरिएको' कतिपय विज्ञहरूको टिप्पणी छ।\", 'जङ्गलमा कुनै प्राणीले औषधीय वनस्पति प्रयोग गरेर चोटपटकको उपचार गरेको यो पहिलो रेकर्ड हो। ', ' ', 'टिकटकले अमेरिकाले प्रतिबन्ध पुष्टि गर्न “अनुमानका आधारमा चिन्ता” व्यक्त गरेको आरोप लगाउँदै उक्त कदम रोक्न अदालतसँग माग गरेको छ।', \"पुरातत्त्वसम्बन्धी विशेषज्ञ चित्रकारहरूले सयौँ टुक्राहरू जोडेर बनाइएको खप्परका आधारमा 'नीयान्डर्टाल' महिलाको थ्री-डी मोडल बनाएका छन्। \", 'प्री-मनसुनको समयमा नेपालमा चट्याङ र हावाहुरीका घटनाहरू धेरै हुने गरेको विज्ञहरू बताउँछन्।', 'त्रिसट्ठी वर्षीया चर्चित कलाकारले क्यान्सरविरुद्ध आफ्नो सङ्घर्ष र रङ्गमञ्च एवं सामाजिक सञ्जालमार्फत् आफ्नो यात्राबारे जनचेतना जगाउने निर्णयबारे बीबीसीसँग कुराकानी गरेकी छन्।', 'आस्ट्राजेनेका खोपले कोभिड महामारीका क्रममा लाखौं मनिसहरूको ज्यान बचाएको विश्वास गरिन्छ, तर सँगसँगै यसले केही दुर्लभ रक्तजन्य घातक समस्या पनि निम्त्याएको बताइन्छ। ', 'गत वर्ष अर्थात् सन् २०२३ मा २० हजार जनाभन्दा बढी नेपाली कोरिया गएका थिए। कोरियामा अहिले नेपाली कामदारको सङ्ख्या ५५ हजार जनाभन्दा धेरै रहेको त्यहाँस्थित नेपाली दूतावासले जनाएको छ।', 'एमालेका हिक्मत कार्की मुख्यमन्त्री नियुक्त भएको दिन नै त्यसविरुद्ध मुद्दा लिएर कांग्रेसका केदार कार्की सर्वोच्च अदालत पुगेका छन्।', \"महत्त्वाकाङ्क्षी 'नीअम' परियोजनाअन्तर्गत 'द लाइन' मरुभूमि सहरका लागि जग्गा खाली गर्ने काममा घातक बल प्रयोग गर्न साउदी अरबका अधिकारीहरूले अनुमति दिएको एक भूतपूर्व गुप्तचर अधिकारीले दाबी गरेका छन्।\\n\", 'कडा कार्य संस्कृति प्रोत्साहन गर्ने टिप्पणीलाई लिएर चिनियाँ प्रविधि कम्पनीकी जनसम्पर्क अधिकारीले किन माफी माग्नु पर्\\u200dयो।', \"केन्द्रमा गत फागुनमा सत्ता समीकरण परिवर्तन भएसँगै त्यसको प्रभाव प्रदेशहरूमा परिरहेको देखिएका बेला जसपा विभाजनले विशेषगरी मधेश प्रदेश सरकार 'ढल्न सक्ने' अनुमानहरू पनि गरिएका छन्।\", 'अदालतले उनलाई चुनाव प्रचारप्रसार गर्न कुनै खालको रोक नलगाएको र आदेशमा उनले के गर्न पाउने वा नपाउने भन्ने कुनै विषयबारे उल्लेख नगरिएको पनि केजरीवालका वकिलले बताए।', 'इजरेली प्रधानमन्त्रीले गाजाको रफाहमा पूर्ण स्तरको आक्रमणलाई अनुमति दिएको खण्डमा हतियारको आपूर्ति रोक्न सकिने अमेरिकी चेतावनीलगत्तै बेन्जमिन नेतन्याहुले इजरेल \"एक्लै खडा हुन सक्ने\" प्रतिक्रिया दिएका छन्।', 'ब्रजिलको रिओ ग्रान्डी डु सुल प्रान्तमा आएको बाढी र पहिरोका कारण धनजनको ठूलो क्षति भएको छ।', 'खासगरी प्रधानमन्त्री, मुख्यमन्त्री एवं प्रदेश प्रमुख परिवर्तन भइरहने अनि मनपरी ढङ्गले आफू अनुकूलका व्यक्तिका तस्बिर राख्दा त्यसको आर्थिकभार राज्यकोषमा पर्ने गरेको जानकारहरू बताउँछन्।', 'नेपाली कांग्रेसले गृहमन्त्री रवि लामिछाने सहकारी ठगीमा संलग्न भएको विवरण सञ्चारमाध्यममा आइरहेको भन्दै उनीमाथि पनि छानबिन हुने गरी संसदीय समिति गठन गरिनुपर्ने अडानमा छ। ', 'हजारौँ आप्रवासीहरूलाई तस्करी गरी यूके पुर्\\u200dयाएका स्करपीअन उपनामले चर्चित बार्जान बीबीसीको एउटा अनुसन्धानपछि पक्राउ गरेका छन्। ', 'अमेरिकाका पूर्वराष्ट्रपति डोनल्ड ट्रम्पविरुद्ध परेको मुद्दामा उनका पूर्ववकिल माइकल कोएनले ट्रम्पविरुद्ध बयान दिएका छन्। उनले के भने र उनको बयान किन महत्त्वपूर्ण छ?', 'नेपालमा जेठ १५ गते बजेट ल्याउने नियम छ। त्यसअघि संसद्\\u200cमा नीति तथा कार्यक्रम प्रस्तुत हुन्छ। यसपालि मङ्गलवार संसद्को दुवै सदनको संयुक्त बैठक बस्दैछ र त्यसमा राष्ट्रपति रामचन्द्र पौडेलले नीति तथा कार्यक्रम प्रस्तुत गर्ने कार्यक्रम तय भएको छ।', 'उत्तर कोरियाको एउटा प्रान्तमा मानिसहरू भोकभोकै मर्न थालेको सुनेपछि देश छाडेर दक्षिण कोरियामा शरण लिन पुगेका यी व्यक्तिले सन् २०१५ देखि बोतलमा अन्य चिजसँगै चामल भरेर पठाउन थालेका हुन्।\\n', \"पिनाइल क्यान्सर भनिने पुरुषहरूमा लिङ्गको क्यान्सरका एकजना बिरामी जोआओ भन्छन्, रोगको निदान भएपछि लिङ्ग काटेर हटाउनुपर्ने अवस्थाबाट उनी 'निकै आत्तिएका' थिए।\", 'सर्वोच्च अदालतको संवैधानिक इजलासको फैसलाको पूर्णपाठमा हदबन्दीभन्दा बढी भएको जग्गा बाँझो राखिएको भेटिए सरकारका नाममा ल्याउन समेत भनिएको छ।', 'इन्टरनेटमा बालबालिकाले कलिलै उमेरमा पहुँच पाउँदा उनीहरू गम्भीर जोखिमको नजिक पुगेको विशेषज्ञहरूले बताएका छन्। ती जोखिमको रोकथामका लागि तपाईँहामी के गर्न सक्छौँ?', 'मृत्यु सन्निकट हुँदा मानिसहरूले गर्ने अनुभूतिबारे डा क्रिस्टोफर केरले अध्ययन गरेका छन्। त्यस्ता मानिसहरूले अन्तिम समयमा अनुभव गर्ने दृश्य र तिनको अर्थबारे उनले कुरा गरेका छन्।', \"आत्मसम्मान कम भएका व्यक्तिमा 'कम्प्लिमेन्ट' अर्थात प्रशंसाले चिन्ता बढाउन सक्छ किनभने उनीहरूको स्वधारणामा त्यसरी भएको तारिफले चुनौती दिन सक्छ। \", 'सन् २०२२ मा जोन म्याकफललाई शारीरिक अपाङ्गता भएका प्रथम अन्तरिक्षयात्रीको उम्मेदवारका रूपमा चयन गरिएको थियो। ', \"थाईल्यान्डमा 'लीज म्याजस्टी' कानुनले राजतन्त्रको आलोचना गर्न प्रतिबन्ध लगाएको छ। राजतन्त्रको संरक्षणका लागि बनाइएको त्यस्तो कानुनलाई विश्वकै कठोर कानुनमध्ये मानिन्छ।\", \"हजारौँ आप्रवासीहरूलाई तस्करी गरी यूके पुर्\\u200dयाएका 'स्कोर्पिअन' उपनामले चर्चित बर्जान मजिद बीबीसीको एउटा अनुसन्धानपछि इराकमा पक्राउ परेका छन्। \", 'नयाँ नोट छपाइमा जानुअघि अन्तर्राष्ट्रिय बोलकबोलसहितका कतिपय कानुनी प्रक्रियाहरू पूरा गर्नुपर्ने अधिकारीहरू बताउँछन्। ', 'अमेरिका, चीन र भारतले चन्द्रमामा मानव पठाउने योजना सार्वजनिक गरेका छन्। अन्तरिक्ष अभियानमा यी देशले किन अर्बौँ डलर लगानी गरेका हुन् र उनीहरूको अपेक्षा के छ?', 'जबरजस्ती करणी मुद्दामा उच्च अदालत पाटनले सफाइ दिएको केही घण्टापछि नेपाल क्रिकेट सङ्घ क्यानको निर्णय सार्वजनिक भएको हो।', ' प्रधानमन्त्रीको टाउको र छातीमा गोली लागेको देखिएको थियो। प्रधानमन्त्रीका सुरक्षाकर्मीमध्ये तीन जनाले उनको उद्धार गरी कारभित्र लगेका थिए।', 'मसला उत्पादन र निर्यातमा भारतको वर्चस्व छ। तर विभिन्न देशमा भारतीय मसलाको गुणस्तरबारे प्रश्न उठेको छ।', 'हीरामन्डीमा प्रमुख भूमिका रहेको मल्लिका जानको अभिनय गरेर फिल्म क्षेत्रमा वाहवाही पाइरहेकी मनीषा कोइरालाले बलुवुडकी चर्चित कलाकार रेखाले आफ्नो प्रशंसा गरेको सुन्दा आँशु आएको बताएकी छन्। रेखाले हीरामन्डी हेरेपछि मनीषालाई के भनिन् र उनको आँखा रसाए?', \"'लेडी बुशरा' नामले चिनिने अमिर डीन यूकेका सर्वाधिक चर्चित 'ड्र्याग कलाकार'मध्ये एक हुन्।\", \"साउदी अरबलाई आधुनिक बनाउने युवराज मोहम्मद बिन सलमानको चाहनाअनुसार 'नीअम' परियोजना बनाउन लागिएको हो। \\n\\n\", 'कृषि जनशक्तिको चरम अभावमाझ राष्ट्रपतिले घोषणा गरेको महत्त्वाकाङ्क्षी कृषिमा लगानी दशक कार्यान्वयनमा नआउँदै गम्भीर प्रश्नहरू तेर्सिएका छन्।', 'युक्रेनमा जारी युद्धमा रुसलाई सघाएको आरोप चीनलाई लागेकै बेला भ्लादिमिर पुटिनले फेरि बेइजिङ भ्रमणमा पुगेका छन्।', 'भारतमा निर्वाचनका बेला डीपफेक र एआईबाट सिर्जित भ्रामक सामग्रीको बिगबिगी बढेपछि विज्ञहरूले त्यसबाट पर्ने प्रभावबारे चिन्ता व्यक्त गरेका छन्।', 'जबरजस्ती करणी मुद्दामा उच्च अदालत पाटनले सफाइ दिएको केही घण्टापछि नेपाल क्रिकेट सङ्घ (क्यान) को निर्णय सार्वजनिक भएको हो।', 'उत्तर अमेरिकामा यो पहिलो विश्वकप हुँदै छ भने आयोजकको हैसियतले अमेरिकाले पनि सीधै विश्वकप खेल्ने मौका पाएको छ।', 'सहकारी संस्थाका सञ्चालकहरूले सम्पत्ति ब्याङ्कमा धितो राखेर ऋण लिएको पाइएका कारण लिलामी प्रक्रियामा समस्या भएको अधिकारीहरूले बताएका छन्।', \"'ब्रेकिङ'लाई ओलिम्पिक्समा पहिलो पटक समावेश गरिएको हो। यसपालि नै तालिबानको धम्कीका बीच 'ब्रेकिङ' सिकेकी मनिजा तलाश शरणार्थी टोलीकी सदस्यका रूपमा खेल्दै छिन्।\"]\n","\n","# # Preprocess the data\n","# cleaned_data = [preprocess_text(doc) for doc in data]\n","# print(cleaned_data)\n","\n","# # Further steps, like tokenization or saving the cleaned data, can follow\n"]},{"cell_type":"code","execution_count":7,"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":1000},"id":"Z-gA4d8MqsOS","outputId":"4f200547-c9c1-4969-beff-0a35eb4e3cf5","executionInfo":{"status":"error","timestamp":1731318523875,"user_tz":-345,"elapsed":5054033,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}}},"outputs":[{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["creating folder\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_1.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_2.txt\n","saved file: nepberta/clean_date_categories/chunk_3.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_4.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_5.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_6.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_7.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_8.txt\n","saved file: nepberta/clean_date_categories/chunk_9.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_10.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_11.txt\n","saved file: nepberta/clean_date_categories/chunk_12.txt\n","saved file: nepberta/clean_date_categories/chunk_13.txt\n","saved file: nepberta/clean_date_categories/chunk_14.txt\n","saved file: nepberta/clean_date_categories/chunk_15.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_16.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_17.txt\n","saved file: nepberta/clean_date_categories/chunk_18.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_19.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_20.txt\n","saved file: nepberta/clean_date_categories/chunk_21.txt\n","saved file: nepberta/clean_date_categories/chunk_22.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_23.txt\n","saved file: nepberta/clean_date_categories/chunk_24.txt\n","saved file: nepberta/clean_date_categories/chunk_25.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_26.txt\n","saved file: nepberta/clean_date_categories/chunk_27.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_28.txt\n","saved file: nepberta/clean_date_categories/chunk_29.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_30.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_31.txt\n","saved file: nepberta/clean_date_categories/chunk_32.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_33.txt\n","saved file: nepberta/clean_date_categories/chunk_34.txt\n","saved file: nepberta/clean_date_categories/chunk_35.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_36.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_37.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_38.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_39.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_40.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_41.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_42.txt\n","saved file: nepberta/clean_date_categories/chunk_43.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_44.txt\n","saved file: nepberta/clean_date_categories/chunk_45.txt\n","saved file: nepberta/clean_date_categories/chunk_46.txt\n","saved file: nepberta/clean_date_categories/chunk_47.txt\n","saved file: nepberta/clean_date_categories/chunk_48.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_49.txt\n","saved file: nepberta/clean_date_categories/chunk_50.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_51.txt\n","saved file: nepberta/clean_date_categories/chunk_52.txt\n","saved file: nepberta/clean_date_categories/chunk_53.txt\n","saved file: nepberta/clean_date_categories/chunk_54.txt\n","saved file: nepberta/clean_date_categories/chunk_55.txt\n","saved file: nepberta/clean_date_categories/chunk_56.txt\n","saved file: nepberta/clean_date_categories/chunk_57.txt\n","saved file: nepberta/clean_date_categories/chunk_58.txt\n","saved file: nepberta/clean_date_categories/chunk_59.txt\n","saved file: nepberta/clean_date_categories/chunk_60.txt\n","saved file: nepberta/clean_date_categories/chunk_61.txt\n","saved file: nepberta/clean_date_categories/chunk_62.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_63.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_64.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_65.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_66.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_67.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_68.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_69.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_70.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_71.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_72.txt\n","saved file: nepberta/clean_date_categories/chunk_73.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_74.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_75.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_76.txt\n","saved file: nepberta/clean_date_categories/chunk_77.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_78.txt\n","saved file: nepberta/clean_date_categories/chunk_79.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_80.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_81.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_82.txt\n","saved file: nepberta/clean_date_categories/chunk_83.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_84.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_85.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_86.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_87.txt\n","saved file: nepberta/clean_date_categories/chunk_88.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_89.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_90.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_91.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_92.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_93.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_94.txt\n","saved file: nepberta/clean_date_categories/chunk_95.txt\n","saved file: nepberta/clean_date_categories/chunk_96.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_97.txt\n","saved file: nepberta/clean_date_categories/chunk_98.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_99.txt\n","saved file: nepberta/clean_date_categories/chunk_100.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_101.txt\n","saved file: nepberta/clean_date_categories/chunk_102.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_103.txt\n","saved file: nepberta/clean_date_categories/chunk_104.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_105.txt\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["saved file: nepberta/clean_date_categories/chunk_106.txt\n","saved file: nepberta/clean_date_categories/chunk_107.txt\n","saved file: nepberta/clean_date_categories/chunk_108.txt\n","saved file: nepberta/clean_date_categories/chunk_109.txt\n","saved file: nepberta/clean_date_categories/chunk_110.txt\n","saved file: nepberta/clean_date_categories/chunk_111.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_112.txt\n","saved file: nepberta/clean_date_categories/chunk_113.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_114.txt\n","saved file: nepberta/clean_date_categories/chunk_115.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_116.txt\n","saved file: nepberta/clean_date_categories/chunk_117.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_118.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_119.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_120.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_121.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_122.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_123.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_124.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_125.txt\n","saved file: nepberta/clean_date_categories/chunk_126.txt\n","saved file: nepberta/clean_date_categories/chunk_127.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_128.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_129.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_130.txt\n","saved file: nepberta/clean_date_categories/chunk_131.txt\n","saved file: nepberta/clean_date_categories/chunk_132.txt\n","saved file: nepberta/clean_date_categories/chunk_133.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_134.txt\n","saved file: nepberta/clean_date_categories/chunk_135.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_136.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_137.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_138.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_139.txt\n","saved file: nepberta/clean_date_categories/chunk_140.txt\n","saved file: nepberta/clean_date_categories/chunk_141.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_142.txt\n","saved file: nepberta/clean_date_categories/chunk_143.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_144.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_145.txt\n","saved file: nepberta/clean_date_categories/chunk_146.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_147.txt\n","saved file: nepberta/clean_date_categories/chunk_148.txt\n","saved file: nepberta/clean_date_categories/chunk_149.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_150.txt\n","saved file: nepberta/clean_date_categories/chunk_151.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_152.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_153.txt\n","saved file: nepberta/clean_date_categories/chunk_154.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_155.txt\n","saved file: nepberta/clean_date_categories/chunk_156.txt\n","saved file: nepberta/clean_date_categories/chunk_157.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_158.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_159.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_160.txt\n","saved file: nepberta/clean_date_categories/chunk_161.txt\n","saved file: nepberta/clean_date_categories/chunk_162.txt\n","saved file: nepberta/clean_date_categories/chunk_163.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_164.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_165.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_166.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_167.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_168.txt\n","saved file: nepberta/clean_date_categories/chunk_169.txt\n","saved file: nepberta/clean_date_categories/chunk_170.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_171.txt\n","saved file: nepberta/clean_date_categories/chunk_172.txt\n","saved file: nepberta/clean_date_categories/chunk_173.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_174.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_175.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_176.txt\n","saved file: nepberta/clean_date_categories/chunk_177.txt\n","saved file: nepberta/clean_date_categories/chunk_178.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_179.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_180.txt\n","saved file: nepberta/clean_date_categories/chunk_181.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_182.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_183.txt\n","saved file: nepberta/clean_date_categories/chunk_184.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_185.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_186.txt\n","saved file: nepberta/clean_date_categories/chunk_187.txt\n","saved file: nepberta/clean_date_categories/chunk_188.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_189.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_190.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_191.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_192.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_193.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_194.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_195.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_196.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_197.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_198.txt\n","saved file: nepberta/clean_date_categories/chunk_199.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_200.txt\n","saved file: nepberta/clean_date_categories/chunk_201.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_202.txt\n","saved file: nepberta/clean_date_categories/chunk_203.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_204.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_205.txt\n","saved file: nepberta/clean_date_categories/chunk_206.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_207.txt\n","saved file: nepberta/clean_date_categories/chunk_208.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_209.txt\n","saved file: nepberta/clean_date_categories/chunk_210.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_211.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_212.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_213.txt\n","saved file: nepberta/clean_date_categories/chunk_214.txt\n","saved file: nepberta/clean_date_categories/chunk_215.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_216.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_217.txt\n","saved file: nepberta/clean_date_categories/chunk_218.txt\n","saved file: nepberta/clean_date_categories/chunk_219.txt\n","saved file: nepberta/clean_date_categories/chunk_220.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_221.txt\n","saved file: nepberta/clean_date_categories/chunk_222.txt\n","saved file: nepberta/clean_date_categories/chunk_223.txt\n","saved file: nepberta/clean_date_categories/chunk_224.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n","<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_225.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_226.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_227.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_228.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_229.txt\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"error","ename":"TypeError","evalue":"object of type 'float' has no len()","traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)","\u001b[0;32m<ipython-input-7-28031a0b7a79>\u001b[0m in \u001b[0;36m<cell line: 40>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 51\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moutput_folder\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 52\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 53\u001b[0;31m \u001b[0msave_to_txt_in_chunks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput_csv\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moutput_folder\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmax_file_size_mb\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m50\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 54\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m<ipython-input-7-28031a0b7a79>\u001b[0m in \u001b[0;36msave_to_txt_in_chunks\u001b[0;34m(input_file, output_folder, max_file_size_mb)\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mchunk\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mchunk_iter\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;31m# Process each chunk\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 23\u001b[0;31m \u001b[0mchunk\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'processed_text'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mchunk\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'text'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata_cleaner\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclean_data\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 24\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 25\u001b[0m \u001b[0;31m# Write each processed row to the output .txt file with <endoftext> token\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/series.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, func, convert_dtype, args, by_row, **kwargs)\u001b[0m\n\u001b[1;32m 4922\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4923\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4924\u001b[0;31m ).apply()\n\u001b[0m\u001b[1;32m 4925\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4926\u001b[0m def _reindex_indexer(\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/apply.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1425\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1426\u001b[0m \u001b[0;31m# self.func is Callable\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1427\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply_standard\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1428\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1429\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0magg\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/apply.py\u001b[0m in \u001b[0;36mapply_standard\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1505\u001b[0m \u001b[0;31m# Categorical (GH51645).\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1506\u001b[0m \u001b[0maction\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"ignore\"\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mCategoricalDtype\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1507\u001b[0;31m mapped = obj._map_values(\n\u001b[0m\u001b[1;32m 1508\u001b[0m \u001b[0mmapper\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcurried\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mna_action\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maction\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconvert_dtype\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1509\u001b[0m )\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/base.py\u001b[0m in \u001b[0;36m_map_values\u001b[0;34m(self, mapper, na_action, convert)\u001b[0m\n\u001b[1;32m 919\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmap\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmapper\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mna_action\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mna_action\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 920\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 921\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0malgorithms\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmap_array\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmapper\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mna_action\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mna_action\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mconvert\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 922\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 923\u001b[0m \u001b[0;34m@\u001b[0m\u001b[0mfinal\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/algorithms.py\u001b[0m in \u001b[0;36mmap_array\u001b[0;34m(arr, mapper, na_action, convert)\u001b[0m\n\u001b[1;32m 1741\u001b[0m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobject\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1742\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mna_action\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1743\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmap_infer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmapper\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mconvert\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1744\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1745\u001b[0m return lib.map_infer_mask(\n","\u001b[0;32mlib.pyx\u001b[0m in \u001b[0;36mpandas._libs.lib.map_infer\u001b[0;34m()\u001b[0m\n","\u001b[0;32m<ipython-input-4-12fd7fc5839a>\u001b[0m in \u001b[0;36mclean_data\u001b[0;34m(self, text)\u001b[0m\n\u001b[1;32m 158\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mclean_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtext\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 159\u001b[0m \u001b[0;31m# Remove HTML tags\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 160\u001b[0;31m \u001b[0mtext\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclean_html\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtext\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 161\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 162\u001b[0m \u001b[0;31m# Normalize some characters\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m<ipython-input-4-12fd7fc5839a>\u001b[0m in \u001b[0;36mclean_html\u001b[0;34m(self, text)\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mRemoves\u001b[0m \u001b[0mcss\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mjs\u001b[0m \u001b[0mcode\u001b[0m \u001b[0minside\u001b[0m \u001b[0;34m<\u001b[0m\u001b[0mstyle\u001b[0m\u001b[0;34m>\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;34m<\u001b[0m\u001b[0mscript\u001b[0m\u001b[0;34m>\u001b[0m \u001b[0mtags\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 21\u001b[0m '''\n\u001b[0;32m---> 22\u001b[0;31m \u001b[0msoup\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mBeautifulSoup\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtext\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"lxml\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 23\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0;31m# Remove all <script> and <style> tags\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/bs4/__init__.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, markup, features, builder, parse_only, from_encoding, exclude_encodings, element_classes, **kwargs)\u001b[0m\n\u001b[1;32m 313\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhasattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmarkup\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'read'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;31m# It's a file-type object.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 314\u001b[0m \u001b[0mmarkup\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmarkup\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 315\u001b[0;31m elif len(markup) <= 256 and (\n\u001b[0m\u001b[1;32m 316\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmarkup\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbytes\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;34mb'<'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mmarkup\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 317\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmarkup\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;34m'<'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mmarkup\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mTypeError\u001b[0m: object of type 'float' has no len()"]}],"source":["import pandas as pd\n","import math\n","import os\n","\n","def save_to_txt_in_chunks(input_file, output_folder, max_file_size_mb=50):\n"," # Ensure output folder exists\n"," os.makedirs(output_folder, exist_ok=True)\n","\n"," # Size limit for each output file in bytes\n"," max_file_size = max_file_size_mb * 1024 * 1024\n"," file_index = 1 # Track the file number\n"," output_file = os.path.join(output_folder, f\"chunk_{file_index}.txt\")\n","\n"," # Read input CSV file in chunks\n"," chunk_size = 10000 # Number of rows per chunk\n"," chunk_iter = pd.read_csv(input_file, chunksize=chunk_size)\n","\n"," # Open the initial output file for writing\n"," f_out = open(output_file, mode='w', encoding='utf-8')\n","\n"," for chunk in chunk_iter:\n"," # Process each chunk\n"," chunk['processed_text'] = chunk['text'].apply(data_cleaner.clean_data)\n","\n"," # Write each processed row to the output .txt file with <endoftext> token\n"," for row in chunk['processed_text']:\n"," f_out.write(f\"{row} <|endoftext|>\")\n","\n"," # Check if the current file size exceeds the limit\n"," if os.path.getsize(output_file) > max_file_size:\n"," f_out.close() # Close the current file\n"," print(f'saved file: {f_out.name}')\n"," file_index += 1\n"," output_file = os.path.join(output_folder, f\"chunk_{file_index}.txt\")\n"," f_out = open(output_file, mode='w', encoding='utf-8') # Open a new file\n","\n"," # Close the last open file\n"," f_out.close()\n","\n","if __name__ == \"__main__\":\n"," input_csv = '/content/drive/MyDrive/Research/datasets/nepberta/dataset/clean_date_categories.csv'\n"," output_folder = 'nepberta/clean_date_categories'\n","\n"," # Remove previous data of output folder\n"," if os.path.exists(output_folder):\n"," shutil.rmtree(output_folder)\n","\n"," # Create output folder if it does not exist\n"," if not os.path.exists(output_folder):\n"," print(f'creating folder')\n"," os.makedirs(output_folder)\n","\n"," save_to_txt_in_chunks(input_csv, output_folder, max_file_size_mb=50)\n","\n"]},{"cell_type":"code","source":["229*50/1024"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"kEI3gKOLqdn1","executionInfo":{"status":"ok","timestamp":1731319171118,"user_tz":-345,"elapsed":511,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"26f5c2b8-0b40-457d-9d14-3e3cc8b8c35c"},"execution_count":9,"outputs":[{"output_type":"execute_result","data":{"text/plain":["11.181640625"]},"metadata":{},"execution_count":9}]},{"cell_type":"code","source":["# # v2: Save cleaned output to a csv file\n","# # do not create giant string\n","# import pandas as pd\n","# import math\n","# import os\n","# import shutil\n","\n","# def save_to_csv_in_chunks(input_file, output_folder, max_file_size_mb=500):\n","# # Ensure output folder exists\n","# os.makedirs(output_folder, exist_ok=True)\n","\n","# # Size limit for each output file in bytes\n","# max_file_size = max_file_size_mb * 1024 * 1024\n","# file_index = 1 # Track the file number\n","# output_file = os.path.join(output_folder, f\"chunk_{file_index}.csv\")\n","\n","# # Read input CSV file in chunks\n","# chunk_size = 10000 # Number of rows per chunk\n","# chunk_iter = pd.read_csv(input_file, chunksize=chunk_size)\n","\n","# for chunk in chunk_iter:\n","# # Process each chunk\n","# chunk['text'] = chunk['text'].apply(data_cleaner.clean_data)\n","\n","# # Save the chunk to a new CSV file if the current file size exceeds the limit\n","# while os.path.exists(output_file) and os.path.getsize(output_file) > max_file_size:\n","# file_index += 1\n","# output_file = os.path.join(output_folder, f\"chunk_{file_index}.csv\")\n","\n","# # Save processed chunk to CSV file, appending if the file already exists\n","# chunk.to_csv(output_file, mode='a', index=False, encoding='utf-8', header=not os.path.exists(output_file))\n","# print(f'saved file: {output_file}')\n","\n","# if __name__ == \"__main__\":\n","# input_csv = '/content/drive/MyDrive/Research/datasets/nepberta/dataset/clean_date_categories.csv'\n","# output_folder = 'nepberta/clean_date_categories/'\n","\n","# # Remove previous data in output folder\n","# if os.path.exists(output_folder):\n","# shutil.rmtree(output_folder)\n","\n","# # Create output folder if it does not exist\n","# if not os.path.exists(output_folder):\n","# print(f'creating folder')\n","# os.makedirs(output_folder)\n","\n","# save_to_csv_in_chunks(input_csv, output_folder, max_file_size_mb=50)\n"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":1000},"id":"G6r0uo_o4J48","executionInfo":{"status":"error","timestamp":1731308423981,"user_tz":-345,"elapsed":927380,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"fffab5bf-270c-43e1-8f8b-d7e434a9fc10"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["creating folder\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_1.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_2.csv\n","saved file: nepberta/clean_date_categories/chunk_2.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_3.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_3.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_4.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_4.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_5.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_5.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_5.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_6.csv\n","saved file: nepberta/clean_date_categories/chunk_6.csv\n","saved file: nepberta/clean_date_categories/chunk_7.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_7.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_8.csv\n","saved file: nepberta/clean_date_categories/chunk_8.csv\n","saved file: nepberta/clean_date_categories/chunk_9.csv\n","saved file: nepberta/clean_date_categories/chunk_9.csv\n","saved file: nepberta/clean_date_categories/chunk_10.csv\n","saved file: nepberta/clean_date_categories/chunk_10.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_11.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_12.csv\n","saved file: nepberta/clean_date_categories/chunk_13.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_13.csv\n"]},{"output_type":"stream","name":"stderr","text":["<ipython-input-4-12fd7fc5839a>:22: MarkupResemblesLocatorWarning: The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.\n"," soup = BeautifulSoup(text, \"lxml\")\n"]},{"output_type":"stream","name":"stdout","text":["saved file: nepberta/clean_date_categories/chunk_14.csv\n","saved file: nepberta/clean_date_categories/chunk_14.csv\n"]},{"output_type":"error","ename":"KeyboardInterrupt","evalue":"","traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)","\u001b[0;32m<ipython-input-6-d5f724543943>\u001b[0m in \u001b[0;36m<cell line: 33>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 44\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moutput_folder\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 45\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 46\u001b[0;31m \u001b[0msave_to_csv_in_chunks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput_csv\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moutput_folder\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmax_file_size_mb\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m50\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m","\u001b[0;32m<ipython-input-6-d5f724543943>\u001b[0m in \u001b[0;36msave_to_csv_in_chunks\u001b[0;34m(input_file, output_folder, max_file_size_mb)\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mchunk\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mchunk_iter\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[0;31m# Process each chunk\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 22\u001b[0;31m \u001b[0mchunk\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'text'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mchunk\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'text'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata_cleaner\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclean_data\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 23\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0;31m# Save the chunk to a new CSV file if the current file size exceeds the limit\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/series.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, func, convert_dtype, args, by_row, **kwargs)\u001b[0m\n\u001b[1;32m 4922\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4923\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4924\u001b[0;31m ).apply()\n\u001b[0m\u001b[1;32m 4925\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4926\u001b[0m def _reindex_indexer(\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/apply.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1425\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1426\u001b[0m \u001b[0;31m# self.func is Callable\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1427\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply_standard\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1428\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1429\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0magg\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/apply.py\u001b[0m in \u001b[0;36mapply_standard\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1505\u001b[0m \u001b[0;31m# Categorical (GH51645).\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1506\u001b[0m \u001b[0maction\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"ignore\"\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mCategoricalDtype\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1507\u001b[0;31m mapped = obj._map_values(\n\u001b[0m\u001b[1;32m 1508\u001b[0m \u001b[0mmapper\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcurried\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mna_action\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maction\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconvert_dtype\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1509\u001b[0m )\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/base.py\u001b[0m in \u001b[0;36m_map_values\u001b[0;34m(self, mapper, na_action, convert)\u001b[0m\n\u001b[1;32m 919\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmap\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmapper\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mna_action\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mna_action\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 920\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 921\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0malgorithms\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmap_array\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmapper\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mna_action\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mna_action\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mconvert\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 922\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 923\u001b[0m \u001b[0;34m@\u001b[0m\u001b[0mfinal\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/algorithms.py\u001b[0m in \u001b[0;36mmap_array\u001b[0;34m(arr, mapper, na_action, convert)\u001b[0m\n\u001b[1;32m 1741\u001b[0m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobject\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1742\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mna_action\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1743\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmap_infer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmapper\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mconvert\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1744\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1745\u001b[0m return lib.map_infer_mask(\n","\u001b[0;32mlib.pyx\u001b[0m in \u001b[0;36mpandas._libs.lib.map_infer\u001b[0;34m()\u001b[0m\n","\u001b[0;32m<ipython-input-4-12fd7fc5839a>\u001b[0m in \u001b[0;36mclean_data\u001b[0;34m(self, text)\u001b[0m\n\u001b[1;32m 170\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 171\u001b[0m \u001b[0;31m# Replace one or more spaces with a single space\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 172\u001b[0;31m \u001b[0mtext\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mre\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msub\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34mr'\\s+'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m' '\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtext\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstrip\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 173\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 174\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mtext\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/lib/python3.10/re.py\u001b[0m in \u001b[0;36msub\u001b[0;34m(pattern, repl, string, count, flags)\u001b[0m\n\u001b[1;32m 207\u001b[0m \u001b[0ma\u001b[0m \u001b[0mcallable\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mit\u001b[0m\u001b[0;31m'\u001b[0m\u001b[0ms\u001b[0m \u001b[0mpassed\u001b[0m \u001b[0mthe\u001b[0m \u001b[0mMatch\u001b[0m \u001b[0mobject\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mmust\u001b[0m \u001b[0;32mreturn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 208\u001b[0m a replacement string to be used.\"\"\"\n\u001b[0;32m--> 209\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_compile\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpattern\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mflags\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msub\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrepl\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcount\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 210\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 211\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0msubn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpattern\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrepl\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcount\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mflags\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mKeyboardInterrupt\u001b[0m: "]}]},{"cell_type":"markdown","source":["# Upload dataset to huggingface"],"metadata":{"id":"BHU78CIrxUQ9"}},{"cell_type":"code","execution_count":10,"metadata":{"id":"M3xC_ipivhgr","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1731319197798,"user_tz":-345,"elapsed":13048,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"2b0c21dc-9e02-4f79-e002-102cf9217cfa"},"outputs":[{"output_type":"stream","name":"stdout","text":["\n"," _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_|\n"," _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n"," _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_|\n"," _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n"," _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_|\n","\n"," To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .\n","Enter your token (input will not be visible): \n","Add token as git credential? (Y/n) y\n","Token is valid (permission: write).\n","Your token has been saved in your configured git credential helpers (store).\n","Your token has been saved to /root/.cache/huggingface/token\n","Login successful\n"]}],"source":["!huggingface-cli login"]},{"cell_type":"code","source":["from google.colab import userdata\n","token=userdata.get('HUGGING_FACE_BEARER')"],"metadata":{"id":"shbjUnoKwNZI","executionInfo":{"status":"ok","timestamp":1731319199696,"user_tz":-345,"elapsed":1902,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}}},"execution_count":11,"outputs":[]},{"cell_type":"code","source":["# # delete folder nepberta/ from huggingface\n","!huggingface-cli repo-files Aananda-giri/nepali_llm_datasets delete nepberta/ --repo-type dataset"],"metadata":{"id":"fPexYWWF-vli","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1731319461324,"user_tz":-345,"elapsed":2547,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"516bc043-97af-4961-cedc-679a2959127d"},"execution_count":15,"outputs":[{"output_type":"stream","name":"stdout","text":["Files correctly deleted from repo. Commit: https://huggingface.co/datasets/Aananda-giri/nepali_llm_datasets/commit/6b26d5cc1ac9c83aa526bd7c33010393802c93aa.\n"]}]},{"cell_type":"code","source":["# Upload to Hugging Face\n","from huggingface_hub import HfApi, Repository\n","import os\n","import shutil\n","\n","# Set your dataset repo name and Hugging Face username\n","username = \"Aananda-giri\" # Replace with your Hugging Face username\n","repo_name = \"nepali_llm_datasets\" # Name for the new dataset repository\n","repo_id = f\"{username}/{repo_name}\" # Full repository ID\n","\n","# Authenticate\n","api = HfApi()\n","# token = \"token\" # Replace with your Hugging Face token\n","\n","# Local dataset directory\n","local_dir = \"./\" # Adjust to the path of the dataset folder\n","\n","# Create the repository if it does not exist\n","api.create_repo(repo_id, token=token, repo_type=\"dataset\", exist_ok=True)\n","\n","# # Clone the repo from Hugging Face Hub if it does not already exist locally\n","# repo = Repository(\n","# local_dir=local_dir,\n","# clone_from=repo_id, # Use `clone_from` to set up repository cloning\n","# token=token,\n","# repo_type=\"dataset\"\n","# )\n","\n","# # Add all files and folders to the Git repository\n","# repo.git_add(\".\") # Stage all files\n","# repo.git_commit(\"Add all dataset files and folders\") # Commit the changes\n","\n","# # Push the current structure to the Hugging Face Hub\n","# repo.push_to_hub(commit_message=\"Initial upload of structured Nepali LLM dataset folders\")\n","\n","# print(f\"Dataset uploaded to https://huggingface.co/datasets/{repo_id}\")\n"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":53},"id":"1x-UliqWf5vq","executionInfo":{"status":"ok","timestamp":1731319475150,"user_tz":-345,"elapsed":730,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"b96b71a0-c028-4456-b5dd-2db8f6af89a1"},"execution_count":16,"outputs":[{"output_type":"execute_result","data":{"text/plain":["RepoUrl('https://huggingface.co/datasets/Aananda-giri/nepali_llm_datasets', endpoint='https://huggingface.co', repo_type='dataset', repo_id='Aananda-giri/nepali_llm_datasets')"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"string"}},"metadata":{},"execution_count":16}]},{"cell_type":"code","source":["# !git lfs track nepberta/clean_date_categories"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"QwSI0SPultM6","executionInfo":{"status":"ok","timestamp":1730344971841,"user_tz":-345,"elapsed":1143,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"b9097e63-5f4c-4286-f5b7-a20924ce7ff0"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Tracking \"nepberta/clean_date_categories\"\n"]}]},{"cell_type":"code","source":["# # Add and commit the files\n","# !git add .\n","# !git commit -m \"Add large dataset files with Git LFS\"\n","# !git push origin main"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"jfpYl67gmTQx","executionInfo":{"status":"ok","timestamp":1730347465815,"user_tz":-345,"elapsed":2469584,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"e1d575f1-10a4-46f3-c3be-45919af943ce"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["fatal: cannot exec '.git/hooks/post-commit': Permission denied\n","[main 3e99b97] Add large dataset files with Git LFS\n"," 2 files changed, 2 insertions(+), 1 deletion(-)\n","fatal: cannot exec '.git/hooks/pre-push': Permission denied\n","^C\n"]}]},{"cell_type":"code","source":["# Local dataset directory\n","local_dir = \"./\" # Path to your dataset folder\n","\n","# Upload all files and folders recursively\n","for root, dirs, files in os.walk(local_dir):\n"," for file in files:\n"," file_path = os.path.join(root, file)\n"," # Upload file to the specified repo with the same directory structure\n"," repo_file_path = os.path.relpath(file_path, local_dir)\n"," if 'chunk_' in repo_file_path:\n"," chunk_id = int(repo_file_path.split('.txt')[0].split('chunk_')[-1])\n"," if chunk_id <= 124:\n"," # have uploaded up to chunk_124.txt before rate limit\n"," continue\n"," api.upload_file(\n"," path_or_fileobj=file_path,\n"," path_in_repo=repo_file_path,\n"," repo_id=repo_id,\n"," repo_type=\"dataset\",\n"," token=token\n"," )\n","\n","print(f\"Dataset uploaded to https://huggingface.co/datasets/{repo_id}\")"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":569},"id":"vVE5N4Zknqwz","executionInfo":{"status":"error","timestamp":1731322122665,"user_tz":-345,"elapsed":1317,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"3ee980d3-5708-4d9f-9981-cf054785f980"},"execution_count":30,"outputs":[{"output_type":"stream","name":"stderr","text":["No files have been modified since last commit. Skipping to prevent empty commit.\n","WARNING:huggingface_hub.hf_api:No files have been modified since last commit. Skipping to prevent empty commit.\n","No files have been modified since last commit. Skipping to prevent empty commit.\n","WARNING:huggingface_hub.hf_api:No files have been modified since last commit. Skipping to prevent empty commit.\n"]},{"output_type":"error","ename":"HfHubHTTPError","evalue":"429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/Aananda-giri/nepali_llm_datasets/commit/main (Request ID: Root=1-6731e109-47ced10a49c2f4467df2db66;8089b996-f027-4edf-a123-35a675331300)\n\nYou have been rate-limited; you can retry this action in 23 minutes. If you're a new user, your limits will raise progressively over time. Get in touch with us at [email protected] if you need access now.","traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mHTTPError\u001b[0m Traceback (most recent call last)","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_errors.py\u001b[0m in \u001b[0;36mhf_raise_for_status\u001b[0;34m(response, endpoint_name)\u001b[0m\n\u001b[1;32m 303\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 304\u001b[0;31m \u001b[0mresponse\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mraise_for_status\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 305\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mHTTPError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/requests/models.py\u001b[0m in \u001b[0;36mraise_for_status\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1023\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhttp_error_msg\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1024\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mHTTPError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhttp_error_msg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresponse\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1025\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mHTTPError\u001b[0m: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/Aananda-giri/nepali_llm_datasets/commit/main","\nThe above exception was the direct cause of the following exception:\n","\u001b[0;31mHfHubHTTPError\u001b[0m Traceback (most recent call last)","\u001b[0;32m<ipython-input-30-c2c3a618cde3>\u001b[0m in \u001b[0;36m<cell line: 5>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0;31m# have uploaded up to chunk_124.txt before rate limit\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[0;32mcontinue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 15\u001b[0;31m api.upload_file(\n\u001b[0m\u001b[1;32m 16\u001b[0m \u001b[0mpath_or_fileobj\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 17\u001b[0m \u001b[0mpath_in_repo\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mrepo_file_path\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py\u001b[0m in \u001b[0;36m_inner_fn\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 112\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msmoothly_deprecate_use_auth_token\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfn_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__name__\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mhas_token\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mhas_token\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 113\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 114\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 115\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 116\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0m_inner_fn\u001b[0m \u001b[0;31m# type: ignore\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py\u001b[0m in \u001b[0;36m_inner\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1396\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1397\u001b[0m \u001b[0;31m# Otherwise, call the function normally\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1398\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1399\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1400\u001b[0m \u001b[0m_inner\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_future_compatible\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m \u001b[0;31m# type: ignore\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py\u001b[0m in \u001b[0;36mupload_file\u001b[0;34m(self, path_or_fileobj, path_in_repo, repo_id, token, repo_type, revision, commit_message, commit_description, create_pr, parent_commit, run_as_future)\u001b[0m\n\u001b[1;32m 4505\u001b[0m )\n\u001b[1;32m 4506\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4507\u001b[0;31m commit_info = self.create_commit(\n\u001b[0m\u001b[1;32m 4508\u001b[0m \u001b[0mrepo_id\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mrepo_id\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4509\u001b[0m \u001b[0mrepo_type\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mrepo_type\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py\u001b[0m in \u001b[0;36m_inner_fn\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 112\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msmoothly_deprecate_use_auth_token\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfn_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__name__\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mhas_token\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mhas_token\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 113\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 114\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 115\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 116\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0m_inner_fn\u001b[0m \u001b[0;31m# type: ignore\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py\u001b[0m in \u001b[0;36m_inner\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1396\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1397\u001b[0m \u001b[0;31m# Otherwise, call the function normally\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1398\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1399\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1400\u001b[0m \u001b[0m_inner\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_future_compatible\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m \u001b[0;31m# type: ignore\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py\u001b[0m in \u001b[0;36mcreate_commit\u001b[0;34m(self, repo_id, operations, commit_message, commit_description, token, repo_type, revision, create_pr, num_threads, parent_commit, run_as_future)\u001b[0m\n\u001b[1;32m 3850\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3851\u001b[0m \u001b[0mcommit_resp\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_session\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpost\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0murl\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcommit_url\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mheaders\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mheaders\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mparams\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mparams\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3852\u001b[0;31m \u001b[0mhf_raise_for_status\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcommit_resp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mendpoint_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"commit\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3853\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mRepositoryNotFoundError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3854\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend_to_message\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0m_CREATE_COMMIT_NO_REPO_ERROR_MESSAGE\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_errors.py\u001b[0m in \u001b[0;36mhf_raise_for_status\u001b[0;34m(response, endpoint_name)\u001b[0m\n\u001b[1;32m 369\u001b[0m \u001b[0;31m# Convert `HTTPError` into a `HfHubHTTPError` to display request information\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 370\u001b[0m \u001b[0;31m# as well (request id and/or server error message)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 371\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mHfHubHTTPError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresponse\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mresponse\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 372\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 373\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mHfHubHTTPError\u001b[0m: 429 Client Error: Too Many Requests for url: https://huggingface.co/api/datasets/Aananda-giri/nepali_llm_datasets/commit/main (Request ID: Root=1-6731e109-47ced10a49c2f4467df2db66;8089b996-f027-4edf-a123-35a675331300)\n\nYou have been rate-limited; you can retry this action in 23 minutes. If you're a new user, your limits will raise progressively over time. Get in touch with us at [email protected] if you need access now."]}]},{"cell_type":"markdown","source":["# Scrapy Engine"],"metadata":{"id":"12wjQTmV1mC6"}},{"cell_type":"code","source":["%cd /content/drive/MyDrive/Research/datasets/hf_datasets"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"nQFSj-qu1qZa","executionInfo":{"status":"ok","timestamp":1730354953749,"user_tz":-345,"elapsed":511,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"e6e4b97a-0ef6-4561-d55f-36070da45f26"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["/content/drive/MyDrive/Research/datasets/hf_datasets\n"]}]},{"cell_type":"code","source":["import os;\n","os.makedirs('scrapy_engine', exist_ok=True)\n","local_dir='scrapy_engine'"],"metadata":{"id":"JOLOGxHo2Qmg"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# Upload to Hugging Face\n","from huggingface_hub import HfApi, Repository\n","import os\n","import shutil\n","\n","# Set your dataset repo name and Hugging Face username\n","username = \"Aananda-giri\" # Replace with your Hugging Face username\n","repo_name = \"nepali_llm_datasets\" # Name for the new dataset repository\n","repo_id = f\"{username}/{repo_name}\" # Full repository ID\n","\n","# Authenticate\n","api = HfApi()\n","# token = \"token\" # Replace with your Hugging Face token\n","\n","# Create the repository if it does not exist\n","api.create_repo(repo_id, token=token, repo_type=\"dataset\", exist_ok=True)"],"metadata":{"id":"Z_ydppJp1zD0"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["!ls"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"cw2zYwBQ8kbC","executionInfo":{"status":"ok","timestamp":1730351776005,"user_tz":-345,"elapsed":534,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"e3cc627f-23f7-4744-a555-335d88105440"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["nepberta preprocess.ipynb scrapy_engine\n"]}]},{"cell_type":"code","source":["!ls"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"HP2Vrtdb_xD-","executionInfo":{"status":"ok","timestamp":1730351817421,"user_tz":-345,"elapsed":479,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"d47fea92-14e1-4695-e3b2-28cceab23133"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["nepberta preprocess.ipynb scrapy_engine\n"]}]},{"cell_type":"code","source":["# copy files from ../scrapy_engine to ./scrapy_engine\n","import shutil\n","files_to_upload = ['cleaned_data.csv']\n","folders_to_upload = ['code']\n","# Upload all files and folders recursively\n","for root, dirs, files in os.walk('../scrapy_engine'):\n","\n"," for file in files:\n"," # print(file)\n"," if file in files_to_upload or True in [root.endswith(folder) for folder in folders_to_upload]:\n"," file_path = os.path.join(root, file)\n"," shutil.copy(file_path, './scrapy_engine')\n"," print(root, file_path)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"YY_-3KEi2bDz","executionInfo":{"status":"ok","timestamp":1730353869657,"user_tz":-345,"elapsed":61495,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"538463a1-d953-4e5e-afa2-d1929821a1a6"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["../scrapy_engine ../scrapy_engine/cleaned_data.csv\n","../scrapy_engine/code ../scrapy_engine/code/load_data.py\n","../scrapy_engine/code ../scrapy_engine/code/2. pre-process.ipynb\n","../scrapy_engine/code ../scrapy_engine/code/0. load_data.ipynb\n","../scrapy_engine/code ../scrapy_engine/code/1. merge-data.ipynb\n"]}]},{"cell_type":"code","source":["local_dir= './'\n","# Upload all files and folders recursively\n","for root, dirs, files in os.walk(local_dir):\n"," if root.endswith('scrapy_engine'):\n"," for file in files:\n"," file_path = os.path.join(root, file)\n"," # Upload file to the specified repo with the same directory structure\n"," repo_file_path = os.path.relpath(file_path, local_dir)\n"," api.upload_file(\n"," path_or_fileobj=file_path,\n"," path_in_repo=repo_file_path,\n"," repo_id=repo_id,\n"," repo_type=\"dataset\",\n"," token=token\n"," )\n","\n","print(f\"Dataset uploaded to https://huggingface.co/datasets/{repo_id}\")"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":370},"id":"aNCdTVw_5RUo","executionInfo":{"status":"error","timestamp":1731323215092,"user_tz":-345,"elapsed":5694,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"c549200e-7434-4780-e3b8-e2f35b97a6dc"},"execution_count":44,"outputs":[{"output_type":"error","ename":"KeyboardInterrupt","evalue":"","traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)","\u001b[0;32m<ipython-input-44-8596de9d2a55>\u001b[0m in \u001b[0;36m<cell line: 3>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0;31m# Upload file to the specified repo with the same directory structure\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0mrepo_file_path\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrelpath\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlocal_dir\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 9\u001b[0;31m api.upload_file(\n\u001b[0m\u001b[1;32m 10\u001b[0m \u001b[0mpath_or_fileobj\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0mpath_in_repo\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mrepo_file_path\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py\u001b[0m in \u001b[0;36m_inner_fn\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 112\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msmoothly_deprecate_use_auth_token\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfn_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__name__\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mhas_token\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mhas_token\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 113\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 114\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 115\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 116\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0m_inner_fn\u001b[0m \u001b[0;31m# type: ignore\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py\u001b[0m in \u001b[0;36m_inner\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1396\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1397\u001b[0m \u001b[0;31m# Otherwise, call the function normally\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1398\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1399\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1400\u001b[0m \u001b[0m_inner\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_future_compatible\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m \u001b[0;31m# type: ignore\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py\u001b[0m in \u001b[0;36mupload_file\u001b[0;34m(self, path_or_fileobj, path_in_repo, repo_id, token, repo_type, revision, commit_message, commit_description, create_pr, parent_commit, run_as_future)\u001b[0m\n\u001b[1;32m 4500\u001b[0m \u001b[0mcommit_message\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcommit_message\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0;34mf\"Upload {path_in_repo} with huggingface_hub\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4501\u001b[0m )\n\u001b[0;32m-> 4502\u001b[0;31m operation = CommitOperationAdd(\n\u001b[0m\u001b[1;32m 4503\u001b[0m \u001b[0mpath_or_fileobj\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mpath_or_fileobj\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4504\u001b[0m \u001b[0mpath_in_repo\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mpath_in_repo\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/_commit_api.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, path_in_repo, path_or_fileobj)\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/_commit_api.py\u001b[0m in \u001b[0;36m__post_init__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 187\u001b[0m \u001b[0;31m# Compute \"upload_info\" attribute\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 188\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath_or_fileobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 189\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mupload_info\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mUploadInfo\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfrom_path\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath_or_fileobj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 190\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath_or_fileobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbytes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 191\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mupload_info\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mUploadInfo\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfrom_bytes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath_or_fileobj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/lfs.py\u001b[0m in \u001b[0;36mfrom_path\u001b[0;34m(cls, path)\u001b[0m\n\u001b[1;32m 82\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mio\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"rb\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mfile\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 83\u001b[0m \u001b[0msample\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfile\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpeek\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m512\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;36m512\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 84\u001b[0;31m \u001b[0msha\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msha_fileobj\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 85\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mcls\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msize\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msize\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msha256\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msha\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msample\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0msample\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/sha.py\u001b[0m in \u001b[0;36msha_fileobj\u001b[0;34m(fileobj, chunk_size)\u001b[0m\n\u001b[1;32m 23\u001b[0m \u001b[0msha\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msha256\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 25\u001b[0;31m \u001b[0mchunk\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfileobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mchunk_size\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 26\u001b[0m \u001b[0msha\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mchunk\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 27\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mchunk\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mKeyboardInterrupt\u001b[0m: "]}]},{"cell_type":"code","source":["# # List of files to delete\n","# files_to_delete = [\n","# \"cleaned_data.csv\",\n","# \"load_data.py\",\n","# \"2. pre-process.ipynb\",\n","# \"0. load_data.ipynb\",\n","# \"1. merge-data.ipynb\"\n","# ]\n","\n","# # Delete each file\n","# for file_path in files_to_delete:\n","# api.delete_file(\n","# path_in_repo=file_path,\n","# repo_id=repo_id,\n","# repo_type=\"dataset\",\n","# token=token\n","# )"],"metadata":{"id":"tAYT74By8Cw2"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["# README\n","* config-structure: https://huggingface.co/docs/datasets/en/repository_structure\n","\n","* upload single file: https://huggingface.co/docs/datasets/en/share\n"],"metadata":{"id":"Fl_OX3OBMUwF"}},{"cell_type":"code","source":["# 80% for training and 20% for testing\n","import os\n","import yaml\n","\n","# Path to the directory containing the .txt files\n","data_dir = \"nepberta/clean_date_categories/\"\n","files = sorted([f for f in os.listdir(data_dir) if f.endswith('.txt')])\n","\n","# Calculate split sizes (80% for training, 20% for testing)\n","train_size = int(0.8 * len(files))\n","\n","# Split the files into train and test\n","train_files = files[:train_size]\n","test_files = files[train_size:]\n","\n","# Create the configuration\n","config = {\n"," \"configs\": [\n"," {\n"," \"config_name\": \"nepberta\",\n"," \"data_files\": [\n","\n"," {\n"," \"split\": \"test\",\n"," \"path\": [os.path.join(data_dir, f) for f in test_files]\n"," }\n"," ]\n"," }\n"," ]\n","}\n","\n","# print(config)\n","# # Print or save the config\n","import yaml\n","print(yaml.dump(config))\n","\n","# # Save the config to a text file\n","# with open(\"dataset_config.yaml\", \"w\") as file:\n","# yaml.dump(config, file)\n","\n","# print(\"Configuration saved to dataset_config.yaml\")"],"metadata":{"id":"K8rMd6YKAFXN"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["%%writefile README.md\n","---\n","configs:\n","- config_name: nepberta\n"," data_files:\n"," - split: train\n"," path:\n"," - nepberta/clean_date_categories/chunk_1.txt\n"," - nepberta/clean_date_categories/chunk_10.txt\n"," - nepberta/clean_date_categories/chunk_100.txt\n"," - nepberta/clean_date_categories/chunk_101.txt\n"," - nepberta/clean_date_categories/chunk_102.txt\n"," - nepberta/clean_date_categories/chunk_103.txt\n"," - nepberta/clean_date_categories/chunk_104.txt\n"," - nepberta/clean_date_categories/chunk_105.txt\n"," - nepberta/clean_date_categories/chunk_106.txt\n"," - nepberta/clean_date_categories/chunk_107.txt\n"," - nepberta/clean_date_categories/chunk_108.txt\n"," - nepberta/clean_date_categories/chunk_109.txt\n"," - nepberta/clean_date_categories/chunk_11.txt\n"," - nepberta/clean_date_categories/chunk_110.txt\n"," - nepberta/clean_date_categories/chunk_111.txt\n"," - nepberta/clean_date_categories/chunk_112.txt\n"," - nepberta/clean_date_categories/chunk_113.txt\n"," - nepberta/clean_date_categories/chunk_114.txt\n"," - nepberta/clean_date_categories/chunk_115.txt\n"," - nepberta/clean_date_categories/chunk_116.txt\n"," - nepberta/clean_date_categories/chunk_117.txt\n"," - nepberta/clean_date_categories/chunk_118.txt\n"," - nepberta/clean_date_categories/chunk_119.txt\n"," - nepberta/clean_date_categories/chunk_12.txt\n"," - nepberta/clean_date_categories/chunk_120.txt\n"," - nepberta/clean_date_categories/chunk_121.txt\n"," - nepberta/clean_date_categories/chunk_122.txt\n"," - nepberta/clean_date_categories/chunk_123.txt\n"," - nepberta/clean_date_categories/chunk_124.txt\n"," - nepberta/clean_date_categories/chunk_125.txt\n"," - nepberta/clean_date_categories/chunk_126.txt\n"," - nepberta/clean_date_categories/chunk_127.txt\n"," - nepberta/clean_date_categories/chunk_128.txt\n"," - nepberta/clean_date_categories/chunk_129.txt\n"," - nepberta/clean_date_categories/chunk_13.txt\n"," - nepberta/clean_date_categories/chunk_130.txt\n"," - nepberta/clean_date_categories/chunk_131.txt\n"," - nepberta/clean_date_categories/chunk_132.txt\n"," - nepberta/clean_date_categories/chunk_133.txt\n"," - nepberta/clean_date_categories/chunk_134.txt\n"," - nepberta/clean_date_categories/chunk_135.txt\n"," - nepberta/clean_date_categories/chunk_136.txt\n"," - nepberta/clean_date_categories/chunk_137.txt\n"," - nepberta/clean_date_categories/chunk_138.txt\n"," - nepberta/clean_date_categories/chunk_139.txt\n"," - nepberta/clean_date_categories/chunk_14.txt\n"," - nepberta/clean_date_categories/chunk_140.txt\n"," - nepberta/clean_date_categories/chunk_141.txt\n"," - nepberta/clean_date_categories/chunk_142.txt\n"," - nepberta/clean_date_categories/chunk_143.txt\n"," - nepberta/clean_date_categories/chunk_144.txt\n"," - nepberta/clean_date_categories/chunk_145.txt\n"," - nepberta/clean_date_categories/chunk_146.txt\n"," - nepberta/clean_date_categories/chunk_147.txt\n"," - nepberta/clean_date_categories/chunk_148.txt\n"," - nepberta/clean_date_categories/chunk_149.txt\n"," - nepberta/clean_date_categories/chunk_15.txt\n"," - nepberta/clean_date_categories/chunk_150.txt\n"," - nepberta/clean_date_categories/chunk_151.txt\n"," - nepberta/clean_date_categories/chunk_152.txt\n"," - nepberta/clean_date_categories/chunk_153.txt\n"," - nepberta/clean_date_categories/chunk_154.txt\n"," - nepberta/clean_date_categories/chunk_155.txt\n"," - nepberta/clean_date_categories/chunk_156.txt\n"," - nepberta/clean_date_categories/chunk_157.txt\n"," - nepberta/clean_date_categories/chunk_158.txt\n"," - nepberta/clean_date_categories/chunk_159.txt\n"," - nepberta/clean_date_categories/chunk_16.txt\n"," - nepberta/clean_date_categories/chunk_160.txt\n"," - nepberta/clean_date_categories/chunk_161.txt\n"," - nepberta/clean_date_categories/chunk_162.txt\n"," - nepberta/clean_date_categories/chunk_163.txt\n"," - nepberta/clean_date_categories/chunk_164.txt\n"," - nepberta/clean_date_categories/chunk_165.txt\n"," - nepberta/clean_date_categories/chunk_166.txt\n"," - nepberta/clean_date_categories/chunk_167.txt\n"," - nepberta/clean_date_categories/chunk_168.txt\n"," - nepberta/clean_date_categories/chunk_169.txt\n"," - nepberta/clean_date_categories/chunk_17.txt\n"," - nepberta/clean_date_categories/chunk_170.txt\n"," - nepberta/clean_date_categories/chunk_171.txt\n"," - nepberta/clean_date_categories/chunk_172.txt\n"," - nepberta/clean_date_categories/chunk_173.txt\n"," - nepberta/clean_date_categories/chunk_174.txt\n"," - nepberta/clean_date_categories/chunk_175.txt\n"," - nepberta/clean_date_categories/chunk_176.txt\n"," - nepberta/clean_date_categories/chunk_177.txt\n"," - nepberta/clean_date_categories/chunk_178.txt\n"," - nepberta/clean_date_categories/chunk_179.txt\n"," - nepberta/clean_date_categories/chunk_18.txt\n"," - nepberta/clean_date_categories/chunk_180.txt\n"," - nepberta/clean_date_categories/chunk_181.txt\n"," - nepberta/clean_date_categories/chunk_182.txt\n"," - nepberta/clean_date_categories/chunk_183.txt\n"," - nepberta/clean_date_categories/chunk_184.txt\n"," - nepberta/clean_date_categories/chunk_185.txt\n"," - nepberta/clean_date_categories/chunk_186.txt\n"," - nepberta/clean_date_categories/chunk_187.txt\n"," - nepberta/clean_date_categories/chunk_188.txt\n"," - nepberta/clean_date_categories/chunk_189.txt\n"," - nepberta/clean_date_categories/chunk_19.txt\n"," - nepberta/clean_date_categories/chunk_190.txt\n"," - nepberta/clean_date_categories/chunk_191.txt\n"," - nepberta/clean_date_categories/chunk_192.txt\n"," - nepberta/clean_date_categories/chunk_193.txt\n"," - nepberta/clean_date_categories/chunk_194.txt\n"," - nepberta/clean_date_categories/chunk_195.txt\n"," - nepberta/clean_date_categories/chunk_196.txt\n"," - nepberta/clean_date_categories/chunk_197.txt\n"," - nepberta/clean_date_categories/chunk_198.txt\n"," - nepberta/clean_date_categories/chunk_199.txt\n"," - nepberta/clean_date_categories/chunk_2.txt\n"," - nepberta/clean_date_categories/chunk_20.txt\n"," - nepberta/clean_date_categories/chunk_200.txt\n"," - nepberta/clean_date_categories/chunk_201.txt\n"," - nepberta/clean_date_categories/chunk_202.txt\n"," - nepberta/clean_date_categories/chunk_203.txt\n"," - nepberta/clean_date_categories/chunk_204.txt\n"," - nepberta/clean_date_categories/chunk_205.txt\n"," - nepberta/clean_date_categories/chunk_206.txt\n"," - nepberta/clean_date_categories/chunk_207.txt\n"," - nepberta/clean_date_categories/chunk_208.txt\n"," - nepberta/clean_date_categories/chunk_209.txt\n"," - nepberta/clean_date_categories/chunk_21.txt\n"," - nepberta/clean_date_categories/chunk_210.txt\n"," - nepberta/clean_date_categories/chunk_211.txt\n"," - nepberta/clean_date_categories/chunk_212.txt\n"," - nepberta/clean_date_categories/chunk_213.txt\n"," - nepberta/clean_date_categories/chunk_214.txt\n"," - nepberta/clean_date_categories/chunk_215.txt\n"," - nepberta/clean_date_categories/chunk_216.txt\n"," - nepberta/clean_date_categories/chunk_217.txt\n"," - nepberta/clean_date_categories/chunk_218.txt\n"," - nepberta/clean_date_categories/chunk_219.txt\n"," - nepberta/clean_date_categories/chunk_22.txt\n"," - nepberta/clean_date_categories/chunk_220.txt\n"," - nepberta/clean_date_categories/chunk_221.txt\n"," - nepberta/clean_date_categories/chunk_222.txt\n"," - nepberta/clean_date_categories/chunk_223.txt\n"," - nepberta/clean_date_categories/chunk_224.txt\n"," - nepberta/clean_date_categories/chunk_225.txt\n"," - nepberta/clean_date_categories/chunk_226.txt\n"," - nepberta/clean_date_categories/chunk_227.txt\n"," - nepberta/clean_date_categories/chunk_228.txt\n"," - nepberta/clean_date_categories/chunk_229.txt\n"," - nepberta/clean_date_categories/chunk_23.txt\n"," - nepberta/clean_date_categories/chunk_230.txt\n"," - nepberta/clean_date_categories/chunk_24.txt\n"," - nepberta/clean_date_categories/chunk_25.txt\n"," - nepberta/clean_date_categories/chunk_26.txt\n"," - nepberta/clean_date_categories/chunk_27.txt\n"," - nepberta/clean_date_categories/chunk_28.txt\n"," - nepberta/clean_date_categories/chunk_29.txt\n"," - nepberta/clean_date_categories/chunk_3.txt\n"," - nepberta/clean_date_categories/chunk_30.txt\n"," - nepberta/clean_date_categories/chunk_31.txt\n"," - nepberta/clean_date_categories/chunk_32.txt\n"," - nepberta/clean_date_categories/chunk_33.txt\n"," - nepberta/clean_date_categories/chunk_34.txt\n"," - nepberta/clean_date_categories/chunk_35.txt\n"," - nepberta/clean_date_categories/chunk_36.txt\n"," - nepberta/clean_date_categories/chunk_37.txt\n"," - nepberta/clean_date_categories/chunk_38.txt\n"," - nepberta/clean_date_categories/chunk_39.txt\n"," - nepberta/clean_date_categories/chunk_4.txt\n"," - nepberta/clean_date_categories/chunk_40.txt\n"," - nepberta/clean_date_categories/chunk_41.txt\n"," - nepberta/clean_date_categories/chunk_42.txt\n"," - nepberta/clean_date_categories/chunk_43.txt\n"," - nepberta/clean_date_categories/chunk_44.txt\n"," - nepberta/clean_date_categories/chunk_45.txt\n"," - nepberta/clean_date_categories/chunk_46.txt\n"," - nepberta/clean_date_categories/chunk_47.txt\n"," - nepberta/clean_date_categories/chunk_48.txt\n"," - nepberta/clean_date_categories/chunk_49.txt\n"," - nepberta/clean_date_categories/chunk_5.txt\n"," - nepberta/clean_date_categories/chunk_50.txt\n"," - nepberta/clean_date_categories/chunk_51.txt\n"," - nepberta/clean_date_categories/chunk_52.txt\n"," - nepberta/clean_date_categories/chunk_53.txt\n"," - nepberta/clean_date_categories/chunk_54.txt\n"," - nepberta/clean_date_categories/chunk_55.txt\n"," - nepberta/clean_date_categories/chunk_56.txt\n"," - nepberta/clean_date_categories/chunk_57.txt\n"," - split: test\n"," path:\n"," - nepberta/clean_date_categories/chunk_58.txt\n"," - nepberta/clean_date_categories/chunk_59.txt\n"," - nepberta/clean_date_categories/chunk_6.txt\n"," - nepberta/clean_date_categories/chunk_60.txt\n"," - nepberta/clean_date_categories/chunk_61.txt\n"," - nepberta/clean_date_categories/chunk_62.txt\n"," - nepberta/clean_date_categories/chunk_63.txt\n"," - nepberta/clean_date_categories/chunk_64.txt\n"," - nepberta/clean_date_categories/chunk_65.txt\n"," - nepberta/clean_date_categories/chunk_66.txt\n"," - nepberta/clean_date_categories/chunk_67.txt\n"," - nepberta/clean_date_categories/chunk_68.txt\n"," - nepberta/clean_date_categories/chunk_69.txt\n"," - nepberta/clean_date_categories/chunk_7.txt\n"," - nepberta/clean_date_categories/chunk_70.txt\n"," - nepberta/clean_date_categories/chunk_71.txt\n"," - nepberta/clean_date_categories/chunk_72.txt\n"," - nepberta/clean_date_categories/chunk_73.txt\n"," - nepberta/clean_date_categories/chunk_74.txt\n"," - nepberta/clean_date_categories/chunk_75.txt\n"," - nepberta/clean_date_categories/chunk_76.txt\n"," - nepberta/clean_date_categories/chunk_77.txt\n"," - nepberta/clean_date_categories/chunk_78.txt\n"," - nepberta/clean_date_categories/chunk_79.txt\n"," - nepberta/clean_date_categories/chunk_8.txt\n"," - nepberta/clean_date_categories/chunk_80.txt\n"," - nepberta/clean_date_categories/chunk_81.txt\n"," - nepberta/clean_date_categories/chunk_82.txt\n"," - nepberta/clean_date_categories/chunk_83.txt\n"," - nepberta/clean_date_categories/chunk_84.txt\n"," - nepberta/clean_date_categories/chunk_85.txt\n"," - nepberta/clean_date_categories/chunk_86.txt\n"," - nepberta/clean_date_categories/chunk_87.txt\n"," - nepberta/clean_date_categories/chunk_88.txt\n"," - nepberta/clean_date_categories/chunk_89.txt\n"," - nepberta/clean_date_categories/chunk_9.txt\n"," - nepberta/clean_date_categories/chunk_90.txt\n"," - nepberta/clean_date_categories/chunk_91.txt\n"," - nepberta/clean_date_categories/chunk_92.txt\n"," - nepberta/clean_date_categories/chunk_93.txt\n"," - nepberta/clean_date_categories/chunk_94.txt\n"," - nepberta/clean_date_categories/chunk_95.txt\n"," - nepberta/clean_date_categories/chunk_96.txt\n"," - nepberta/clean_date_categories/chunk_97.txt\n"," - nepberta/clean_date_categories/chunk_98.txt\n"," - nepberta/clean_date_categories/chunk_99.txt\n","- config_name: scrapy_engine\n"," data_files:\n"," - split: train\n"," path:\n"," - \"scrapy_engine/cleaned_data.csv\"\n","---\n","# Nepali LLM Datasets\n","\n","This repository contains two configurations of Nepali LLM datasets:\n","\n","## Configurations\n","\n","### 1. Scrapy Engine\n","- Description: Contains data collected using a web scraping engine.\n","- Files: [List any specific files or formats]\n","\n","### 2. Nepberta\n","- Description: This dataset is derived from the Nepberta project and contains cleaned data specifically related to the project. The dataset contains **cleaned text chunks of size ~50 mb ** of all articles into a single giant string, with each article ending in <|endoftext|>. This long string is then segmented into chunks, each approximately 500 MB in size.\n","- Files: contains 23 files each ~500Mb (chunk_1.txt, chunk_2.txt, ... chunk_23.txt)\n","- split:train\n"," * files: chunk_1.txt to chunk_18.txt\n","- split:test\n"," * files: chunk_19.txt to chunk_23.txt\n","\n","## Usage\n","\n","To load the datasets:\n","\n","```python\n","# it loads entire dataset first\n","from datasets import load_dataset\n","\n","# Load nepberta configuration\n","nepberta_train = load_dataset(\"Aananda-giri/nepali_llm_datasets\", name=\"nepberta\", split='train[0:2]') # load 2 chunks, streaming mode to avoid downloading all the dataset\n","\n","# length of chunks\n","len(nepberta_train['text']) # 18 : number of chunks\n","len(nepberta_train['text'][0]) # length of large text equivalent to 500 MB text\n","\n","# use streaming=True to avoid downloading entire dataset\n","nepberta_train = load_dataset(\"Aananda-giri/nepali_llm_datasets\", name=\"nepberta\", streaming=True)['train']\n","\n","# using next\n","next(iter(nepberta_train))\n","\n","# using for loop\n","for large_chunk in nepberta_train:\n"," pass\n"," # code to process large_chunk['text']\n","\n","# Load scrapy engine data\n","scrapy_train = load_dataset(\"Aananda-giri/nepali_llm_datasets\", name=\"scrapy_engine\" split=\"train\")\n","```"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"raD8GFb-MXk5","executionInfo":{"status":"ok","timestamp":1731323131237,"user_tz":-345,"elapsed":668,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"29752729-900f-4cd1-88e0-1f96349ccaa8"},"execution_count":41,"outputs":[{"output_type":"stream","name":"stdout","text":["Overwriting README.md\n"]}]},{"cell_type":"code","source":["!huggingface-cli login"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"2GA77Y-yMbvz","executionInfo":{"status":"ok","timestamp":1731323152676,"user_tz":-345,"elapsed":12210,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"667781ba-0b01-41a5-9170-e09a2ea555fd"},"execution_count":42,"outputs":[{"output_type":"stream","name":"stdout","text":["\n"," _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_|\n"," _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n"," _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_|\n"," _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n"," _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_|\n","\n"," A token is already saved on your machine. Run `huggingface-cli whoami` to get more information or `huggingface-cli logout` if you want to log out.\n"," Setting a new token will erase the existing one.\n"," To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .\n","Enter your token (input will not be visible): \n","Add token as git credential? (Y/n) \n","Token is valid (permission: write).\n","Your token has been saved in your configured git credential helpers (store).\n","Your token has been saved to /root/.cache/huggingface/token\n","Login successful\n"]}]},{"cell_type":"code","source":["!huggingface-cli upload Aananda-giri/nepali_llm_datasets README.md --repo-type dataset"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"7pzWPB_sPjCx","executionInfo":{"status":"ok","timestamp":1731323156267,"user_tz":-345,"elapsed":1287,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"edca3064-5cbc-4b01-fd85-51e5aded4773"},"execution_count":43,"outputs":[{"output_type":"stream","name":"stdout","text":["Consider using `hf_transfer` for faster uploads. This solution comes with some limitations. See https://huggingface.co/docs/huggingface_hub/hf_transfer for more details.\n","https://huggingface.co/datasets/Aananda-giri/nepali_llm_datasets/blob/main/README.md\n"]}]},{"cell_type":"code","source":["!ls"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"ccdn05DtNY_s","executionInfo":{"status":"ok","timestamp":1730355240936,"user_tz":-345,"elapsed":691,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"5e24d8d7-6d27-40c4-8691-0699088e05c1"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["nepberta preprocess.ipynb README.md scrapy_engine\n"]}]},{"cell_type":"markdown","source":["# Create new smaller dataset with only 3 500Mb chunks"],"metadata":{"id":"QNCTz0nTWpkG"}},{"cell_type":"code","source":["!pip install datasets --quiet"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"AMIK15hvWxFo","executionInfo":{"status":"ok","timestamp":1730898481342,"user_tz":-345,"elapsed":6902,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"de16f913-7811-4a8c-8e90-2698b2ec918a"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/480.6 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━━━━━━━━━━\u001b[0m \u001b[32m358.4/480.6 kB\u001b[0m \u001b[31m10.9 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m480.6/480.6 kB\u001b[0m \u001b[31m8.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25h\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/116.3 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m116.3/116.3 kB\u001b[0m \u001b[31m8.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25h\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/179.3 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m179.3/179.3 kB\u001b[0m \u001b[31m12.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m9.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m12.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25h\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n","gcsfs 2024.10.0 requires fsspec==2024.10.0, but you have fsspec 2024.9.0 which is incompatible.\u001b[0m\u001b[31m\n","\u001b[0m"]}]},{"cell_type":"code","source":["!huggingface-cli login"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"ZHH-8x0yWvTa","executionInfo":{"status":"ok","timestamp":1730898461818,"user_tz":-345,"elapsed":7265,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"9881f98e-8599-4501-f124-135b76f39e7f"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["\n"," _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_|\n"," _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n"," _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_|\n"," _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n"," _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_|\n","\n"," To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .\n","Enter your token (input will not be visible): \n","Add token as git credential? (Y/n) \n","Token is valid (permission: write).\n","\u001b[1m\u001b[31mCannot authenticate through git-credential as no helper is defined on your machine.\n","You might have to re-authenticate when pushing to the Hugging Face Hub.\n","Run the following command in your terminal in case you want to set the 'store' credential helper as default.\n","\n","git config --global credential.helper store\n","\n","Read https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage for more details.\u001b[0m\n","Token has not been saved to git credential helper.\n","Your token has been saved to /root/.cache/huggingface/token\n","Login successful\n"]}]},{"cell_type":"code","source":["from datasets import load_dataset\n","\n","# Load only three chunks from the streaming dataset\n","nepberta_train_stream = load_dataset(\"Aananda-giri/nepali_llm_datasets\", \"nepberta\", streaming=True)[\"train\"]\n","\n","target_dir = 'nepberta_sample'\n","import os; os.mkdir(target_dir)\n","\n","# Save each chunk to a separate text file\n","for i in range(3):\n"," chunk = next(iter(nepberta_train_stream)) # Get the next chunk\n"," with open(os.path.join(target_dir, f\"combined_{i+1}.txt\"), \"w\", encoding=\"utf-8\") as file:\n"," file.write(chunk['text'])\n"," print(f\"Saved chunk {i+1} to chunk_{i+1}.txt\")\n"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":296,"referenced_widgets":["a8b08c8c81864956842eeccb2d35b68a","af2ebaa449c3408a8f8d5926d694a9c3","d028dcbec0b24a6e8c5831cb446daa9e","ebd147bc3e044a068382202b03bacc65","da819c8d0e9a4c20ad677bfabd9d52c0","e3e63279aab74035a2a83cd2a71b3c42","4916f45b33ec43939b45146ce403582b","5e1dd7c74aaa49f7a34846133821274d","908cf8e9f4ba43689f0cd4e298568023","7f048462fe19469599a5f5cbae38d2b7","9561e9470a3f4cb4a8afb9a3de25d7c0","268f3ecc25b84d03b70a73067076fb32","d9dd3f5c510447bcb797f83fbf583b59","f40616f17a064e62aee1a1a40b0d0026","2b04cf46f1304fd1a23df536d5606162","ed3edb30df0140ce9943a56e99a2bec4","fb814dcbdeb44737a4a307b0c6a5d7c8","1eb6399f4bf04a788f430e5253a16512","e39b5aa571ef421aab0d407922d52dc4","7695cd996e734e9eb6a0a9c908f1fe54","8c88f36a041f428b817ca9a8097de523","04acddcf0c854be8a5ff4985325a4c4d","129c369755b24f4c92951e0e76e6a323","4c3aa5012225469ca7b5807029e37bda","5c22186fbd044120b435cc42e9d2bd11","0eb6e892ad6643968f4b48370772f1cf","7a6ec45fd1194d02b136e2b00772ec0d","c0acb78cd5804cefbc5b6d735c9d5296","7dcf9f6e2166488c9acbb89022c44791","e9b5ee3275304ec0ae19485cdcbadfa3","7ca41e8938d94c01bd38b28e094c6d70","e9abc0645507492d8fa46f6e0cb1e54d","a55aa66d7eb9445ca18753044b970144"]},"id":"2BYsbBXJWt08","executionInfo":{"status":"ok","timestamp":1730898708611,"user_tz":-345,"elapsed":227272,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"c672419f-6c97-457d-9980-bee233ddd6ad"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:89: UserWarning: \n","The secret `HF_TOKEN` does not exist in your Colab secrets.\n","To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n","You will be able to reuse this secret in all of your notebooks.\n","Please note that authentication is recommended but still optional to access public models or datasets.\n"," warnings.warn(\n"]},{"output_type":"display_data","data":{"text/plain":["README.md: 0%| | 0.00/3.12k [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"a8b08c8c81864956842eeccb2d35b68a"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Resolving data files: 0%| | 0/18 [00:00<?, ?it/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"268f3ecc25b84d03b70a73067076fb32"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Resolving data files: 0%| | 0/18 [00:00<?, ?it/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"129c369755b24f4c92951e0e76e6a323"}},"metadata":{}},{"output_type":"stream","name":"stdout","text":["Saved chunk 1 to chunk_1.txt\n","Saved chunk 2 to chunk_2.txt\n","Saved chunk 3 to chunk_3.txt\n"]}]},{"cell_type":"code","source":["from datasets import Dataset, DatasetDict, load_dataset\n","\n","# Load the text files as a dataset\n","new_dataset = load_dataset(\"text\", data_files=\"nepberta_sample/*.txt\", split=\"train\")\n","\n","# Wrap in a DatasetDict for compatibility with push_to_hub\n","new_dataset_dict = DatasetDict({\"train\": new_dataset})\n","\n","# Push to Hugging Face Hub\n","new_dataset_dict.push_to_hub(\"Aananda-giri/nepberta-sample\")"],"metadata":{"id":"ywMjICcLhKm9"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["!huggingface-cli upload Aananda-giri/nepberta-sample ./nepberta_sample . --repo-type dataset"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"SfllprS0k8Ni","executionInfo":{"status":"ok","timestamp":1730898758629,"user_tz":-345,"elapsed":24810,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"34dc090f-2ac7-472c-b56e-e2ddf621214a"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Consider using `hf_transfer` for faster uploads. This solution comes with some limitations. See https://huggingface.co/docs/huggingface_hub/hf_transfer for more details.\n","combined_3.txt: 0% 0.00/524M [00:00<?, ?B/s]\n","Upload 3 LFS files: 0% 0/3 [00:00<?, ?it/s]\u001b[A\n","\n","combined_3.txt: 0% 0.00/524M [00:00<?, ?B/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 0% 98.3k/524M [00:00<10:03, 869kB/s]\n","\n","combined_3.txt: 0% 606k/524M [00:00<01:33, 5.59MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 0% 344k/524M [00:00<02:47, 3.13MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 2% 9.34M/524M [00:00<00:10, 47.9MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 1% 3.39M/524M [00:00<00:35, 14.5MB/s]\n","\n","\n","combined_3.txt: 1% 5.65M/524M [00:00<00:31, 16.2MB/s]\n","\n","combined_3.txt: 2% 10.0M/524M [00:00<00:21, 24.4MB/s]\n","\n","\n","combined_3.txt: 3% 16.0M/524M [00:00<00:18, 27.9MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 3% 13.7M/524M [00:00<00:18, 27.3MB/s]\n","\n","\n","combined_3.txt: 4% 22.4M/524M [00:00<00:14, 34.4MB/s]\u001b[A\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 3% 16.5M/524M [00:00<00:27, 18.7MB/s]\n","\n","combined_3.txt: 4% 22.5M/524M [00:00<00:17, 27.9MB/s]\n","\n","combined_3.txt: 8% 43.3M/524M [00:00<00:09, 49.3MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 5% 28.0M/524M [00:01<00:15, 31.3MB/s]\n","\n","\n","combined_3.txt: 8% 39.5M/524M [00:01<00:13, 35.4MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 10% 50.0M/524M [00:01<00:11, 42.3MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 9% 46.6M/524M [00:01<00:11, 41.9MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 6% 32.0M/524M [00:01<00:20, 23.5MB/s]\n","\n","\n","combined_3.txt: 7% 39.2M/524M [00:01<00:14, 32.9MB/s]\n","\n","\n","combined_3.txt: 9% 45.5M/524M [00:01<00:13, 36.7MB/s]\n","\n","combined_3.txt: 12% 64.0M/524M [00:01<00:12, 35.8MB/s]\u001b[A\u001b[A\n","\n","combined_3.txt: 12% 60.6M/524M [00:01<00:09, 47.2MB/s]\n","\n","combined_3.txt: 15% 80.0M/524M [00:01<00:10, 40.5MB/s]\u001b[A\u001b[A\n","\n","combined_3.txt: 18% 93.5M/524M [00:02<00:07, 56.1MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 13% 66.4M/524M [00:02<00:12, 37.0MB/s]\n","\n","\n","combined_3.txt: 14% 75.0M/524M [00:02<00:10, 44.8MB/s]\n","\n","combined_3.txt: 19% 100M/524M [00:02<00:10, 42.3MB/s] \u001b[A\u001b[A\n","\n","\n","combined_3.txt: 15% 77.5M/524M [00:02<00:13, 32.8MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 15% 80.5M/524M [00:02<00:12, 35.0MB/s]\n","\n","\n","combined_3.txt: 17% 91.2M/524M [00:02<00:08, 48.3MB/s]\n","\n","\n","combined_3.txt: 17% 88.7M/524M [00:02<00:12, 34.0MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 21% 112M/524M [00:02<00:11, 35.9MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 18% 94.5M/524M [00:02<00:11, 38.0MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 19% 97.6M/524M [00:02<00:11, 38.7MB/s]\n","\n","combined_3.txt: 24% 125M/524M [00:02<00:09, 43.8MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 21% 110M/524M [00:03<00:08, 46.6MB/s]\n","\n","\n","combined_3.txt: 20% 104M/524M [00:03<00:11, 35.3MB/s] \u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 25% 130M/524M [00:03<00:10, 36.8MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 21% 112M/524M [00:03<00:09, 41.3MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 26% 136M/524M [00:03<00:09, 39.4MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 22% 116M/524M [00:03<00:11, 34.6MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 27% 144M/524M [00:03<00:10, 37.8MB/s]\u001b[A\u001b[A\n","\n","combined_3.txt: 24% 124M/524M [00:03<00:12, 30.8MB/s]\n","\n","\n","combined_3.txt: 24% 128M/524M [00:03<00:12, 32.4MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 31% 160M/524M [00:03<00:09, 39.1MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 26% 136M/524M [00:03<00:09, 39.2MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 26% 135M/524M [00:04<00:11, 34.0MB/s]\n","\n","\n","combined_3.txt: 27% 140M/524M [00:04<00:10, 35.2MB/s]\n","\n","combined_3.txt: 34% 178M/524M [00:04<00:09, 38.0MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 28% 147M/524M [00:04<00:10, 34.8MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 35% 185M/524M [00:04<00:07, 43.5MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 28% 144M/524M [00:04<00:13, 27.8MB/s]\n","\n","combined_3.txt: 29% 150M/524M [00:04<00:11, 32.0MB/s]\n","\n","\n","combined_3.txt: 31% 160M/524M [00:04<00:11, 32.1MB/s]\u001b[A\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 33% 173M/524M [00:04<00:07, 49.9MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 31% 160M/524M [00:04<00:10, 33.9MB/s]\n","\n","combined_3.txt: 33% 174M/524M [00:05<00:07, 45.3MB/s]\n","\n","\n","combined_3.txt: 34% 180M/524M [00:05<00:09, 37.1MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 40% 208M/524M [00:05<00:09, 32.7MB/s]\u001b[A\u001b[A\n","\n","combined_3.txt: 41% 217M/524M [00:05<00:07, 43.7MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 34% 180M/524M [00:05<00:08, 40.6MB/s]\n","\n","combined_3.txt: 36% 191M/524M [00:05<00:07, 44.3MB/s]\n","\n","\n","combined_3.txt: 37% 193M/524M [00:05<00:10, 32.3MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 43% 228M/524M [00:05<00:08, 35.1MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 37% 196M/524M [00:05<00:08, 37.5MB/s]\n","\n","combined_3.txt: 39% 206M/524M [00:05<00:07, 41.4MB/s]\n","\n","\n","combined_3.txt: 40% 209M/524M [00:05<00:09, 33.0MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 46% 240M/524M [00:06<00:09, 31.5MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 40% 210M/524M [00:06<00:08, 38.2MB/s]\n","\n","combined_3.txt: 41% 216M/524M [00:06<00:07, 41.8MB/s]\n","\n","\n","combined_3.txt: 42% 222M/524M [00:06<00:07, 41.5MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 45% 238M/524M [00:06<00:04, 59.9MB/s]\n","\n","\n","combined_3.txt: 43% 227M/524M [00:06<00:11, 25.0MB/s]\u001b[A\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 45% 238M/524M [00:06<00:07, 36.2MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 47% 244M/524M [00:06<00:07, 38.6MB/s]\n","\n","combined_3.txt: 48% 250M/524M [00:06<00:06, 42.0MB/s]\n","\n","\n","combined_3.txt: 46% 243M/524M [00:07<00:09, 30.3MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 52% 271M/524M [00:07<00:07, 32.0MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 49% 256M/524M [00:07<00:07, 36.8MB/s]\n","\n","combined_3.txt: 50% 264M/524M [00:07<00:06, 42.6MB/s]\n","\n","combined_3.txt: 51% 270M/524M [00:07<00:05, 45.3MB/s]\n","\n","\n","combined_3.txt: 49% 256M/524M [00:07<00:08, 31.0MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 55% 286M/524M [00:07<00:06, 37.0MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 50% 260M/524M [00:07<00:08, 32.0MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 55% 290M/524M [00:07<00:06, 35.3MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 52% 275M/524M [00:07<00:07, 32.5MB/s]\n","\n","combined_3.txt: 53% 280M/524M [00:07<00:06, 35.3MB/s]\n","\n","combined_3.txt: 58% 304M/524M [00:07<00:04, 46.2MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 55% 288M/524M [00:07<00:05, 40.9MB/s]\n","\n","combined_3.txt: 59% 309M/524M [00:08<00:05, 37.2MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 55% 286M/524M [00:08<00:05, 42.6MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 56% 292M/524M [00:08<00:07, 32.9MB/s]\n","\n","\n","combined_3.txt: 57% 297M/524M [00:08<00:06, 34.1MB/s]\n","\n","\n","combined_3.txt: 57% 296M/524M [00:08<00:05, 40.7MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 61% 321M/524M [00:08<00:05, 34.3MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 58% 303M/524M [00:08<00:05, 40.9MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 58% 304M/524M [00:08<00:07, 30.3MB/s]\n","\n","combined_3.txt: 64% 336M/524M [00:08<00:03, 47.9MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 60% 314M/524M [00:08<00:05, 41.6MB/s]\n","\n","\n","combined_3.txt: 60% 313M/524M [00:08<00:05, 39.2MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 61% 320M/524M [00:08<00:06, 34.0MB/s]\n","\n","combined_3.txt: 63% 328M/524M [00:09<00:04, 41.1MB/s]\n","\n","\n","combined_3.txt: 61% 320M/524M [00:09<00:06, 29.7MB/s]\u001b[A\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 63% 329M/524M [00:09<00:04, 40.1MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 64% 336M/524M [00:09<00:04, 39.8MB/s]\n","\n","combined_3.txt: 69% 361M/524M [00:09<00:03, 41.0MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 65% 341M/524M [00:09<00:04, 39.8MB/s]\n","\n","combined_3.txt: 66% 348M/524M [00:09<00:03, 44.6MB/s]\n","\n","\n","combined_3.txt: 65% 340M/524M [00:09<00:05, 34.1MB/s]\u001b[A\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 69% 363M/524M [00:09<00:03, 53.4MB/s]\n","\n","combined_3.txt: 71% 371M/524M [00:09<00:06, 24.8MB/s]\u001b[A\u001b[A\n","\n","combined_3.txt: 70% 369M/524M [00:10<00:04, 36.7MB/s]\n","\n","combined_3.txt: 72% 379M/524M [00:10<00:02, 50.1MB/s]\n","\n","combined_3.txt: 75% 395M/524M [00:10<00:03, 38.9MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 68% 354M/524M [00:10<00:07, 22.2MB/s]\u001b[A\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 74% 386M/524M [00:10<00:03, 40.4MB/s]\n","\n","\n","combined_3.txt: 75% 392M/524M [00:10<00:03, 43.7MB/s]\n","\n","combined_3.txt: 76% 399M/524M [00:10<00:02, 49.7MB/s]\n","\n","combined_3.txt: 79% 412M/524M [00:10<00:02, 42.4MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 77% 405M/524M [00:10<00:02, 40.0MB/s]\n","\n","\n","combined_3.txt: 72% 379M/524M [00:10<00:04, 34.0MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 79% 413M/524M [00:11<00:02, 43.1MB/s]\n","\n","combined_3.txt: 81% 424M/524M [00:11<00:02, 37.8MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 80% 418M/524M [00:11<00:02, 36.1MB/s]\n","\n","\n","combined_3.txt: 81% 425M/524M [00:11<00:02, 42.7MB/s]\n","\n","combined_3.txt: 82% 432M/524M [00:11<00:02, 36.8MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 82% 430M/524M [00:11<00:02, 42.9MB/s]\n","\n","combined_3.txt: 83% 438M/524M [00:11<00:02, 39.9MB/s]\u001b[A\u001b[A\n","\n","combined_3.txt: 83% 435M/524M [00:11<00:02, 36.2MB/s]\n","\n","\n","combined_3.txt: 84% 443M/524M [00:11<00:01, 46.1MB/s]\n","\n","\n","combined_3.txt: 78% 407M/524M [00:11<00:03, 33.1MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 85% 448M/524M [00:11<00:02, 35.0MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 79% 413M/524M [00:11<00:03, 34.9MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 87% 458M/524M [00:12<00:01, 44.9MB/s]\n","\n","\n","combined_3.txt: 79% 417M/524M [00:12<00:03, 28.2MB/s]\u001b[A\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 88% 464M/524M [00:12<00:01, 40.3MB/s]\n","\n","combined_3.txt: 91% 477M/524M [00:12<00:00, 57.9MB/s]\n","\n","\n","combined_3.txt: 82% 432M/524M [00:12<00:02, 35.6MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 90% 472M/524M [00:12<00:01, 34.1MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 84% 438M/524M [00:12<00:02, 40.2MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 91% 479M/524M [00:12<00:01, 38.7MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 85% 443M/524M [00:12<00:01, 43.0MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 92% 484M/524M [00:12<00:01, 36.0MB/s]\n","\n","combined_3.txt: 93% 490M/524M [00:12<00:00, 39.3MB/s]\n","\n","\n","combined_3.txt: 95% 496M/524M [00:13<00:00, 43.0MB/s]\n","\n","\n","combined_3.txt: 87% 459M/524M [00:13<00:01, 40.1MB/s]\u001b[A\u001b[A\u001b[A\n","\n","combined_3.txt: 95% 496M/524M [00:13<00:00, 31.7MB/s]\u001b[A\u001b[A\n","\n","combined_3.txt: 97% 510M/524M [00:13<00:00, 49.7MB/s]\u001b[A\u001b[A\n","\n","combined_3.txt: 98% 516M/524M [00:13<00:00, 43.9MB/s]\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 89% 464M/524M [00:13<00:02, 28.1MB/s]\u001b[A\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 96% 502M/524M [00:13<00:01, 21.8MB/s]\n","\n","\n","combined_3.txt: 100% 524M/524M [00:13<00:00, 38.1MB/s]\n","combined_3.txt: 97% 507M/524M [00:13<00:00, 25.2MB/s]\n","\n","\n","combined_3.txt: 92% 484M/524M [00:13<00:01, 34.5MB/s]\u001b[A\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 95% 496M/524M [00:14<00:00, 38.3MB/s]\u001b[A\u001b[A\u001b[A\n","\n","\n","combined_3.txt: 98% 512M/524M [00:14<00:00, 16.1MB/s]\n","\n","\n","combined_3.txt: 100% 524M/524M [00:14<00:00, 35.1MB/s]\n","\n","\n","\n","combined_3.txt: 99% 522M/524M [00:15<00:00, 35.6MB/s]\u001b[A\u001b[A\u001b[A\n","combined_3.txt: 100% 524M/524M [00:15<00:00, 34.4MB/s]\n","\n","Upload 3 LFS files: 100% 3/3 [00:15<00:00, 5.16s/it]\n","https://huggingface.co/datasets/Aananda-giri/nepberta-sample/tree/main/.\n"]}]},{"cell_type":"code","source":["%%writefile README.md\n","# Nepali Text Dataset (Sampled Chunks)\n","\n","This repository contains a sample of the Nepali text dataset, with three 500MB cleaned chunks from the larger `nepberta` dataset. The dataset is ideal for experimenting with language modeling, NLP, and machine learning projects involving Nepali text.\n","\n","## Dataset Overview\n","The dataset consists of Nepali text data, specifically sampled to provide a representative subset without requiring the full dataset size. Each chunk contains approximately 500MB of Nepali text data, providing ample content for model training or evaluation purposes.\n","\n","### Structure\n","The dataset is structured as follows:\n","- **Train split**: Three chunks, each approximately 500MB in size.\n","\n","### Dataset Details\n","- **Language**: Nepali\n","- **Source**: [Original Dataset](https://huggingface.co/datasets/Aananda-giri/nepali_llm_datasets)\n","- **Dataset Size**: 1.5GB (3 chunks, each 500MB)\n","\n","## Usage\n","\n","To load the dataset in your projects, you can use the Hugging Face `datasets` library as follows:\n","\n","```python\n","from datasets import load_dataset\n","\n","# Load the dataset from the Hugging Face Hub\n","sampled_dataset = load_dataset(\"your-username/your-new-dataset-name\", split=\"train\")\n","\n","# Inspect the first sample\n","print(len(sampled_dataset[0]))\n","```\n","\n","### Save only 1 out of three chunks\n","```python\n","from datasets import load_dataset\n","\n","num_chunks_to_save = 1\n","\n","# Load the dataset from the Hugging Face Hub\n","sampled_dataset_stream = load_dataset(\"Aananda-giri/nepberta-sample\", split=\"train\", streaming=True)\n","\n","target_dir = 'nepberta_sample'\n","\n","import os\n","if not os.path.exists(target_dir):\n"," os.mkdir(target_dir)\n","\n","# Save each chunk to a separate text file\n","for i in range(num_chunks_to_save):\n"," chunk = next(iter(sampled_dataset_stream)) # Get the next chunk\n"," with open(os.path.join(target_dir, f\"combined_{i+1}.txt\"), \"w\", encoding=\"utf-8\") as file:\n"," file.write(chunk['text'])\n"," print(f\"Saved chunk {i+1} to chunk_{i+1}.txt\")\n","```\n","\n","Example Code for Loading Chunks\n","This example code demonstrates how to iterate through the chunks and process them as needed:\n","\n","\n","```\n","for chunk in sampled_dataset:\n"," text_data = chunk[\"text\"]\n"," # Process or analyze text_data as needed\n","```\n","\n","## Intended Use\n","This dataset is suitable for:\n","\n","* Experimenting on smaller model before training larger model\n","* Research and development in language processing tasks\n","* Experimenting with large language models on Nepali text data"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"sOZ_UsAVW81-","executionInfo":{"status":"ok","timestamp":1730899389137,"user_tz":-345,"elapsed":497,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"196b5877-c11f-4d0f-d94d-39bd7f5db878"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Writing README.md\n"]}]},{"cell_type":"code","source":["from datasets import load_dataset\n","\n","num_chunks_to_save = 1\n","\n","# Load the dataset from the Hugging Face Hub\n","sampled_dataset_stream = load_dataset(\"Aananda-giri/nepberta-sample\", split=\"train\", streaming=True)\n","\n","target_dir = 'nepberta_sample'\n","\n","import os\n","if not os.path.exists(target_dir):\n"," os.mkdir(target_dir)\n","\n","# Save each chunk to a separate text file\n","for i in range(num_chunks_to_save):\n"," chunk = next(iter(sampled_dataset_stream)) # Get the next chunk\n"," with open(os.path.join(target_dir, f\"combined_{i+1}.txt\"), \"w\", encoding=\"utf-8\") as file:\n"," file.write(chunk['text'])\n"," print(f\"Saved chunk {i+1} to chunk_{i+1}.txt\")"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"J5DCcONNnWeM","executionInfo":{"status":"ok","timestamp":1730899328935,"user_tz":-345,"elapsed":79632,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"bf537e42-f861-4ff3-d0c7-4b0416745b6d"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["Repo card metadata block was not found. Setting CardData to empty.\n","WARNING:huggingface_hub.repocard:Repo card metadata block was not found. Setting CardData to empty.\n"]},{"output_type":"stream","name":"stdout","text":["Saved chunk 1 to chunk_1.txt\n"]}]},{"cell_type":"code","source":["!huggingface-cli upload Aananda-giri/nepberta-sample README.md --repo-type dataset"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"uRPgyhVokxJR","executionInfo":{"status":"ok","timestamp":1730899407652,"user_tz":-345,"elapsed":1184,"user":{"displayName":"Aananda Giri","userId":"10248715758347187876"}},"outputId":"dc60df94-38fb-4ae8-c6a9-fa060f54c7f6"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Consider using `hf_transfer` for faster uploads. This solution comes with some limitations. See https://huggingface.co/docs/huggingface_hub/hf_transfer for more details.\n","/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py:3757: UserWarning: Warnings while validating metadata in README.md:\n","- empty or missing yaml metadata in repo card\n"," warnings.warn(f\"Warnings while validating metadata in README.md:\\n{message}\")\n","https://huggingface.co/datasets/Aananda-giri/nepberta-sample/blob/main/README.md\n"]}]}],"metadata":{"colab":{"provenance":[],"mount_file_id":"1un9-Ni5olyGmtakm9JX9YCzYV6YHFF3U","authorship_tag":"ABX9TyOTwf+vBxRuB0NOoced0BZ4"},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python"},"widgets":{"application/vnd.jupyter.widget-state+json":{"a8b08c8c81864956842eeccb2d35b68a":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_af2ebaa449c3408a8f8d5926d694a9c3","IPY_MODEL_d028dcbec0b24a6e8c5831cb446daa9e","IPY_MODEL_ebd147bc3e044a068382202b03bacc65"],"layout":"IPY_MODEL_da819c8d0e9a4c20ad677bfabd9d52c0"}},"af2ebaa449c3408a8f8d5926d694a9c3":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_e3e63279aab74035a2a83cd2a71b3c42","placeholder":"","style":"IPY_MODEL_4916f45b33ec43939b45146ce403582b","value":"README.md: 100%"}},"d028dcbec0b24a6e8c5831cb446daa9e":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_5e1dd7c74aaa49f7a34846133821274d","max":3119,"min":0,"orientation":"horizontal","style":"IPY_MODEL_908cf8e9f4ba43689f0cd4e298568023","value":3119}},"ebd147bc3e044a068382202b03bacc65":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_7f048462fe19469599a5f5cbae38d2b7","placeholder":"","style":"IPY_MODEL_9561e9470a3f4cb4a8afb9a3de25d7c0","value":" 3.12k/3.12k [00:00<00:00, 47.1kB/s]"}},"da819c8d0e9a4c20ad677bfabd9d52c0":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"e3e63279aab74035a2a83cd2a71b3c42":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"4916f45b33ec43939b45146ce403582b":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"5e1dd7c74aaa49f7a34846133821274d":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"908cf8e9f4ba43689f0cd4e298568023":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"7f048462fe19469599a5f5cbae38d2b7":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"9561e9470a3f4cb4a8afb9a3de25d7c0":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"268f3ecc25b84d03b70a73067076fb32":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_d9dd3f5c510447bcb797f83fbf583b59","IPY_MODEL_f40616f17a064e62aee1a1a40b0d0026","IPY_MODEL_2b04cf46f1304fd1a23df536d5606162"],"layout":"IPY_MODEL_ed3edb30df0140ce9943a56e99a2bec4"}},"d9dd3f5c510447bcb797f83fbf583b59":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_fb814dcbdeb44737a4a307b0c6a5d7c8","placeholder":"","style":"IPY_MODEL_1eb6399f4bf04a788f430e5253a16512","value":"Resolving data files: 100%"}},"f40616f17a064e62aee1a1a40b0d0026":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_e39b5aa571ef421aab0d407922d52dc4","max":18,"min":0,"orientation":"horizontal","style":"IPY_MODEL_7695cd996e734e9eb6a0a9c908f1fe54","value":18}},"2b04cf46f1304fd1a23df536d5606162":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_8c88f36a041f428b817ca9a8097de523","placeholder":"","style":"IPY_MODEL_04acddcf0c854be8a5ff4985325a4c4d","value":" 18/18 [00:00<00:00, 185.50it/s]"}},"ed3edb30df0140ce9943a56e99a2bec4":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"fb814dcbdeb44737a4a307b0c6a5d7c8":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"1eb6399f4bf04a788f430e5253a16512":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"e39b5aa571ef421aab0d407922d52dc4":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"7695cd996e734e9eb6a0a9c908f1fe54":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"8c88f36a041f428b817ca9a8097de523":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"04acddcf0c854be8a5ff4985325a4c4d":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"129c369755b24f4c92951e0e76e6a323":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_4c3aa5012225469ca7b5807029e37bda","IPY_MODEL_5c22186fbd044120b435cc42e9d2bd11","IPY_MODEL_0eb6e892ad6643968f4b48370772f1cf"],"layout":"IPY_MODEL_7a6ec45fd1194d02b136e2b00772ec0d"}},"4c3aa5012225469ca7b5807029e37bda":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_c0acb78cd5804cefbc5b6d735c9d5296","placeholder":"","style":"IPY_MODEL_7dcf9f6e2166488c9acbb89022c44791","value":"Resolving data files: 100%"}},"5c22186fbd044120b435cc42e9d2bd11":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_e9b5ee3275304ec0ae19485cdcbadfa3","max":18,"min":0,"orientation":"horizontal","style":"IPY_MODEL_7ca41e8938d94c01bd38b28e094c6d70","value":18}},"0eb6e892ad6643968f4b48370772f1cf":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_e9abc0645507492d8fa46f6e0cb1e54d","placeholder":"","style":"IPY_MODEL_a55aa66d7eb9445ca18753044b970144","value":" 18/18 [00:00<00:00, 518.44it/s]"}},"7a6ec45fd1194d02b136e2b00772ec0d":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c0acb78cd5804cefbc5b6d735c9d5296":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"7dcf9f6e2166488c9acbb89022c44791":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"e9b5ee3275304ec0ae19485cdcbadfa3":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"7ca41e8938d94c01bd38b28e094c6d70":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"e9abc0645507492d8fa46f6e0cb1e54d":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"a55aa66d7eb9445ca18753044b970144":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}}}}},"nbformat":4,"nbformat_minor":0} |