Yontenn commited on
Commit
3d4db33
·
verified ·
1 Parent(s): c489ca7

Add the Format and Annotation sections; put the sections in the standard order

Browse files
Files changed (1) hide show
  1. README.md +45 -18
README.md CHANGED
@@ -57,6 +57,39 @@ Benchmark and training data for finding **quotation spans** in classical Tibetan
57
 
58
  Character offsets are **inclusive on both ends**: the span is `text[start:end+1]`.
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  ## Data source and preparation
61
 
62
  **Source.**
@@ -69,6 +102,12 @@ Classical Buddhist commentaries digitized with support from the Tsadra Foundatio
69
  2. **Span merging.** The new batch often splits one quotation across lines. Pieces separated only by 0–2 spaces, newlines, or a shad (and not already closed) were joined: 28,892 → 23,476 spans.
70
  3. **Dropping under-annotated books.** Quote markers appear at the same rate in every book (~1,200 per million characters), but some books had almost none of them annotated. Books with quotation density below 1% were dropped: 66 books, 22.5% of characters, only 1.6% of spans.
71
 
 
 
 
 
 
 
72
  ## Quote types
73
 
74
  Each span gets a quote type from the words that introduce it:
@@ -83,18 +122,6 @@ Each span gets a quote type from the words that introduce it:
83
 
84
  90.6% of spans end with an explicit closing marker.
85
 
86
- ## Splits
87
-
88
- Splits are **book-level**: a book's spans never appear in more than one split.
89
-
90
- Books are **stratified by quote type** (`TEXT` / `PERSON` / `MISC`), so each split has the same mix of quote types. Density band, source batch, and overall quotation density are matched as well. `FORMULA` and `CHAINED` are too small to stratify on and come out slightly above target.
91
-
92
- | Split | Books | Spans | TEXT | PERSON | MISC | Density | Old batch |
93
- |---|---:|---:|---:|---:|---:|---:|---:|
94
- | train | 210 | 18,753 | 57.0% | 15.8% | 18.9% | 7.40% | 40.0% |
95
- | validation | 25 | 2,005 | 57.0% | 15.7% | 18.7% | 7.37% | 39.3% |
96
- | test | 19 | 2,337 | 57.1% | 15.4% | 18.8% | 7.50% | 38.9% |
97
-
98
  ## Leakage
99
 
100
  - **No text is shared between splits** (the split is by book).
@@ -102,12 +129,6 @@ Books are **stratified by quote type** (`TEXT` / `PERSON` / `MISC`), so each spl
102
 
103
  **Report two scores:** overall, and `seen_in_train == false` only. The gap shows how much the model relies on memorised quotes.
104
 
105
- ## Known limits
106
-
107
- - Some small boundary errors remain in accepted books.
108
- - Some real quotations are still unlabeled, mostly in books with 1–3% density.
109
- - Density (7.4%) reflects well-annotated books, not typical Tibetan text.
110
-
111
  ## Loading
112
 
113
  ```python
@@ -153,6 +174,12 @@ The BIO config is also pinned at tag `w1.0`.
153
  - Token balance (owned tokens): `O` 92.37%, `I` 7.50%, `B` 0.07%, `E` 0.07% (in BIO, `I` is 7.57%).
154
  - Tokenizer sha256 (combined): `9818cf906b79a54b964992d2f76db685ae8b9b3824e28a8f4e4f16425d026f9d`
155
 
 
 
 
 
 
 
156
  ## Citation
157
 
158
  ```bibtex
 
57
 
58
  Character offsets are **inclusive on both ends**: the span is `text[start:end+1]`.
59
 
