kaldan commited on
Commit
f66d6fc
·
verified ·
1 Parent(s): 36e1751

Update dataset card README

Browse files
Files changed (1) hide show
  1. README.md +125 -0
README.md ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - tibetan
4
+ - classical-tibetan
5
+ - buddhist-texts
6
+ - corpus
7
+ - openpecha
8
+ license: mit
9
+ language:
10
+ - bo
11
+ datasets_info:
12
+ - config_name: default
13
+ features:
14
+ - name: id
15
+ dtype: string
16
+ - name: collection
17
+ dtype: string
18
+ - name: filename
19
+ dtype: string
20
+ - name: text
21
+ dtype: string
22
+ - name: char_count
23
+ dtype: int64
24
+ ---
25
+
26
+ # BoCorpus
27
+
28
+ A comprehensive Tibetan corpus dataset for language model training and NLP research.
29
+
30
+ ## Dataset Description
31
+
32
+ BoCorpus is a curated collection of classical Tibetan texts compiled from multiple digital collections. The dataset is designed for training language models and conducting research in Tibetan natural language processing.
33
+
34
+ ### Collections Included
35
+
36
+ The corpus contains texts from the following collections:
37
+
38
+ - **Bon Kangyur**: 151 texts
39
+ - **Derge Kangyur**: 103 texts
40
+ - **Derge Tengyur**: 213 texts
41
+ - **DharmaEbook**: 98 texts
42
+ - **Pagen Project**: 1 texts
43
+ - **Tsadra Collection**: 266 texts
44
+ - **འབྲི་ལུགས་བང་མཛོད་སྐོར་ལྔ།**: 136 texts
45
+ - **རིན་ཆེན་གཏེར་མཛོད་ཆེན་མོ།**: 71 texts
46
+
47
+ ### Data Statistics
48
+
49
+ - **Total records**: 1039
50
+ - **Total characters**: 603,376,880
51
+ - **Average characters per text**: 580,728
52
+
53
+ ## Dataset Schema
54
+
55
+ | Column | Type | Description |
56
+ |--------|------|-------------|
57
+ | `id` | string | Unique UUID4 identifier for each record |
58
+ | `collection` | string | Name of the source collection |
59
+ | `filename` | string | Original filename (without extension) |
60
+ | `text` | string | Full text content with all line breaks removed |
61
+ | `char_count` | int64 | Total number of characters in the text |
62
+
63
+ ## Usage
64
+
65
+ ### Loading with HuggingFace Datasets
66
+
67
+ ```python
68
+ from datasets import load_dataset
69
+
70
+ dataset = load_dataset("openpecha/BoCorpus", split="train")
71
+
72
+ # Access a single example
73
+ example = dataset[0]
74
+ print(f"Collection: {example['collection']}")
75
+ print(f"Characters: {example['char_count']}")
76
+ print(f"Text preview: {example['text'][:100]}...")
77
+ ```
78
+
79
+ ### Loading with Pandas
80
+
81
+ ```python
82
+ import pandas as pd
83
+
84
+ df = pd.read_parquet("bo_corpus.parquet")
85
+ print(df.head())
86
+ ```
87
+
88
+ ### Loading with PyArrow
89
+
90
+ ```python
91
+ import pyarrow.parquet as pq
92
+
93
+ table = pq.read_table("bo_corpus.parquet")
94
+ df = table.to_pandas()
95
+ ```
96
+
97
+ ## Data Preparation
98
+
99
+ The texts in this dataset have undergone the following preprocessing:
100
+
101
+ 1. **Newline removal**: All newline characters (`\n`) are removed to create continuous text strings
102
+ 2. **UUID assignment**: Each text receives a unique UUID4 identifier
103
+ 3. **Character counting**: Total character count is computed for each text
104
+ 4. **Collection tagging**: Each record is tagged with its source collection name
105
+
106
+ ## Citation
107
+
108
+ If you use this dataset in your research, please cite:
109
+
110
+ ```bibtex
111
+ @dataset{bocorpus,
112
+ title = {BoCorpus: A Tibetan Text Corpus},
113
+ author = {OpenPecha},
114
+ year = {2024},
115
+ url = {https://huggingface.co/openpecha/BoCorpus}
116
+ }
117
+ ```
118
+
119
+ ## License
120
+
121
+ This dataset is released under the MIT License.
122
+
123
+ ## Acknowledgments
124
+
125
+ This corpus was prepared by [OpenPecha](https://openpecha.org) as part of their mission to make Tibetan Buddhist texts accessible for digital research and AI applications.