language:fa license:gpl-2.0 region:us
---
name: Persian Poetry Dataset
description: |
    This dataset contains a rich collection of Persian poems along with metadata about the poets and the verses.
    The data spans various poets and their poems, and includes the verses with associated information about their position within each poem.
    The dataset is split into a training set and a test set, with 90% of the verses of each poem for each poet used for training and 10% used for testing.
license: gpl-2.0
url: https://github.com/ganjoor/desktop/releases/tag/v2.81
citation: |
    Persian Poetry Dataset. Collected by Kakooch from the Ganjoor Project.
    Available at: https://huggingface.co/datasets/persian_poetry
size: "Custom"
language: 
    - fa
splits:
    train:
        description: "This split contains 90% of the verses of each poem for each poet and is used for training."
    test:
        description: "This split contains 10% of the verses of each poem for each poet and is used for testing."
---

# Persian Poetry Dataset

## Dataset Description

### Overview

This dataset contains a rich collection of Persian poems along with metadata about the poets and the verses. The data spans various poets and their poems, and includes the verses with associated information about their position within each poem.

### Data Collection

- **Data Collection Source:** The data is sourced from the [Ganjoor project](https://github.com/ganjoor/). The specific database file can be found in the [releases section](https://github.com/ganjoor/desktop/releases/tag/v2.81) of their GitHub repository.
- **Time Period:** Oct-12-2023
- **Collection Methods:** The data was collected by downloading the raw database file from the Ganjoor project's GitHub repository.

### Data Structure

The dataset is structured into multiple tables, notably `poem`, `poet`, and `verse` tables which contain information about the poems, poets, and verses respectively. The tables are linked through various ID fields that allow the data to be connected and queried together.

- **Poem Table:**
    - `id`: The unique identifier of a poem.
    - `cat_id`: A category identifier linking to poet information.
    - `title`: The title of the poem.
    - `url`: A URL associated with the poem.
    
- **Poet Table:**
    - `id`: The unique identifier of a poet.
    - `name`: The name of the poet.
    - `cat_id`: A category identifier.
    - `description`: A textual description or biography of the poet.

- **Verse Table:**
    - `poem_id`: Identifier linking the verse to a particular poem.
    - `vorder`: Order of the verse within the poem.
    - `position`: Position of the verse, used to determine if two verses form a hemistich.
    - `text`: The text of the verse.

### Data Example

```json
{
  "poet": "Sample Poet",
  "title": "Sample Poem Title",
  "content": [
    {
      "hemistich": {
        "verse0": "First part of a hemistich",
        "verse1": "Second part of a hemistich"
      }
    },
    {
      "verse": {"text": "A standalone verse"}
    }
  ]
}
```

## Dataset Usage

### Use Cases

This dataset can be utilized for various Natural Language Processing and analysis tasks related to Persian poetry, such as:
- Poem generation
- Poet identification
- Style analysis

### Challenges & Limitations

- The dataset does not contain long verses that are over 100 characters.
- Some poems may contain verses that form hemistichs, which are represented with specific structure in the dataset.

### License

GPL-2 (GNU General Public License) inherited from the original source

## Additional Information

### Citation

```
Persian Poetry Dataset. Collected by Kakooch from the Ganjoor Project. Available at: https://huggingface.co/datasets/persian_poetry
```

### Dataset Link 

[Download the dataset from Hugging Face](https://huggingface.co/datasets/persian_poetry)

### Contact 

Email: [kakooch@gmail.com](mailto:kakooch@gmail.com) | GitHub: [kakooch](https://github.com/kakooch)

---

*This README was generated by Kakooch.*