60
+ ## Format
61
+
62
+ The data comes in two forms: one row per book, and windows of tokens for training mmBERT.
63
+
64
+ **Book-level rows** (`train.jsonl`, `validation.jsonl`, `test.jsonl`):
65
+
66
+ | Column | Meaning |
67
+ |---|---|
68
+ | `book_id` | the book |
69
+ | `title` | the book's title |
70
+ | `text` | the full text |
71
+ | `doc_chars` | length of the text in characters |
72
+ | `batch` | source batch: old or new |
73
+ | `source_layer` | the OpenPecha layer the spans came from: `Quotation` or `Citation` |
74
+ | `density`, `density_bucket` | share of the text inside quotations, and its band |
75
+ | `spans` | the quotation spans (below) |
76
+
77
+ Each span has `start` and `end` (character offsets, **inclusive** on both ends: `text[start:end+1]`), `cls` (the quote type: `TEXT`, `PERSON`, `MISC`, `FORMULA` or `CHAINED`), `closed` (whether the span ends with an explicit closing marker) and `seen_in_train` (whether the same text also occurs in train).
78
+
79
+ **Windowed rows** (the `windowed_*` configs): `book_id`, `window_index`, `input_ids`, `attention_mask`, `labels` and `offset_mapping`. Labels are `O`=0, `B-QUOTE`=1, `I-QUOTE`=2, and in the BIOE config also `E-QUOTE`=3. All quote types collapse to one `QUOTE` label. Window length, step and token ownership are described under "Windowed configs" below.
80
+
81
+ ## Splits
82
+
83
+ Splits are **book-level**: a book's spans never appear in more than one split.
84
+
85
+ Books are **stratified by quote type** (`TEXT` / `PERSON` / `MISC`), so each split has the same mix of quote types. Density band, source batch, and overall quotation density are matched as well. `FORMULA` and `CHAINED` are too small to stratify on and come out slightly above target.
86
+
87
+ | Split | Books | Spans | TEXT | PERSON | MISC | Density | Old batch |
88
+ |---|---:|---:|---:|---:|---:|---:|---:|
89
+ | train | 210 | 18,753 | 57.0% | 15.8% | 18.9% | 7.40% | 40.0% |
90
+ | validation | 25 | 2,005 | 57.0% | 15.7% | 18.7% | 7.37% | 39.3% |
91
+ | test | 19 | 2,337 | 57.1% | 15.4% | 18.8% | 7.50% | 38.9% |
92
+
93
  ## Data source and preparation
94
 
95
  **Source.**
 
102
  2. **Span merging.** The new batch often splits one quotation across lines. Pieces separated only by 0–2 spaces, newlines, or a shad (and not already closed) were joined: 28,892 → 23,476 spans.
103
  3. **Dropping under-annotated books.** Quote markers appear at the same rate in every book (~1,200 per million characters), but some books had almost none of them annotated. Books with quotation density below 1% were dropped: 66 books, 22.5% of characters, only 1.6% of spans.
104
 
105
+ ## Annotation
106
+
107
+ Quotation spans were marked by human annotators on classical Tibetan commentaries, in two batches: an older batch (the OpenPecha `Quotation` layer) and a newer one (the `Citation` layer). Both layers mark the same thing, so they are merged into one label.
108
+
109
+ Every book was then reviewed by humans: books with bad boundaries were rejected whole, and boundaries were repaired in accepted books (see the cleaning steps above). The test set was reviewed again, span by span (see "Reviewed test set"). The quote type of each span is not hand-labelled: it is set by rule from the words that introduce the span.
110
+
111
  ## Quote types
112
 
113
  Each span gets a quote type from the words that introduce it:
 
122
 
123
  90.6% of spans end with an explicit closing marker.
124
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  ## Leakage
126
 
127
  - **No text is shared between splits** (the split is by book).
 
129
 
130
  **Report two scores:** overall, and `seen_in_train == false` only. The gap shows how much the model relies on memorised quotes.
131
 
 
 
 
 
 
 
132
  ## Loading
133
 
134
  ```python
 
174
  - Token balance (owned tokens): `O` 92.37%, `I` 7.50%, `B` 0.07%, `E` 0.07% (in BIO, `I` is 7.57%).
175
  - Tokenizer sha256 (combined): `9818cf906b79a54b964992d2f76db685ae8b9b3824e28a8f4e4f16425d026f9d`
176
 
177
+ ## Known limits
178
+
179
+ - Some small boundary errors remain in accepted books.
180
+ - Some real quotations are still unlabeled, mostly in books with 1–3% density.
181
+ - Density (7.4%) reflects well-annotated books, not typical Tibetan text.
182
+
183
  ## Citation
184
 
185
  ```bibtex