Spaces:
Sleeping
Sleeping
File size: 3,241 Bytes
888d109 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import json"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'list'>\n",
"<class 'dict'>\n",
"{'chapter_number': 1, 'chapter_name': 'Resources and Development', 'subtopics': ['Definition of Resource', 'Transformation Process in the Environment', 'Classification of Resources', 'Development of Resources', 'Problems Due to Indiscriminate Resource Use', 'Importance of Equitable Resource Distribution', 'Resource Planning', 'Sustainable Development', 'Rio de Janeiro Earth Summit, 1992', 'Agenda 21', 'Resource Planning in India', 'Factors in Resource Planning', 'Role of Technology and Institutions in Resource Development', 'Conservation of Resources', 'Historical Perspectives on Resource Conservation', 'Land Resources Importance', 'Land Utilization Types', 'Land Use Pattern in India', 'Forest Area Concerns', 'Land Degradation and Conservation Measures', 'Soil as a Resource and Its Formation', 'Classification of Soils', 'Alluvial Soils', 'Black Soil', 'Red and Yellow Soils', 'Laterite Soil', 'Arid Soils', 'Forest Soils', 'Soil Erosion and Conservation Methods']}\n",
"['Definition of Resource', 'Transformation Process in the Environment', 'Classification of Resources', 'Development of Resources', 'Problems Due to Indiscriminate Resource Use', 'Importance of Equitable Resource Distribution', 'Resource Planning', 'Sustainable Development', 'Rio de Janeiro Earth Summit, 1992', 'Agenda 21', 'Resource Planning in India', 'Factors in Resource Planning', 'Role of Technology and Institutions in Resource Development', 'Conservation of Resources', 'Historical Perspectives on Resource Conservation', 'Land Resources Importance', 'Land Utilization Types', 'Land Use Pattern in India', 'Forest Area Concerns', 'Land Degradation and Conservation Measures', 'Soil as a Resource and Its Formation', 'Classification of Soils', 'Alluvial Soils', 'Black Soil', 'Red and Yellow Soils', 'Laterite Soil', 'Arid Soils', 'Forest Soils', 'Soil Erosion and Conservation Methods']\n"
]
}
],
"source": [
"DB_FAISS_PATH = 'refbooks-vectorstore/geo-10-1'\n",
"JSON_FILE_PATH = 'data/geo-10/geo-chapter-list.json'\n",
"\n",
"with open(JSON_FILE_PATH, 'r') as file:\n",
" book_data = json.load(file)\n",
" print(type(book_data))\n",
" \n",
"chapter_data = book_data[0]\n",
"print(type(chapter_data))\n",
"print(chapter_data)\n",
"\n",
"chapter_name = chapter_data['chapter_name']\n",
"subtopics = chapter_data['subtopics']\n",
"\n",
"print(subtopics)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|