--- configs: - config_name: default data_files: - split: train path: data/train-* - split: validation path: data/validation-* - split: test path: data/test-* dataset_info: features: - name: image dtype: image - name: text dtype: string - name: xml dtype: string splits: - name: train num_bytes: 27890421939 num_examples: 70714 - name: validation num_bytes: 3298898850 num_examples: 8319 - name: test num_bytes: 1650072041 num_examples: 4161 download_size: 31880691097 dataset_size: 32839392830 language: - he license: mit task_categories: - text-to-image - image-to-text - image-classification size_categories: - 100KI'm not giving access to users with 0 models/0 datasets/0 activity - sharing is both ways ## Dataset Summary The Hebrew Synthetic Pangoline Dataset is a comprehensive collection of synthetic Hebrew document images generated using a custom implementation of Pangoline, a text-to-image synthesis tool. The dataset contains high-quality synthetic Hebrew text rendered as images, along with corresponding ground truth text and ALTO-XML layout annotations. This dataset is designed for training and evaluating Hebrew OCR models, document layout analysis systems, and text recognition algorithms. ## Dataset Details ### Dataset Description - **Curated by**: John Locke Jr. - **Language(s)**: Hebrew (he) - **License**: MIT - **Total Samples**: ~83,195 document images - **Creation Method**: Synthetic generation using custom Pangoline implementation - **Source Texts**: DICTA Library Hebrew texts ### Dataset Sources - **Repository**: [https://huggingface.co/datasets/johnlockejrr/heb_synth_pangoline](https://huggingface.co/datasets/johnlockejrr/heb_synth_pangoline) - **Source Library**: DICTA Library Hebrew texts - **Generation Tool**: Custom Pangoline implementation ## Uses ### Direct Use This dataset is intended for: - **OCR Model Training**: Training Hebrew optical character recognition models - **Document Layout Analysis**: Developing systems for understanding document structure and layout - **Text Recognition Research**: Advancing Hebrew text recognition algorithms - **Synthetic Data Studies**: Research on synthetic data generation and its applications - **Multilingual OCR**: Cross-lingual OCR model development ### Out-of-Scope Use - **Commercial OCR Products**: Without proper licensing verification - **Biometric or Personal Identification**: The dataset contains synthetic text, not real personal documents - **Training Models for Deceptive Purposes**: Any use intended to deceive or mislead ## Dataset Structure The dataset is organized with the following structure: ``` Dataset Split: train/validation/test (85%/10%/5%) ├── image: High-resolution synthetic Hebrew document images (JPG format) ├── text: Ground truth Hebrew text content (TXT format) └── xml: ALTO-XML layout annotations (XML format) ``` ### Data Fields - **image**: PIL Image object containing the synthetic Hebrew document - **text**: String containing the ground truth Hebrew text - **xml**: String containing ALTO-XML formatted layout annotations ### Dataset Statistics - **Total Files**: 83,194 samples - **Training Set**: 70,714 samples (85%) - **Validation Set**: 8,319 samples (10%) - **Test Set**: 4,161 samples (5%) - **Total Dataset Size**: 32.8 GB - **Download Size**: 31.9 GB - **Image Format**: JPG (compressed for efficiency) - **Text Encoding**: UTF-8 - **XML Format**: ALTO v4.3 standard #### Detailed Split Information | Split | Examples | Size (GB) | Percentage | |-------|----------|-----------|------------| | Train | 70,714 | 27.9 | 85% | | Validation | 8,319 | 3.3 | 10% | | Test | 4,161 | 1.7 | 5% | | **Total** | **83,194** | **32.8** | **100%** | ## Dataset Creation ### Curation Rationale This dataset was created to address the scarcity of high-quality Hebrew OCR training data. Traditional OCR datasets often lack sufficient Hebrew text samples, making it challenging to develop robust Hebrew text recognition systems. By generating synthetic data using Pangoline, we can create a large-scale dataset with perfect ground truth annotations. ### Source Data #### Data Collection and Processing 1. **Text Source**: Hebrew texts from the DICTA Library were used as source material 2. **Synthetic Generation**: Custom Pangoline implementation generated document images 3. **Layout Annotation**: ALTO-XML annotations were automatically generated during synthesis 4. **Quality Control**: Images were processed and optimized for training purposes 5. **Dataset Assembly**: Files were organized and split using the `create_hf_dataset.py` script #### Who are the source data producers? - **DICTA Library**: Provided the original Hebrew text content - **Custom Pangoline**: Generated synthetic document images and layout annotations - **Dataset Creator**: John Locke Jr. - assembled and curated the final dataset ### Annotations #### Annotation process The annotations were automatically generated during the synthetic document creation process: 1. **Text Extraction**: Ground truth text was extracted from source documents 2. **Layout Detection**: Pangoline generated precise layout information 3. **ALTO-XML Generation**: Layout data was formatted according to ALTO v4.3 standard 4. **Coordinate Scaling**: Coordinates were adjusted for optimal training #### Annotation Format The dataset uses ALTO-XML (Analyzed Layout and Text Object) format, which includes: - **Page-level metadata**: Dimensions, language, measurement units - **Text blocks**: Hierarchical organization of text content - **Text lines**: Individual line-level annotations - **Coordinate information**: Precise bounding boxes and baselines - **Content strings**: Actual text content for each element ## Bias, Risks, and Limitations ### Potential Biases - **Font Bias**: Synthetic generation may favor certain font styles or rendering approaches - **Layout Patterns**: Generated layouts may not fully represent the diversity of real Hebrew documents - **Text Content**: Limited to texts available in the DICTA Library ### Risks and Limitations - **Synthetic Nature**: Models trained on this data may not generalize perfectly to real-world documents - **Domain Specificity**: Performance may vary across different document types and styles - **Language Coverage**: Focuses specifically on Hebrew text recognition ### Recommendations - **Validation**: Always validate model performance on real Hebrew documents - **Data Augmentation**: Consider combining with real document data when available - **Cross-Domain Testing**: Test models across different document types and sources - **Regular Updates**: Consider periodic updates with new synthetic data ## Citation If you use this dataset, please cite it as follows: ```bibtex @dataset{hebrew_synthetic_pangoline_2025, title={Hebrew Synthetic Pangoline Dataset}, author={John Locke Jr.}, year={2025}, url={https://huggingface.co/datasets/johnlockejrr/heb_synth_pangoline}, note={Synthetic Hebrew document dataset generated using custom Pangoline implementation} } ``` ## Glossary - **ALTO-XML**: Analyzed Layout and Text Object XML format for describing document layout and content - **DICTA Library**: Digital library containing Hebrew texts used as source material - **Pangoline**: Text-to-image synthesis tool for generating document images - **OCR**: Optical Character Recognition - technology for converting images of text into machine-readable text - **Synthetic Data**: Artificially generated data used for training machine learning models ## More Information ### Technical Details - **Image Resolution**: Optimized for OCR training (typically 1060x1500 pixels) - **Text Encoding**: UTF-8 with proper Hebrew character support - **Coordinate System**: Pixel-based coordinates in ALTO-XML format - **File Organization**: Each sample consists of three files with matching basenames ### Usage Examples ```python from datasets import load_dataset # Load the dataset dataset = load_dataset("johnlockejrr/heb_synth_pangoline") # Access training data train_data = dataset["train"] print(f"Training samples: {len(train_data)}") # Example usage sample = train_data[0] image = sample["image"] text = sample["text"] xml = sample["xml"] ``` ### Related Work This dataset builds upon research in: - Synthetic data generation for OCR - Hebrew text processing and recognition - Document layout analysis - Multilingual OCR systems ## Dataset Card Authors - **John Locke Jr.** - Dataset creator and curator ## Dataset Card Contact - **Repository**: [https://huggingface.co/datasets/johnlockejrr/heb_synth_pangoline](https://huggingface.co/datasets/johnlockejrr/heb_synth_pangoline) - **Issues**: Please report any issues or questions through the Hugging Face dataset repository --- *This dataset card was created to provide comprehensive information about the Hebrew Synthetic Pangoline Dataset. For questions or contributions, please refer to the dataset repository.*