karma689 commited on
Commit
4b174e9
·
verified ·
1 Parent(s): e995dc6

Upload Tibetan Quotation Benchmark dataset

Browse files
Files changed (6) hide show
  1. .gitattributes +3 -0
  2. README.md +133 -0
  3. stats.json +111 -0
  4. test.jsonl +3 -0
  5. train.jsonl +3 -0
  6. validation.jsonl +3 -0
.gitattributes CHANGED
@@ -58,3 +58,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ test.jsonl filter=lfs diff=lfs merge=lfs -text
62
+ train.jsonl filter=lfs diff=lfs merge=lfs -text
63
+ validation.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ language:
4
+ - bo
5
+ task_categories:
6
+ - token-classification
7
+ size_categories:
8
+ - n<1K
9
+ configs:
10
+ - config_name: default
11
+ data_files:
12
+ - split: train
13
+ path: train.jsonl
14
+ - split: validation
15
+ path: validation.jsonl
16
+ - split: test
17
+ path: test.jsonl
18
+ ---
19
+
20
+ # Tibetan Quotation Benchmark Dataset
21
+
22
+ This dataset provides a book-level train/validation/test benchmark of human-reviewed, gold-standard classical Tibetan quotation annotations.
23
+
24
+ ## 1. What the data is
25
+
26
+ The dataset comprises **254 classical Tibetan books** with **23,095 hand-annotated, human-approved quotation spans**.
27
+ It was built from a raw initial set of 28,892 span pieces. Merging adjacent line-split annotations reduced the span count to 23,476, and dropping under-annotated books resulted in the final set of 23,095 spans.
28
+
29
+ Character offsets are **inclusive on both ends** (meaning `end` points to the last character of the quotation, so the character at index `end` is part of the span).
30
+
31
+ ### Real Example in Tibetan
32
+ Here is an example of an annotated span in Tibetan context (annotated text highlighted):
33
+ > རྒྱུད་འཇམ་ཞེ་སྡང་རབ་སྤངས་ཤིང་།། ... ཞེས་སོ།།
34
+
35
+ ## 2. Where it came from
36
+
37
+ The underlying annotations come from two source annotation batches of classical Buddhist commentaries digitized with the support of the Tsadra Foundation and OpenPecha:
38
+ 1. **Old batch:** 125 books originally annotated with a `Quotation` layer.
39
+ 2. **New batch:** 195 books originally annotated with a `Citation` layer.
40
+
41
+ These two layers represent the exact same semantic annotation (where one text quotes another scriptural text, a named teacher, or a stock phrase). They have been treated as a single unified label. Because the batches differ significantly in systematic alignment and layout conventions, the source batch was used directly as a balancing variable during stratification.
42
+
43
+ ## 3. How it was cleaned
44
+
45
+ The dataset was prepared through a rigorous three-pass quality control pipeline:
46
+ 1. **Human Review Pass:** A total of 398 books were audited by human reviewers. 78 books were rejected entirely due to poor boundary offsets, while 254 span boundaries in accepted books were repaired and snapped to clean delimiters. A book was accepted or rejected as a whole to ensure that clean-looking spans inside a corrupted book did not survive by chance.
47
+ 2. **Span Merging:** Quotation spans in the new batch are frequently chunked (split across newline boundaries into multiple pieces of 20–40 or 110–160 characters). Naive training on these chunked spans corrupts model learning because only the first piece carries the leading grammatical marker (meaning continuation pieces have no marker and fall through to `MISC`). We merged continued spans when the gap between them was 0, 1, or 2 characters consisting only of spaces, newlines, or a shad, and where the preceding span did not already end on an explicit closing marker. This step reduced the span count from 28,892 to 23,476.
48
+ 3. **Dropping Under-Annotated Books:** Some accepted books were only partially annotated. We diagnosed this by comparing the density of explicit quotation closer markers in the raw text against actual annotations. While the marker density was flat across all books (~1,200 markers per million characters), the annotation coverage in the sparse books was as low as 1.1% compared to 45.6% in dense books:
49
+
50
+ | 0–0.25% | 21 | 4.68M | 45 | 2707 | 578 | 1.1% |
51
+ | 0.25–0.5% | 24 | 5.75M | 115 | 6941 | 1208 | 1.2% |
52
+ | 0.5–1% | 21 | 4.77M | 217 | 4772 | 1000 | 3.5% |
53
+ | 1–3% | 78 | 17.34M | 2130 | 20982 | 1210 | 7.7% |
54
+ | 3–8% | 79 | 18.36M | 6034 | 21849 | 1190 | 18.9% |
55
+ | 8–15% | 55 | 10.90M | 7590 | 14053 | 1289 | 35.8% |
56
+ | ≥15% | 42 | 5.63M | 7341 | 7268 | 1292 | 45.5% |
57
+
58
+ To prevent these false negatives from penalizing a well-performing model or training the model to remain silent, we dropped all books with a merged quotation density below **1.0%** (removing 66 books, 22.5% of characters, and only 1.6% of spans).
59
+
60
+ ## 4. The label set
61
+
62
+ Every quotation span is annotated with one of the following five grammatical marker classes based on its leading syllables:
63
+
64
+ | Class | Spans | Percentage | Description |
65
+ |---|---|---|---|
66
+ | `TEXT` | 13,164 | 57.0% | Quotations introduced by ablative markers (ལས, ནས) pointing to texts or sources. |
67
+ | `PERSON` | 3,636 | 15.7% | Quotations introduced by ergative markers or speech verbs/nouns (ན་རེ, གསུངས, etc.) identifying speakers. |
68
+ | `MISC` | 4,354 | 18.9% | Quotations with no identified prepended marker or continuation segments whose markers were separated. |
69
+ | `FORMULA` | 1,007 | 4.4% | Standard formulas or terminative expressions introducing citations (སྐད་དུ, ཇི་སྐད་དུ, etc.). |
70
+ | `CHAINED` | 934 | 4.0% | Quotations continuing immediately after a previous closing particle (ཞེས་དང, ཅེས་དང). |
71
+
72
+ ## 5. How it is split
73
+
74
+ Assignments are made **book-level only** (a book's spans are never split across multiple partitions). The splits were constructed jointly using a greedy, largest-first greedy search to balance four critical variables:
75
+ 1. Marker class mix over **`TEXT`, `PERSON`, and `MISC` classes only** (weight: 1.0).
76
+ 2. Density-bucket mix across 5 bins (weight: 0.5).
77
+ 3. Source batch mix (share of old batch spans, weight: 0.5).
78
+ 4. Overall quotation density (weight: 20.0).
79
+
80
+ By balancing only the top three classes directly, the optimizer avoids trading away density and batch balance to satisfy tiny classes (`FORMULA` and `CHAINED`), which land slightly above target as a result.
81
+
82
+ The resulting joint split balances the splits exceptionally well:
83
+
84
+ | Split | Books | Spans | TEXT | PERSON | MISC | Density | Old Batch % |
85
+ |---|---|---|---|---|---|---|---|
86
+ | `train` | 210 | 18,753 | 57.0% | 15.8% | 18.9% | 7.40% | 40.0% |
87
+ | `val` | 25 | 2,005 | 57.0% | 15.7% | 18.7% | 7.37% | 39.3% |
88
+ | `test` | 19 | 2,337 | 57.1% | 15.4% | 18.8% | 7.50% | 38.9% |
89
+
90
+ ## 6. Leakage
91
+
92
+ We distinguish and report two types of leakage:
93
+ 1. **Structural Leakage:** This is **strictly zero**. Because the split is book-level, no character of any text is present in more than one split.
94
+ 2. **Quotation-Text Overlap:** Because classical Tibetan commentary frequently quotes the same core scriptures, identical quotation strings appear across different books and land in different splits. This is an unavoidable property of the classical literature. Rather than artificially deduplicating (which would make the benchmark unrepresentative of real-world use), we document it and tag every held-out span:
95
+
96
+ | Normalization Length | Spans | In more than one book | Crosses split boundary | Held-out spans whose text is in train |
97
+ |---|---|---|---|---|
98
+ | 10 chars | 23,072 | 3921 (17.0%) | 1837 (8.0%) | 732 / 4324 (16.9%) |
99
+ | 20 chars | 22,755 | 3884 (17.1%) | 1818 (8.0%) | 724 / 4267 (17.0%) |
100
+ | 30 chars | 21,977 | 3765 (17.1%) | 1748 (8.0%) | 699 / 4088 (17.1%) |
101
+
102
+ - **Total held-out spans (val + test):** 4342
103
+ - **Held-out spans seen in training (at >= 20 chars normalization):** 724 (16.7%)
104
+
105
+ Every span in the released dataset includes a `seen_in_train` boolean field. **All future evaluations using this benchmark must report two headline scores:** the overall score, and the `seen_in_train == false` subset score. The gap between them represents the memorization effect of the evaluated model.
106
+
107
+ ## 7. Known limits
108
+
109
+ - **Boundary Noise:** Minor boundary offset noise survives in accepted books.
110
+ - **Under-Annotation:** Dropping books with density < 1.0% reduces, but does not solve, under-annotation. The 1–3% density band still holds only a 7.7% marker coverage rate, meaning some valid quotations remain unlabeled in the corpus.
111
+ - **Annotated Density:** The overall density of 7.41% reflects adequately annotated books, not a random classical Tibetan text.
112
+
113
+ ## 8. How to load it
114
+
115
+ You can load this dataset directly via `datasets`:
116
+
117
+ ```python
118
+ from datasets import load_dataset
119
+
120
+ dataset = load_dataset("karma689/tibetan-quotation-detection")
121
+ print(dataset)
122
+ ```
123
+
124
+ ## Citation
125
+
126
+ ```bibtex
127
+ @misc{tibetan_quotation_benchmark,
128
+ title = {Tibetan Quotation Detection Benchmark Dataset},
129
+ author = {karma689},
130
+ year = {2026},
131
+ url = {https://huggingface.co/datasets/karma689/tibetan-quotation-detection}
132
+ }
133
+ ```
stats.json ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "corpus_targets": {
3
+ "class": {
4
+ "TEXT": 0.5699935050876813,
5
+ "PERSON": 0.15743667460489283,
6
+ "MISC": 0.1885256549036588,
7
+ "FORMULA": 0.04360251136609656,
8
+ "CHAINED": 0.04044165403767049
9
+ },
10
+ "bucket": [
11
+ 0.0,
12
+ 0.0922277549253085,
13
+ 0.2612686728729162,
14
+ 0.3286425633253951,
15
+ 0.3178610088763802
16
+ ],
17
+ "old": 0.3979216280580212,
18
+ "density": 7.405629335744738,
19
+ "total_spans": 23095,
20
+ "total_books": 254
21
+ },
22
+ "measured_splits": {
23
+ "train": {
24
+ "books": 210,
25
+ "spans": 18753,
26
+ "class_mix": {
27
+ "TEXT": 0.5699354769903482,
28
+ "PERSON": 0.15784141204074015,
29
+ "MISC": 0.1887697968325068,
30
+ "FORMULA": 0.04431290993441049,
31
+ "CHAINED": 0.03914040420199435
32
+ },
33
+ "density": 7.398483240299252,
34
+ "old_pct": 39.956273662880605
35
+ },
36
+ "val": {
37
+ "books": 25,
38
+ "spans": 2005,
39
+ "class_mix": {
40
+ "TEXT": 0.5695760598503741,
41
+ "PERSON": 0.1571072319201995,
42
+ "MISC": 0.18703241895261846,
43
+ "FORMULA": 0.040897755610972565,
44
+ "CHAINED": 0.045386533665835414
45
+ },
46
+ "density": 7.373870304729927,
47
+ "old_pct": 39.30174563591022
48
+ },
49
+ "test": {
50
+ "books": 19,
51
+ "spans": 2337,
52
+ "class_mix": {
53
+ "TEXT": 0.5708172871202396,
54
+ "PERSON": 0.15447154471544716,
55
+ "MISC": 0.1878476679503637,
56
+ "FORMULA": 0.04022250748823278,
57
+ "CHAINED": 0.04664099272571673
58
+ },
59
+ "density": 7.504141463092419,
60
+ "old_pct": 38.89602053915276
61
+ }
62
+ },
63
+ "chosen_weights": {
64
+ "density_weight": 10.0,
65
+ "batch_weight": 0.5,
66
+ "book_cap": 25,
67
+ "seed": 2,
68
+ "score": 1.5593887306483656,
69
+ "err_test": 0.446689887529903,
70
+ "err_val": 0.2240123873040929
71
+ },
72
+ "leakage_audit": {
73
+ "table": [
74
+ {
75
+ "min_length": 10,
76
+ "spans": 23072,
77
+ "more_than_one_book": 3921,
78
+ "more_than_one_book_pct": 16.994625520110958,
79
+ "crosses_split": 1837,
80
+ "crosses_split_pct": 7.9620319001386965,
81
+ "held_out_in_train": 732,
82
+ "total_held_out": 4324,
83
+ "held_out_in_train_pct": 16.92876965772433
84
+ },
85
+ {
86
+ "min_length": 20,
87
+ "spans": 22755,
88
+ "more_than_one_book": 3884,
89
+ "more_than_one_book_pct": 17.06877609316634,
90
+ "crosses_split": 1818,
91
+ "crosses_split_pct": 7.989452867501648,
92
+ "held_out_in_train": 724,
93
+ "total_held_out": 4267,
94
+ "held_out_in_train_pct": 16.96742441996719
95
+ },
96
+ {
97
+ "min_length": 30,
98
+ "spans": 21977,
99
+ "more_than_one_book": 3765,
100
+ "more_than_one_book_pct": 17.131546616917685,
101
+ "crosses_split": 1748,
102
+ "crosses_split_pct": 7.9537698502980385,
103
+ "held_out_in_train": 699,
104
+ "total_held_out": 4088,
105
+ "held_out_in_train_pct": 17.098825831702545
106
+ }
107
+ ],
108
+ "seen_in_train_count": 724,
109
+ "seen_in_train_pct": 16.674343620451406
110
+ }
111
+ }
test.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0220abd8b74f4adcca4990ca23af86222cf6adbc63272bb27b6fdb46a059e764
3
+ size 13770262
train.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d667bf53cf354f3d085aa059f37ae1e8671a61ca16fc44b93b777bac357a0f8
3
+ size 129192243
validation.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:490673c6ffcbce92569c3a1035022c7443c118ccdfc6185d43032293337c2398
3
+ size 13568796