File size: 5,439 Bytes
06bcd69
 
 
 
 
 
 
 
 
 
 
 
 
 
a1a8c66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
task_categories:
- text-classification
- token-classification
- translation
- text2text-generation
- question-answering
tags:
- dataset
- balochi
- baluchi 
size_categories:
- 100K<n<1M
---
# Balochi Language Dataset

## Overview

This dataset is a comprehensive resource for training large language models (LLMs) in the Balochi language. It is designed to go beyond basic translation tasks, supporting fully generative text and conversational AI capabilities in Balochi.

The dataset includes monolingual Balochi text, multilingual translation corpora, and various conversational and domain-specific texts, enabling diverse use cases such as:

- **Generative AI**: Building chatbots and generative text systems in Balochi.
- **Multilingual Translation**: Translating between Balochi and other languages like English, Urdu, and Persian.
- **Cultural Insights**: Providing context for cultural and historical texts.
- **Domain-Specific Applications**: Technical, educational, and assistant-oriented tasks.

---

## Key Features

- **Languages**: Balochi, English, Urdu, Persian.
- **Domains**:
  - General conversation
  - Literature
  - News
  - Academic texts
  - Technical content
  - Cultural and historical narratives
  - Travel and educational materials
  - Assistant and chat scenarios

- **Dataset Size**:
  - Monolingual and multilingual pairs totaling tens of thousands of records.
  - Includes conversational samples, professional scenarios, and technical terminologies.

- **Custom Tokenizer**: Optimized for Balochi, supporting fine-grained tokenization for generative tasks.

---

## Folder Structure

```
C:.
├───dataset
│   │   Balochi Multilingual Corpus-v2.json
│   │   Balochi_english-translation_corpus.json
│   ├───splits
│   │   │   balochi_to_english.json
│   │   │   balochi_to_persian.json
│   │   │   balochi_to_urdu.json
│   └───text files
│           balochi-only.csv
│           monolingual_balochi.txt
├───tokenizer
│       tokenizer-balochi-v2.json
└───tools used to create this dataset
        Bal_Tokenizer.py
        create-json-format.py
```

---

## Custom Tokenizer

This dataset includes a custom tokenizer tailored to the Balochi language. The tokenizer has been optimized for encoding Balochi text effectively for generative tasks.

### Sample Outputs:

**Original**: تو کہاں گئے؟

**Encoded**: `[0, 54, 42, 8, 4559, 3, 1]`

**Original**: یہ کنغ پسند کنئے؟

**Encoded**: `[0, 6, 14, 8997, 2066, 2094, 3, 1]`

**Original**: بلی شتگ کور ء اے کسہ ء دمی کارست اتمان ء کسہ ء دمی بهر انت انچو کہ من اول سرا گشتگ ات کہ اے کسہ دو بهر ء انت یکے نبشتہ کار ء وتی کیز ء بندانی سر گوستیں اے بهر ء اولی کسہ پلی مین ء کپتگ ات ء دمی بهر انت

**Encoded**: `[0, 1516, 575, 430, 5, 91, 1053, 5, 11332, 2940, 18035, 5, 1053, 5, 11332, 1234, 32, 1133, 42, 53, 709, 246, 1410, 29, 42, 91, 1053, 63, 1234, 5, 32, 662, 539, 67, 5, 122, 73, 34, 5, 7822, 43, 545, 10, 91, 1234, 5, 618, 1053, 2504, 636, 5, 579, 29, 5, 11332, 1234, 32, 1]`

The tokenizer supports tokenized outputs for various use cases, ensuring compatibility with machine learning frameworks such as Hugging Face.

---

## Dataset Highlights

### Monolingual Data
- Focused on Balochi texts from cultural, historical, and conversational contexts.
- Contains cleaned and formatted versions for model training.

### Multilingual Translation Data
- **Balochi-English**: General and technical translations.
- **Balochi-Urdu**: News and conversational translations.
- **Balochi-Persian**: Literary and historical translations.

### Conversational Samples
Includes a variety of real-world scenarios:
- Daily interactions (e.g., greetings, family discussions).
- Professional settings (e.g., interviews, meetings).
- Educational contexts (e.g., questions in class).
- Travel scenarios (e.g., at airports, booking hotels).

### Technical Terminology
Covers domains like:
- Computing
- Medicine
- Physics
- Internet technology

---

## Licensing

The dataset is released under the **CC-BY-SA 4.0** license. This means you can use, share, and modify it, provided proper attribution is given.

---

## Acknowledgments

This dataset is a result of efforts to preserve and enhance computational resources for the Balochi language. The tools and scripts provided alongside this dataset were instrumental in its creation.

---

## Usage Instructions

1. **Download and Preprocess**:
   - Use the provided JSON files for training data.
   - Scripts in the `tools` folder can be used to preprocess the data.

2. **Tokenizer Integration**:
   - Load the custom tokenizer using the provided `tokenizer-balochi-v2.json`.
   - Example:

     ```python
     from transformers import PreTrainedTokenizerFast

     tokenizer = PreTrainedTokenizerFast(tokenizer_file="path/to/tokenizer-balochi-v2.json")
     encoded = tokenizer.encode("تو کہاں گئے؟")
     print(encoded)
     ```

3. **Model Training**:
   - Use frameworks like Hugging Face to fine-tune LLMs on this dataset.

4. **Applications**:
   - Develop chatbots, translation systems, or other generative applications in Balochi.

---

For further details or contributions, feel free to reach out or submit issues to the project repository.