File size: 6,594 Bytes
d45fe25 cd97f0a |
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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
---
license: cc-by-nc-4.0
language:
- en
tags:
- telecom
- LLM
- ETSI
size_categories:
- 1B<n<10B
---
# π Network Spec for LLM Understanding
## π Overview
This repository houses a comprehensive collection of ETSI (European Telecommunications Standards Institute) documents, systematically downloaded, processed, and organized for streamlined access and analysis. Each ETSI deliverable is paired with its corresponding metadata to ensure thorough information management.
## π Data Processing Workflow
The data processing involves two main scripts that automate the downloading and organization of ETSI documents:
1. **Download Documents**:
- **Script**: `organize_etsi_documents.py`
- **Functionality**:
- Reads the `ETSICatalog.csv` file to extract document information and download links.
- Downloads each PDF document from the provided links.
- Saves associated metadata for each document in a corresponding `_metadata.txt` file.
- Implements pause and resume capabilities to handle large downloads efficiently.
2. **Organize by Working Group**:
- **Script**: `organize_by_working_group.py`
- **Functionality**:
- Reads the `Grouped_ETSI_Documents_with_Document_Number_by_Working_Group.csv` file to map each document to its respective **Working Group** (e.g., `GR`, `GS`).
- Validates the existence of both PDF and metadata files for each document.
- Creates dedicated folders for each Working Group within the `data/` directory.
- Moves the PDF and metadata files into their corresponding Working Group folders.
- Logs any missing or problematic files for review.
## π Directory Structure
```
βββ data/
β βββ GR/
β β βββ 64372.pdf
β β βββ 64372_metadata.txt
β β βββ 61992.pdf
β β βββ 61992_metadata.txt
β β βββ ...
β βββ GS/
β β βββ 63040.pdf
β β βββ 63040_metadata.txt
β β βββ 62010.pdf
β β βββ 62010_metadata.txt
β β βββ ...
β βββ ...
βββ ETSICatalog.csv
βββ Grouped_ETSI_Documents_with_Document_Number_by_Working_Group.csv
βββ organize_etsi_documents.py
βββ organize_by_working_group.py
βββ requirements.txt
βββ missing_files.log
βββ organize_by_working_group.log
βββ README.md
```
- **data/**: Contains all downloaded PDFs and their corresponding metadata files, organized into subdirectories based on **Working Groups** (`GR`, `GS`, etc.).
- **ETSICatalog.csv**: Original CSV file containing metadata and download links for ETSI documents.
- **Grouped_ETSI_Documents_with_Document_Number_by_Working_Group.csv**: CSV file categorizing documents by Working Group and Concept.
- **organize_etsi_documents.py**: Python script for downloading ETSI documents and generating metadata files.
- **organize_by_working_group.py**: Python script for organizing downloaded documents into Working Group folders.
- **requirements.txt**: Lists Python dependencies required to run the scripts.
- **missing_files.log**: Logs detailing any missing or problematic files encountered during the organization process.
- **organize_by_working_group.log**: Detailed log of the `organize_by_working_group.py` script's execution.
- **README.md**: This documentation file.
## π οΈ Prerequisites
- **Python 3.x**: Ensure Python is installed on your system. Download it from [python.org](https://www.python.org/downloads/).
- **Git LFS**: Required for handling large files. Install Git LFS from [git-lfs.github.com](https://git-lfs.github.com/).
## π Setup Instructions
1. **Clone the Repository** (if not already cloned):
```bash
git clone https://hf.co/datasets/rasoul-nikbakht/NetSpec-LLM.git
cd NetSpec-LLM
```
2. **Install Required Python Packages**:
It's recommended to use a virtual environment:
```bash
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
# Upgrade pip
pip install --upgrade pip
# Install dependencies
pip install -r requirements.txt
```
*Alternatively, install directly without a virtual environment:*
```bash
pip install pandas tqdm
```
3. **Initialize Git LFS**:
```bash
git lfs install
```
4. **Verify File Placement**:
- Ensure the CSV file `Grouped_ETSI_Documents_with_Document_Number_by_Working_Group.csv` is in the root directory of the repository.
- Ensure all PDF and metadata files are located within the `data/` directory.
## π How to Use
### 1. **Download and Organize ETSI Documents**
Ensure that `ETSICatalog.csv` is placed in the root directory of the repository.
```bash
python organize_etsi_documents.py
```
*Note: The download process may take some time depending on the number of documents and your internet connection.*
### 2. **Categorize Documents by Working Group**
Ensure that `Grouped_ETSI_Documents_with_Document_Number_by_Working_Group.csv` and `process-ETSI.ipynb` are correctly formatted and placed in the root directory.
Run the appropriate cell in the Jupyter notebook to group the documents by Working Group.
*Note: The script will move PDFs and metadata files into their respective Working Group folders. Any missing files or errors will be logged in `missing_files.log` and `organize_by_working_group.log`.*
### 3. **Review the Results**
- **Check the Organized Directories**:
- Navigate to the `data/` directory to see subfolders for each Working Group (`GR`, `GS`, etc.) containing the relevant files.
- **Inspect Log Files**:
- `organize_by_working_group.log`: Contains detailed logs of the script's execution, including moved files and any errors.
- `missing_files.log`: Details any missing files or issues encountered during the move process.
## π‘οΈ Additional Notes
- **Backup Your Data**:
- Before running the scripts, it's advisable to back up your `data/` directory to prevent accidental data loss.
- **Handling Missing Files**:
- If `missing_files.log` contains entries, review them to identify and address any missing or problematic files.
- **Extensibility**:
- The scripts are designed to handle additional Working Groups seamlessly. Simply update the CSV file with new entries, and rerun the script to organize new documents.
## π License
This project is licensed under the Creative Commons Attribution Non Commercial 4.0
|