Datasets:
Tasks:
Token Classification
Modalities:
Text
Formats:
json
Sub-tasks:
named-entity-recognition
Languages:
English
Size:
10K - 100K
DOI:
License:
Merge origin/main: keep Hub README edits (data files identical on both sides)
Browse files
README.md
CHANGED
|
@@ -27,12 +27,7 @@ Each example includes: the NLQ, database identifier, a canonical dataset id, the
|
|
| 27 |
|
| 28 |
---
|
| 29 |
|
| 30 |
-
##
|
| 31 |
-
|
| 32 |
-
### Labels
|
| 33 |
-
- **4-class:** `Table`, `Column`, `Value`, `O`
|
| 34 |
-
|
| 35 |
-
### Fields per example
|
| 36 |
- `question_id` *(int)* — Example id
|
| 37 |
- `db_id` *(str)* — Database identifier
|
| 38 |
- `dber_id` *(str)* — Canonical id linking back to the source file/split (BIRD, SPIDER)
|
|
@@ -43,21 +38,15 @@ Each example includes: the NLQ, database identifier, a canonical dataset id, the
|
|
| 43 |
- `id` *(int)* — Local entity id (unique within the example)
|
| 44 |
- `type` *("table"|"column"|"value")*
|
| 45 |
- `value` *(str)* — Surface form from the DB schema or literal value
|
| 46 |
-
- `entity_to_token` *(List[Object])* —
|
|
|
|
|
|
|
| 47 |
- `dber_tags` *(List[str])* — **CoNLL-style IOB2** tags over `tokens`
|
| 48 |
|
| 49 |
---
|
| 50 |
|
| 51 |
## Splits
|
| 52 |
|
| 53 |
-
### Split groups
|
| 54 |
-
|
| 55 |
-
- Human
|
| 56 |
-
- Human_train (`human_train`)
|
| 57 |
-
- Human_test (`human_test`)
|
| 58 |
-
- Synthetic
|
| 59 |
-
- Synthetic_train (`synthetic_train`)
|
| 60 |
-
|
| 61 |
**Entity token prevalence is consistent across splits: ~29% entity vs. ~71% `O`.**
|
| 62 |
|
| 63 |
| Split | # Examples |
|
|
@@ -70,7 +59,7 @@ Each example includes: the NLQ, database identifier, a canonical dataset id, the
|
|
| 70 |
|
| 71 |
---
|
| 72 |
|
| 73 |
-
## Example
|
| 74 |
```json
|
| 75 |
{
|
| 76 |
"question_id": 13692,
|
|
@@ -80,28 +69,43 @@ Each example includes: the NLQ, database identifier, a canonical dataset id, the
|
|
| 80 |
"SQL": "SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year BETWEEN 1980 AND 2000 AND T1.sex = 'Male' AND T2.`Submitted via` = 'Referral'",
|
| 81 |
"tokens": ["Among","the","clients","born","between","1980","and","2000",",","list","the","name","of","male","clients","who","complained","through","referral","."],
|
| 82 |
"entities": [
|
| 83 |
-
{"id":0,"type":"column","value":"first"},
|
| 84 |
-
{"id":1,"type":"column","value":"middle"},
|
| 85 |
-
{"id":2,"type":"column","value":"last"},
|
| 86 |
-
{"id":3,"type":"table","value":"client"},
|
| 87 |
-
{"id":4,"type":"table","value":"events"},
|
| 88 |
-
{"id":5,"type":"column","value":"client_id"},
|
| 89 |
-
{"id":6,"type":"column","value":"year"},
|
| 90 |
-
{"id":7,"type":"value","value":"1980"},
|
| 91 |
-
{"id":8,"type":"value","value":"2000"},
|
| 92 |
-
{"id":9,"type":"column","value":"sex"}
|
| 93 |
-
{"id":10,"type":"value","value":"Male"},
|
| 94 |
-
{"id":11,"type":"column","value":"Submitted via"},
|
| 95 |
-
{"id":12,"type":"value","value":"Referral"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
],
|
| 97 |
-
"entity_to_token": {"3":[2],"7":[5],"8":[7],"10":[13],"5":[14],"12":[18]},
|
| 98 |
"dber_tags": ["O","O","B-TABLE","O","O","B-VALUE","O","B-VALUE","O","O","O","O","O","B-VALUE","B-COLUMN","O","O","O","B-VALUE","O"]
|
| 99 |
}
|
| 100 |
```
|
| 101 |
|
| 102 |
-
---
|
| 103 |
|
| 104 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
### Load JSONL files
|
| 107 |
```python
|
|
@@ -114,18 +118,11 @@ data_files = {
|
|
| 114 |
}
|
| 115 |
ds = load_dataset("json", data_files=data_files)
|
| 116 |
print(ds)
|
| 117 |
-
|
| 118 |
-
```
|
| 119 |
-
|
| 120 |
-
### Load from the Hub
|
| 121 |
-
```python
|
| 122 |
-
from datasets import load_dataset
|
| 123 |
-
ds = load_dataset("Voice49/dber")
|
| 124 |
-
```
|
| 125 |
|
| 126 |
---
|
| 127 |
|
| 128 |
-
## Annotation
|
| 129 |
- **Human**: collaborative web UI with schema and SQL visible during labeling.
|
| 130 |
- **Synthetic**: for each NLQ–SQL pair, generate candidate spans with Jaccard/Levenshtein, then solve a **non-overlapping ILP** to select spans maximizing similarity. Hyperparameters are validated on human data.
|
| 131 |
|
|
@@ -137,9 +134,6 @@ ds = load_dataset("Voice49/dber")
|
|
| 137 |
|
| 138 |
<!-- ---
|
| 139 |
|
| 140 |
-
## Licensing
|
| 141 |
-
- **License:** `other` (see the repository `LICENSE` for terms). Research use only unless otherwise permitted.
|
| 142 |
-
|
| 143 |
---
|
| 144 |
|
| 145 |
## Citation
|
|
@@ -157,5 +151,6 @@ If you use **DB-ER**, please cite:
|
|
| 157 |
|
| 158 |
---
|
| 159 |
|
| 160 |
-
## Release notes
|
|
|
|
| 161 |
- **v1.0:** Initial public release
|
|
|
|
| 27 |
|
| 28 |
---
|
| 29 |
|
| 30 |
+
## Fields
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
- `question_id` *(int)* — Example id
|
| 32 |
- `db_id` *(str)* — Database identifier
|
| 33 |
- `dber_id` *(str)* — Canonical id linking back to the source file/split (BIRD, SPIDER)
|
|
|
|
| 38 |
- `id` *(int)* — Local entity id (unique within the example)
|
| 39 |
- `type` *("table"|"column"|"value")*
|
| 40 |
- `value` *(str)* — Surface form from the DB schema or literal value
|
| 41 |
+
- `entity_to_token` *(List[Object])* — Reverse index:
|
| 42 |
+
- `entity_id` *(int)* — Refers to an `entities[*].id`
|
| 43 |
+
- `token_idxs` *(List[int])* — Token indices composing that entity in `tokens`
|
| 44 |
- `dber_tags` *(List[str])* — **CoNLL-style IOB2** tags over `tokens`
|
| 45 |
|
| 46 |
---
|
| 47 |
|
| 48 |
## Splits
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
**Entity token prevalence is consistent across splits: ~29% entity vs. ~71% `O`.**
|
| 51 |
|
| 52 |
| Split | # Examples |
|
|
|
|
| 59 |
|
| 60 |
---
|
| 61 |
|
| 62 |
+
## Example
|
| 63 |
```json
|
| 64 |
{
|
| 65 |
"question_id": 13692,
|
|
|
|
| 69 |
"SQL": "SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year BETWEEN 1980 AND 2000 AND T1.sex = 'Male' AND T2.`Submitted via` = 'Referral'",
|
| 70 |
"tokens": ["Among","the","clients","born","between","1980","and","2000",",","list","the","name","of","male","clients","who","complained","through","referral","."],
|
| 71 |
"entities": [
|
| 72 |
+
{"id": 0, "type": "column", "value": "first"},
|
| 73 |
+
{"id": 1, "type": "column", "value": "middle"},
|
| 74 |
+
{"id": 2, "type": "column", "value": "last"},
|
| 75 |
+
{"id": 3, "type": "table", "value": "client"},
|
| 76 |
+
{"id": 4, "type": "table", "value": "events"},
|
| 77 |
+
{"id": 5, "type": "column", "value": "client_id"},
|
| 78 |
+
{"id": 6, "type": "column", "value": "year"},
|
| 79 |
+
{"id": 7, "type": "value", "value": "1980"},
|
| 80 |
+
{"id": 8, "type": "value", "value": "2000"},
|
| 81 |
+
{"id": 9, "type": "column", "value": "sex"},
|
| 82 |
+
{"id": 10, "type": "value", "value": "Male"},
|
| 83 |
+
{"id": 11, "type": "column", "value": "Submitted via"},
|
| 84 |
+
{"id": 12, "type": "value", "value": "Referral"}
|
| 85 |
+
]
|
| 86 |
+
"entity_to_token": [
|
| 87 |
+
...,
|
| 88 |
+
{"entity_id":3,"token_idxs":[2]},
|
| 89 |
+
{"entity_id":5,"token_idxs":[14]},
|
| 90 |
+
{"entity_id":7,"token_idxs":[5]},
|
| 91 |
+
{"entity_id":8,"token_idxs":[7]},
|
| 92 |
+
{"entity_id":10,"token_idxs":[13]},
|
| 93 |
+
{"entity_id":12,"token_idxs":[18]},
|
| 94 |
+
...
|
| 95 |
],
|
|
|
|
| 96 |
"dber_tags": ["O","O","B-TABLE","O","O","B-VALUE","O","B-VALUE","O","O","O","O","O","B-VALUE","B-COLUMN","O","O","O","B-VALUE","O"]
|
| 97 |
}
|
| 98 |
```
|
| 99 |
|
| 100 |
+
<!-- ---
|
| 101 |
|
| 102 |
+
## Usage
|
| 103 |
+
|
| 104 |
+
### Load from Hub
|
| 105 |
+
```python
|
| 106 |
+
from datasets import load_dataset
|
| 107 |
+
ds = load_dataset("Voice49/dber")
|
| 108 |
+
```
|
| 109 |
|
| 110 |
### Load JSONL files
|
| 111 |
```python
|
|
|
|
| 118 |
}
|
| 119 |
ds = load_dataset("json", data_files=data_files)
|
| 120 |
print(ds)
|
| 121 |
+
``` -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
---
|
| 124 |
|
| 125 |
+
## Annotation
|
| 126 |
- **Human**: collaborative web UI with schema and SQL visible during labeling.
|
| 127 |
- **Synthetic**: for each NLQ–SQL pair, generate candidate spans with Jaccard/Levenshtein, then solve a **non-overlapping ILP** to select spans maximizing similarity. Hyperparameters are validated on human data.
|
| 128 |
|
|
|
|
| 134 |
|
| 135 |
<!-- ---
|
| 136 |
|
|
|
|
|
|
|
|
|
|
| 137 |
---
|
| 138 |
|
| 139 |
## Citation
|
|
|
|
| 151 |
|
| 152 |
---
|
| 153 |
|
| 154 |
+
## Release notes
|
| 155 |
+
- **v1.1 (2025-08-26):** HF Data Viewer compatibility update
|
| 156 |
- **v1.0:** Initial public release
|