NetSpec-LLM / README.md
rasoul-nikbakht's picture
Organize ETSI documents into Working Group folders based on CSV mapping
d45fe25
|
raw
history blame
6.57 kB
metadata
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.
  • Git LFS: Required for handling large files. Install Git LFS from git-lfs.github.com.

πŸš€ Setup Instructions

  1. Clone the Repository (if not already cloned):

    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:

    # 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:

    pip install pandas tqdm
    
  3. Initialize Git LFS:

    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.

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 MIT License.