Datasets:
Upload TypePrediction dataset
Browse files- .gitattributes +2 -0
- README.md +41 -0
- artifacts/split_assignments.jsonl +3 -0
- split_data.py +280 -0
- split_summary.json +482 -0
- type_predictor_test.jsonl +0 -0
- type_predictor_train.jsonl +3 -0
- type_predictor_val.jsonl +0 -0
.gitattributes
CHANGED
|
@@ -59,3 +59,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
type_predictor_data.jsonl filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
type_predictor_data.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
artifacts/split_assignments.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
type_predictor_train.jsonl filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -20,10 +20,16 @@ Unified mention-level type prediction data built from all available local Wojood
|
|
| 20 |
## Main file
|
| 21 |
|
| 22 |
- `type_predictor_data.jsonl`
|
|
|
|
|
|
|
|
|
|
| 23 |
- `summary.json`
|
|
|
|
| 24 |
- `build_type_prediction_dataset.py`
|
| 25 |
- `push_to_hf.py`
|
|
|
|
| 26 |
- `artifacts/ambiguous_span_type_conflicts.jsonl`
|
|
|
|
| 27 |
|
| 28 |
Each row contains:
|
| 29 |
|
|
@@ -192,3 +198,38 @@ Example merged across multiple source datasets:
|
|
| 192 |
- verified deduped rows merge provenance rather than silently dropping it
|
| 193 |
- verified no exact span in the main file has more than one coarse type
|
| 194 |
- verified ids are unique and deterministic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
## Main file
|
| 21 |
|
| 22 |
- `type_predictor_data.jsonl`
|
| 23 |
+
- `type_predictor_train.jsonl`
|
| 24 |
+
- `type_predictor_val.jsonl`
|
| 25 |
+
- `type_predictor_test.jsonl`
|
| 26 |
- `summary.json`
|
| 27 |
+
- `split_summary.json`
|
| 28 |
- `build_type_prediction_dataset.py`
|
| 29 |
- `push_to_hf.py`
|
| 30 |
+
- `split_data.py`
|
| 31 |
- `artifacts/ambiguous_span_type_conflicts.jsonl`
|
| 32 |
+
- `artifacts/split_assignments.jsonl`
|
| 33 |
|
| 34 |
Each row contains:
|
| 35 |
|
|
|
|
| 198 |
- verified deduped rows merge provenance rather than silently dropping it
|
| 199 |
- verified no exact span in the main file has more than one coarse type
|
| 200 |
- verified ids are unique and deterministic
|
| 201 |
+
|
| 202 |
+
## Split files
|
| 203 |
+
|
| 204 |
+
The repo also includes a mention-level stratified split built from `type_predictor_data.jsonl`:
|
| 205 |
+
|
| 206 |
+
- `type_predictor_train.jsonl`
|
| 207 |
+
- `type_predictor_val.jsonl`
|
| 208 |
+
- `type_predictor_test.jsonl`
|
| 209 |
+
- `split_summary.json`
|
| 210 |
+
- `artifacts/split_assignments.jsonl`
|
| 211 |
+
- `split_data.py`
|
| 212 |
+
|
| 213 |
+
Split policy:
|
| 214 |
+
|
| 215 |
+
1. Start from the clean `type_predictor_data.jsonl`.
|
| 216 |
+
2. Perform a stratified `80/20` split by the `type` column with `random_state = 42`.
|
| 217 |
+
3. Split the holdout pool again, stratified by `type`, into equal halves.
|
| 218 |
+
4. Keep sentence overlap allowed across splits.
|
| 219 |
+
5. Preserve all original fields.
|
| 220 |
+
6. Add `evaluation_category` only to validation and test rows:
|
| 221 |
+
- `unseen_sentence`
|
| 222 |
+
- `seen_sentence_new_entity`
|
| 223 |
+
|
| 224 |
+
Current split sizes:
|
| 225 |
+
|
| 226 |
+
- train: `100,796`
|
| 227 |
+
- validation: `12,600`
|
| 228 |
+
- test: `12,600`
|
| 229 |
+
|
| 230 |
+
Current evaluation-category counts:
|
| 231 |
+
|
| 232 |
+
- validation `seen_sentence_new_entity`: `11,661`
|
| 233 |
+
- validation `unseen_sentence`: `939`
|
| 234 |
+
- test `seen_sentence_new_entity`: `11,606`
|
| 235 |
+
- test `unseen_sentence`: `994`
|
artifacts/split_assignments.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d6967301cc0187fa7ecc9a30493d1d86a10ac6bdf9e97274376c2dc35ee5342
|
| 3 |
+
size 20472871
|
split_data.py
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import copy
|
| 2 |
+
import json
|
| 3 |
+
from collections import Counter, defaultdict
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
|
| 6 |
+
from sklearn.model_selection import train_test_split
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
ROOT = Path("/root/knowledgegrapheval/type_prediction_dataset")
|
| 10 |
+
ARTIFACTS_DIR = ROOT / "artifacts"
|
| 11 |
+
INPUT_PATH = ROOT / "type_predictor_data.jsonl"
|
| 12 |
+
TRAIN_PATH = ROOT / "type_predictor_train.jsonl"
|
| 13 |
+
VAL_PATH = ROOT / "type_predictor_val.jsonl"
|
| 14 |
+
TEST_PATH = ROOT / "type_predictor_test.jsonl"
|
| 15 |
+
SUMMARY_PATH = ROOT / "split_summary.json"
|
| 16 |
+
ASSIGNMENTS_PATH = ARTIFACTS_DIR / "split_assignments.jsonl"
|
| 17 |
+
|
| 18 |
+
RANDOM_STATE = 42
|
| 19 |
+
TRAIN_RATIO = 0.8
|
| 20 |
+
VAL_RATIO = 0.1
|
| 21 |
+
TEST_RATIO = 0.1
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def load_rows() -> list[dict]:
|
| 25 |
+
with INPUT_PATH.open(encoding="utf-8") as handle:
|
| 26 |
+
return [json.loads(line) for line in handle if line.strip()]
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
def dump_jsonl(path: Path, rows: list[dict]) -> None:
|
| 30 |
+
with path.open("w", encoding="utf-8") as handle:
|
| 31 |
+
for row in rows:
|
| 32 |
+
handle.write(json.dumps(row, ensure_ascii=False) + "\n")
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
def extract_entity_from_spans(row: dict) -> tuple[str, str]:
|
| 36 |
+
sentence = row["sentence"]
|
| 37 |
+
entity_from_chars = sentence[row["start_char"] : row["end_char"]]
|
| 38 |
+
entity_from_tokens = " ".join(sentence.split(" ")[row["start_token"] : row["end_token"] + 1])
|
| 39 |
+
return entity_from_chars, entity_from_tokens
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def stratified_split(rows: list[dict]) -> tuple[list[dict], list[dict], list[dict]]:
|
| 43 |
+
labels = [row["type"] for row in rows]
|
| 44 |
+
indices = list(range(len(rows)))
|
| 45 |
+
|
| 46 |
+
train_idx, holdout_idx = train_test_split(
|
| 47 |
+
indices,
|
| 48 |
+
test_size=(1.0 - TRAIN_RATIO),
|
| 49 |
+
stratify=labels,
|
| 50 |
+
random_state=RANDOM_STATE,
|
| 51 |
+
shuffle=True,
|
| 52 |
+
)
|
| 53 |
+
|
| 54 |
+
holdout_labels = [labels[idx] for idx in holdout_idx]
|
| 55 |
+
val_idx, test_idx = train_test_split(
|
| 56 |
+
holdout_idx,
|
| 57 |
+
test_size=0.5,
|
| 58 |
+
stratify=holdout_labels,
|
| 59 |
+
random_state=RANDOM_STATE,
|
| 60 |
+
shuffle=True,
|
| 61 |
+
)
|
| 62 |
+
|
| 63 |
+
train_rows = [copy.deepcopy(rows[idx]) for idx in train_idx]
|
| 64 |
+
val_rows = [copy.deepcopy(rows[idx]) for idx in val_idx]
|
| 65 |
+
test_rows = [copy.deepcopy(rows[idx]) for idx in test_idx]
|
| 66 |
+
return train_rows, val_rows, test_rows
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
def add_eval_categories(train_rows: list[dict], eval_rows: list[dict]) -> list[dict]:
|
| 70 |
+
train_sentences = {row["sentence"] for row in train_rows}
|
| 71 |
+
output = []
|
| 72 |
+
for row in eval_rows:
|
| 73 |
+
new_row = copy.deepcopy(row)
|
| 74 |
+
if new_row["sentence"] in train_sentences:
|
| 75 |
+
new_row["evaluation_category"] = "seen_sentence_new_entity"
|
| 76 |
+
else:
|
| 77 |
+
new_row["evaluation_category"] = "unseen_sentence"
|
| 78 |
+
output.append(new_row)
|
| 79 |
+
return output
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
def count_types(rows: list[dict]) -> Counter:
|
| 83 |
+
return Counter(row["type"] for row in rows)
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
def count_type_and_category(rows: list[dict]) -> dict[str, dict[str, int]]:
|
| 87 |
+
counts = defaultdict(lambda: {"unseen_sentence": 0, "seen_sentence_new_entity": 0})
|
| 88 |
+
for row in rows:
|
| 89 |
+
counts[row["type"]][row["evaluation_category"]] += 1
|
| 90 |
+
return dict(sorted(counts.items()))
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
def write_split_assignments(
|
| 94 |
+
train_rows: list[dict],
|
| 95 |
+
val_rows: list[dict],
|
| 96 |
+
test_rows: list[dict],
|
| 97 |
+
) -> None:
|
| 98 |
+
ARTIFACTS_DIR.mkdir(parents=True, exist_ok=True)
|
| 99 |
+
sentence_groups = []
|
| 100 |
+
for split_name, rows in [("train", train_rows), ("validation", val_rows), ("test", test_rows)]:
|
| 101 |
+
by_sentence = defaultdict(list)
|
| 102 |
+
for row in rows:
|
| 103 |
+
by_sentence[row["sentence"]].append(row)
|
| 104 |
+
for sentence, sentence_rows in by_sentence.items():
|
| 105 |
+
type_counts = Counter(row["type"] for row in sentence_rows)
|
| 106 |
+
sentence_groups.append(
|
| 107 |
+
{
|
| 108 |
+
"sentence": sentence,
|
| 109 |
+
"assigned_split": split_name,
|
| 110 |
+
"row_count": len(sentence_rows),
|
| 111 |
+
"type_counts": dict(sorted(type_counts.items())),
|
| 112 |
+
"row_ids": [row["id"] for row in sentence_rows],
|
| 113 |
+
}
|
| 114 |
+
)
|
| 115 |
+
|
| 116 |
+
sentence_groups.sort(key=lambda item: (item["assigned_split"], item["sentence"]))
|
| 117 |
+
dump_jsonl(ASSIGNMENTS_PATH, sentence_groups)
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
def validate(
|
| 121 |
+
original_rows: list[dict],
|
| 122 |
+
train_rows: list[dict],
|
| 123 |
+
val_rows: list[dict],
|
| 124 |
+
test_rows: list[dict],
|
| 125 |
+
) -> dict:
|
| 126 |
+
errors = []
|
| 127 |
+
all_rows = train_rows + val_rows + test_rows
|
| 128 |
+
original_by_id = {row["id"]: row for row in original_rows}
|
| 129 |
+
seen_ids = set()
|
| 130 |
+
|
| 131 |
+
for split_name, rows in [("train", train_rows), ("validation", val_rows), ("test", test_rows)]:
|
| 132 |
+
for row in rows:
|
| 133 |
+
row_id = row["id"]
|
| 134 |
+
if row_id in seen_ids:
|
| 135 |
+
errors.append(f"duplicate row id across splits: {row_id}")
|
| 136 |
+
seen_ids.add(row_id)
|
| 137 |
+
|
| 138 |
+
if row_id not in original_by_id:
|
| 139 |
+
errors.append(f"row id missing from original dataset: {row_id}")
|
| 140 |
+
continue
|
| 141 |
+
|
| 142 |
+
baseline = original_by_id[row_id]
|
| 143 |
+
compare_keys = sorted(set(row.keys()) | set(baseline.keys()) - {"evaluation_category"})
|
| 144 |
+
for key in compare_keys:
|
| 145 |
+
if key == "evaluation_category":
|
| 146 |
+
continue
|
| 147 |
+
if row.get(key) != baseline.get(key):
|
| 148 |
+
errors.append(f"{split_name} row {row_id} changed original field {key}")
|
| 149 |
+
break
|
| 150 |
+
|
| 151 |
+
chars_entity, tokens_entity = extract_entity_from_spans(row)
|
| 152 |
+
if chars_entity != row["entity"]:
|
| 153 |
+
errors.append(f"{split_name} row {row_id} char span mismatch")
|
| 154 |
+
if tokens_entity != row["entity"]:
|
| 155 |
+
errors.append(f"{split_name} row {row_id} token span mismatch")
|
| 156 |
+
|
| 157 |
+
if split_name == "train":
|
| 158 |
+
if "evaluation_category" in row:
|
| 159 |
+
errors.append(f"train row {row_id} should not have evaluation_category")
|
| 160 |
+
else:
|
| 161 |
+
if row.get("evaluation_category") not in {"unseen_sentence", "seen_sentence_new_entity"}:
|
| 162 |
+
errors.append(f"{split_name} row {row_id} missing valid evaluation_category")
|
| 163 |
+
|
| 164 |
+
if len(original_rows) != len(all_rows):
|
| 165 |
+
errors.append("row count mismatch after splitting")
|
| 166 |
+
if len(original_by_id) != len(seen_ids):
|
| 167 |
+
errors.append("not all row ids are present exactly once")
|
| 168 |
+
|
| 169 |
+
all_types = sorted({row["type"] for row in original_rows})
|
| 170 |
+
for split_name, rows in [("train", train_rows), ("validation", val_rows), ("test", test_rows)]:
|
| 171 |
+
split_types = {row["type"] for row in rows}
|
| 172 |
+
missing_types = sorted(set(all_types) - split_types)
|
| 173 |
+
if missing_types:
|
| 174 |
+
errors.append(f"{split_name} missing types: {missing_types}")
|
| 175 |
+
|
| 176 |
+
repeat_train, repeat_val, repeat_test = stratified_split(original_rows)
|
| 177 |
+
repeat_val = add_eval_categories(repeat_train, repeat_val)
|
| 178 |
+
repeat_test = add_eval_categories(repeat_train, repeat_test)
|
| 179 |
+
if [row["id"] for row in repeat_train] != [row["id"] for row in train_rows]:
|
| 180 |
+
errors.append("train split is not deterministic for the fixed seed")
|
| 181 |
+
if [row["id"] for row in repeat_val] != [row["id"] for row in val_rows]:
|
| 182 |
+
errors.append("validation split is not deterministic for the fixed seed")
|
| 183 |
+
if [row["id"] for row in repeat_test] != [row["id"] for row in test_rows]:
|
| 184 |
+
errors.append("test split is not deterministic for the fixed seed")
|
| 185 |
+
|
| 186 |
+
return {
|
| 187 |
+
"ok": not errors,
|
| 188 |
+
"errors": errors,
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
def make_summary(
|
| 193 |
+
original_rows: list[dict],
|
| 194 |
+
train_rows: list[dict],
|
| 195 |
+
val_rows: list[dict],
|
| 196 |
+
test_rows: list[dict],
|
| 197 |
+
validation_result: dict,
|
| 198 |
+
) -> dict:
|
| 199 |
+
original_type_counts = count_types(original_rows)
|
| 200 |
+
train_type_counts = count_types(train_rows)
|
| 201 |
+
val_type_counts = count_types(val_rows)
|
| 202 |
+
test_type_counts = count_types(test_rows)
|
| 203 |
+
|
| 204 |
+
def split_block(name: str, rows: list[dict]) -> dict:
|
| 205 |
+
return {
|
| 206 |
+
"name": name,
|
| 207 |
+
"rows": len(rows),
|
| 208 |
+
"percentage": len(rows) / len(original_rows),
|
| 209 |
+
"unique_sentences": len({row["sentence"] for row in rows}),
|
| 210 |
+
"type_counts": dict(sorted(count_types(rows).items())),
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
summary = {
|
| 214 |
+
"random_seed": RANDOM_STATE,
|
| 215 |
+
"requested_split_ratios": {
|
| 216 |
+
"train": TRAIN_RATIO,
|
| 217 |
+
"validation": VAL_RATIO,
|
| 218 |
+
"test": TEST_RATIO,
|
| 219 |
+
},
|
| 220 |
+
"totals": {
|
| 221 |
+
"original_rows": len(original_rows),
|
| 222 |
+
"train_rows": len(train_rows),
|
| 223 |
+
"validation_rows": len(val_rows),
|
| 224 |
+
"test_rows": len(test_rows),
|
| 225 |
+
},
|
| 226 |
+
"splits": {
|
| 227 |
+
"train": split_block("train", train_rows),
|
| 228 |
+
"validation": split_block("validation", val_rows),
|
| 229 |
+
"test": split_block("test", test_rows),
|
| 230 |
+
},
|
| 231 |
+
"per_type_counts": {},
|
| 232 |
+
"evaluation_category_counts": {
|
| 233 |
+
"validation": dict(sorted(Counter(row["evaluation_category"] for row in val_rows).items())),
|
| 234 |
+
"test": dict(sorted(Counter(row["evaluation_category"] for row in test_rows).items())),
|
| 235 |
+
},
|
| 236 |
+
"evaluation_category_counts_by_type": {
|
| 237 |
+
"validation": count_type_and_category(val_rows),
|
| 238 |
+
"test": count_type_and_category(test_rows),
|
| 239 |
+
},
|
| 240 |
+
"validation": validation_result,
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
for entity_type in sorted(original_type_counts):
|
| 244 |
+
summary["per_type_counts"][entity_type] = {
|
| 245 |
+
"original": original_type_counts[entity_type],
|
| 246 |
+
"train": train_type_counts[entity_type],
|
| 247 |
+
"validation": val_type_counts[entity_type],
|
| 248 |
+
"test": test_type_counts[entity_type],
|
| 249 |
+
"train_ratio": train_type_counts[entity_type] / original_type_counts[entity_type],
|
| 250 |
+
"validation_ratio": val_type_counts[entity_type] / original_type_counts[entity_type],
|
| 251 |
+
"test_ratio": test_type_counts[entity_type] / original_type_counts[entity_type],
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
return summary
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
def main() -> None:
|
| 258 |
+
original_rows = load_rows()
|
| 259 |
+
ARTIFACTS_DIR.mkdir(parents=True, exist_ok=True)
|
| 260 |
+
train_rows, val_rows, test_rows = stratified_split(original_rows)
|
| 261 |
+
val_rows = add_eval_categories(train_rows, val_rows)
|
| 262 |
+
test_rows = add_eval_categories(train_rows, test_rows)
|
| 263 |
+
|
| 264 |
+
dump_jsonl(TRAIN_PATH, train_rows)
|
| 265 |
+
dump_jsonl(VAL_PATH, val_rows)
|
| 266 |
+
dump_jsonl(TEST_PATH, test_rows)
|
| 267 |
+
write_split_assignments(train_rows, val_rows, test_rows)
|
| 268 |
+
|
| 269 |
+
validation_result = validate(original_rows, train_rows, val_rows, test_rows)
|
| 270 |
+
summary = make_summary(original_rows, train_rows, val_rows, test_rows, validation_result)
|
| 271 |
+
SUMMARY_PATH.write_text(json.dumps(summary, ensure_ascii=False, indent=2), encoding="utf-8")
|
| 272 |
+
|
| 273 |
+
print(json.dumps(summary["totals"], ensure_ascii=False, indent=2))
|
| 274 |
+
print(json.dumps(summary["evaluation_category_counts"], ensure_ascii=False, indent=2))
|
| 275 |
+
if not validation_result["ok"]:
|
| 276 |
+
raise SystemExit("split validation failed")
|
| 277 |
+
|
| 278 |
+
|
| 279 |
+
if __name__ == "__main__":
|
| 280 |
+
main()
|
split_summary.json
ADDED
|
@@ -0,0 +1,482 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"random_seed": 42,
|
| 3 |
+
"requested_split_ratios": {
|
| 4 |
+
"train": 0.8,
|
| 5 |
+
"validation": 0.1,
|
| 6 |
+
"test": 0.1
|
| 7 |
+
},
|
| 8 |
+
"totals": {
|
| 9 |
+
"original_rows": 125996,
|
| 10 |
+
"train_rows": 100796,
|
| 11 |
+
"validation_rows": 12600,
|
| 12 |
+
"test_rows": 12600
|
| 13 |
+
},
|
| 14 |
+
"splits": {
|
| 15 |
+
"train": {
|
| 16 |
+
"name": "train",
|
| 17 |
+
"rows": 100796,
|
| 18 |
+
"percentage": 0.7999936505920823,
|
| 19 |
+
"unique_sentences": 32409,
|
| 20 |
+
"type_counts": {
|
| 21 |
+
"CARDINAL": 2979,
|
| 22 |
+
"CURR": 329,
|
| 23 |
+
"DATE": 15809,
|
| 24 |
+
"EVENT": 3015,
|
| 25 |
+
"FAC": 1037,
|
| 26 |
+
"GPE": 21521,
|
| 27 |
+
"LANGUAGE": 266,
|
| 28 |
+
"LAW": 723,
|
| 29 |
+
"LOC": 1910,
|
| 30 |
+
"MONEY": 336,
|
| 31 |
+
"NORP": 8174,
|
| 32 |
+
"OCC": 6157,
|
| 33 |
+
"ORDINAL": 6246,
|
| 34 |
+
"ORG": 21274,
|
| 35 |
+
"PERCENT": 250,
|
| 36 |
+
"PERS": 8569,
|
| 37 |
+
"PRODUCT": 152,
|
| 38 |
+
"QUANTITY": 85,
|
| 39 |
+
"TIME": 697,
|
| 40 |
+
"UNIT": 85,
|
| 41 |
+
"WEBSITE": 1182
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"validation": {
|
| 45 |
+
"name": "validation",
|
| 46 |
+
"rows": 12600,
|
| 47 |
+
"percentage": 0.10000317470395885,
|
| 48 |
+
"unique_sentences": 10139,
|
| 49 |
+
"type_counts": {
|
| 50 |
+
"CARDINAL": 373,
|
| 51 |
+
"CURR": 41,
|
| 52 |
+
"DATE": 1976,
|
| 53 |
+
"EVENT": 377,
|
| 54 |
+
"FAC": 130,
|
| 55 |
+
"GPE": 2690,
|
| 56 |
+
"LANGUAGE": 33,
|
| 57 |
+
"LAW": 90,
|
| 58 |
+
"LOC": 239,
|
| 59 |
+
"MONEY": 42,
|
| 60 |
+
"NORP": 1022,
|
| 61 |
+
"OCC": 769,
|
| 62 |
+
"ORDINAL": 780,
|
| 63 |
+
"ORG": 2660,
|
| 64 |
+
"PERCENT": 31,
|
| 65 |
+
"PERS": 1072,
|
| 66 |
+
"PRODUCT": 19,
|
| 67 |
+
"QUANTITY": 11,
|
| 68 |
+
"TIME": 87,
|
| 69 |
+
"UNIT": 10,
|
| 70 |
+
"WEBSITE": 148
|
| 71 |
+
}
|
| 72 |
+
},
|
| 73 |
+
"test": {
|
| 74 |
+
"name": "test",
|
| 75 |
+
"rows": 12600,
|
| 76 |
+
"percentage": 0.10000317470395885,
|
| 77 |
+
"unique_sentences": 10161,
|
| 78 |
+
"type_counts": {
|
| 79 |
+
"CARDINAL": 372,
|
| 80 |
+
"CURR": 41,
|
| 81 |
+
"DATE": 1977,
|
| 82 |
+
"EVENT": 377,
|
| 83 |
+
"FAC": 129,
|
| 84 |
+
"GPE": 2691,
|
| 85 |
+
"LANGUAGE": 33,
|
| 86 |
+
"LAW": 91,
|
| 87 |
+
"LOC": 239,
|
| 88 |
+
"MONEY": 42,
|
| 89 |
+
"NORP": 1021,
|
| 90 |
+
"OCC": 770,
|
| 91 |
+
"ORDINAL": 781,
|
| 92 |
+
"ORG": 2659,
|
| 93 |
+
"PERCENT": 31,
|
| 94 |
+
"PERS": 1071,
|
| 95 |
+
"PRODUCT": 19,
|
| 96 |
+
"QUANTITY": 10,
|
| 97 |
+
"TIME": 87,
|
| 98 |
+
"UNIT": 11,
|
| 99 |
+
"WEBSITE": 148
|
| 100 |
+
}
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"per_type_counts": {
|
| 104 |
+
"CARDINAL": {
|
| 105 |
+
"original": 3724,
|
| 106 |
+
"train": 2979,
|
| 107 |
+
"validation": 373,
|
| 108 |
+
"test": 372,
|
| 109 |
+
"train_ratio": 0.7999462943071965,
|
| 110 |
+
"validation_ratio": 0.10016111707841031,
|
| 111 |
+
"test_ratio": 0.09989258861439312
|
| 112 |
+
},
|
| 113 |
+
"CURR": {
|
| 114 |
+
"original": 411,
|
| 115 |
+
"train": 329,
|
| 116 |
+
"validation": 41,
|
| 117 |
+
"test": 41,
|
| 118 |
+
"train_ratio": 0.8004866180048662,
|
| 119 |
+
"validation_ratio": 0.09975669099756691,
|
| 120 |
+
"test_ratio": 0.09975669099756691
|
| 121 |
+
},
|
| 122 |
+
"DATE": {
|
| 123 |
+
"original": 19762,
|
| 124 |
+
"train": 15809,
|
| 125 |
+
"validation": 1976,
|
| 126 |
+
"test": 1977,
|
| 127 |
+
"train_ratio": 0.7999696387005364,
|
| 128 |
+
"validation_ratio": 0.09998987956684546,
|
| 129 |
+
"test_ratio": 0.10004048173261816
|
| 130 |
+
},
|
| 131 |
+
"EVENT": {
|
| 132 |
+
"original": 3769,
|
| 133 |
+
"train": 3015,
|
| 134 |
+
"validation": 377,
|
| 135 |
+
"test": 377,
|
| 136 |
+
"train_ratio": 0.7999469355266648,
|
| 137 |
+
"validation_ratio": 0.10002653223666755,
|
| 138 |
+
"test_ratio": 0.10002653223666755
|
| 139 |
+
},
|
| 140 |
+
"FAC": {
|
| 141 |
+
"original": 1296,
|
| 142 |
+
"train": 1037,
|
| 143 |
+
"validation": 130,
|
| 144 |
+
"test": 129,
|
| 145 |
+
"train_ratio": 0.8001543209876543,
|
| 146 |
+
"validation_ratio": 0.10030864197530864,
|
| 147 |
+
"test_ratio": 0.09953703703703703
|
| 148 |
+
},
|
| 149 |
+
"GPE": {
|
| 150 |
+
"original": 26902,
|
| 151 |
+
"train": 21521,
|
| 152 |
+
"validation": 2690,
|
| 153 |
+
"test": 2691,
|
| 154 |
+
"train_ratio": 0.7999776968255148,
|
| 155 |
+
"validation_ratio": 0.09999256560850495,
|
| 156 |
+
"test_ratio": 0.10002973756598023
|
| 157 |
+
},
|
| 158 |
+
"LANGUAGE": {
|
| 159 |
+
"original": 332,
|
| 160 |
+
"train": 266,
|
| 161 |
+
"validation": 33,
|
| 162 |
+
"test": 33,
|
| 163 |
+
"train_ratio": 0.8012048192771084,
|
| 164 |
+
"validation_ratio": 0.09939759036144578,
|
| 165 |
+
"test_ratio": 0.09939759036144578
|
| 166 |
+
},
|
| 167 |
+
"LAW": {
|
| 168 |
+
"original": 904,
|
| 169 |
+
"train": 723,
|
| 170 |
+
"validation": 90,
|
| 171 |
+
"test": 91,
|
| 172 |
+
"train_ratio": 0.7997787610619469,
|
| 173 |
+
"validation_ratio": 0.09955752212389381,
|
| 174 |
+
"test_ratio": 0.1006637168141593
|
| 175 |
+
},
|
| 176 |
+
"LOC": {
|
| 177 |
+
"original": 2388,
|
| 178 |
+
"train": 1910,
|
| 179 |
+
"validation": 239,
|
| 180 |
+
"test": 239,
|
| 181 |
+
"train_ratio": 0.7998324958123953,
|
| 182 |
+
"validation_ratio": 0.10008375209380234,
|
| 183 |
+
"test_ratio": 0.10008375209380234
|
| 184 |
+
},
|
| 185 |
+
"MONEY": {
|
| 186 |
+
"original": 420,
|
| 187 |
+
"train": 336,
|
| 188 |
+
"validation": 42,
|
| 189 |
+
"test": 42,
|
| 190 |
+
"train_ratio": 0.8,
|
| 191 |
+
"validation_ratio": 0.1,
|
| 192 |
+
"test_ratio": 0.1
|
| 193 |
+
},
|
| 194 |
+
"NORP": {
|
| 195 |
+
"original": 10217,
|
| 196 |
+
"train": 8174,
|
| 197 |
+
"validation": 1022,
|
| 198 |
+
"test": 1021,
|
| 199 |
+
"train_ratio": 0.8000391504355486,
|
| 200 |
+
"validation_ratio": 0.10002936282666144,
|
| 201 |
+
"test_ratio": 0.09993148673778995
|
| 202 |
+
},
|
| 203 |
+
"OCC": {
|
| 204 |
+
"original": 7696,
|
| 205 |
+
"train": 6157,
|
| 206 |
+
"validation": 769,
|
| 207 |
+
"test": 770,
|
| 208 |
+
"train_ratio": 0.8000259875259875,
|
| 209 |
+
"validation_ratio": 0.09992203742203742,
|
| 210 |
+
"test_ratio": 0.10005197505197505
|
| 211 |
+
},
|
| 212 |
+
"ORDINAL": {
|
| 213 |
+
"original": 7807,
|
| 214 |
+
"train": 6246,
|
| 215 |
+
"validation": 780,
|
| 216 |
+
"test": 781,
|
| 217 |
+
"train_ratio": 0.8000512360701935,
|
| 218 |
+
"validation_ratio": 0.09991033687716153,
|
| 219 |
+
"test_ratio": 0.10003842705264507
|
| 220 |
+
},
|
| 221 |
+
"ORG": {
|
| 222 |
+
"original": 26593,
|
| 223 |
+
"train": 21274,
|
| 224 |
+
"validation": 2660,
|
| 225 |
+
"test": 2659,
|
| 226 |
+
"train_ratio": 0.7999849584477118,
|
| 227 |
+
"validation_ratio": 0.10002632271650434,
|
| 228 |
+
"test_ratio": 0.09998871883578385
|
| 229 |
+
},
|
| 230 |
+
"PERCENT": {
|
| 231 |
+
"original": 312,
|
| 232 |
+
"train": 250,
|
| 233 |
+
"validation": 31,
|
| 234 |
+
"test": 31,
|
| 235 |
+
"train_ratio": 0.8012820512820513,
|
| 236 |
+
"validation_ratio": 0.09935897435897435,
|
| 237 |
+
"test_ratio": 0.09935897435897435
|
| 238 |
+
},
|
| 239 |
+
"PERS": {
|
| 240 |
+
"original": 10712,
|
| 241 |
+
"train": 8569,
|
| 242 |
+
"validation": 1072,
|
| 243 |
+
"test": 1071,
|
| 244 |
+
"train_ratio": 0.7999439880507841,
|
| 245 |
+
"validation_ratio": 0.10007468259895444,
|
| 246 |
+
"test_ratio": 0.09998132935026138
|
| 247 |
+
},
|
| 248 |
+
"PRODUCT": {
|
| 249 |
+
"original": 190,
|
| 250 |
+
"train": 152,
|
| 251 |
+
"validation": 19,
|
| 252 |
+
"test": 19,
|
| 253 |
+
"train_ratio": 0.8,
|
| 254 |
+
"validation_ratio": 0.1,
|
| 255 |
+
"test_ratio": 0.1
|
| 256 |
+
},
|
| 257 |
+
"QUANTITY": {
|
| 258 |
+
"original": 106,
|
| 259 |
+
"train": 85,
|
| 260 |
+
"validation": 11,
|
| 261 |
+
"test": 10,
|
| 262 |
+
"train_ratio": 0.8018867924528302,
|
| 263 |
+
"validation_ratio": 0.10377358490566038,
|
| 264 |
+
"test_ratio": 0.09433962264150944
|
| 265 |
+
},
|
| 266 |
+
"TIME": {
|
| 267 |
+
"original": 871,
|
| 268 |
+
"train": 697,
|
| 269 |
+
"validation": 87,
|
| 270 |
+
"test": 87,
|
| 271 |
+
"train_ratio": 0.8002296211251435,
|
| 272 |
+
"validation_ratio": 0.09988518943742825,
|
| 273 |
+
"test_ratio": 0.09988518943742825
|
| 274 |
+
},
|
| 275 |
+
"UNIT": {
|
| 276 |
+
"original": 106,
|
| 277 |
+
"train": 85,
|
| 278 |
+
"validation": 10,
|
| 279 |
+
"test": 11,
|
| 280 |
+
"train_ratio": 0.8018867924528302,
|
| 281 |
+
"validation_ratio": 0.09433962264150944,
|
| 282 |
+
"test_ratio": 0.10377358490566038
|
| 283 |
+
},
|
| 284 |
+
"WEBSITE": {
|
| 285 |
+
"original": 1478,
|
| 286 |
+
"train": 1182,
|
| 287 |
+
"validation": 148,
|
| 288 |
+
"test": 148,
|
| 289 |
+
"train_ratio": 0.7997293640054127,
|
| 290 |
+
"validation_ratio": 0.10013531799729364,
|
| 291 |
+
"test_ratio": 0.10013531799729364
|
| 292 |
+
}
|
| 293 |
+
},
|
| 294 |
+
"evaluation_category_counts": {
|
| 295 |
+
"validation": {
|
| 296 |
+
"seen_sentence_new_entity": 11661,
|
| 297 |
+
"unseen_sentence": 939
|
| 298 |
+
},
|
| 299 |
+
"test": {
|
| 300 |
+
"seen_sentence_new_entity": 11606,
|
| 301 |
+
"unseen_sentence": 994
|
| 302 |
+
}
|
| 303 |
+
},
|
| 304 |
+
"evaluation_category_counts_by_type": {
|
| 305 |
+
"validation": {
|
| 306 |
+
"CARDINAL": {
|
| 307 |
+
"unseen_sentence": 49,
|
| 308 |
+
"seen_sentence_new_entity": 324
|
| 309 |
+
},
|
| 310 |
+
"CURR": {
|
| 311 |
+
"unseen_sentence": 2,
|
| 312 |
+
"seen_sentence_new_entity": 39
|
| 313 |
+
},
|
| 314 |
+
"DATE": {
|
| 315 |
+
"unseen_sentence": 124,
|
| 316 |
+
"seen_sentence_new_entity": 1852
|
| 317 |
+
},
|
| 318 |
+
"EVENT": {
|
| 319 |
+
"unseen_sentence": 15,
|
| 320 |
+
"seen_sentence_new_entity": 362
|
| 321 |
+
},
|
| 322 |
+
"FAC": {
|
| 323 |
+
"unseen_sentence": 13,
|
| 324 |
+
"seen_sentence_new_entity": 117
|
| 325 |
+
},
|
| 326 |
+
"GPE": {
|
| 327 |
+
"unseen_sentence": 159,
|
| 328 |
+
"seen_sentence_new_entity": 2531
|
| 329 |
+
},
|
| 330 |
+
"LANGUAGE": {
|
| 331 |
+
"unseen_sentence": 3,
|
| 332 |
+
"seen_sentence_new_entity": 30
|
| 333 |
+
},
|
| 334 |
+
"LAW": {
|
| 335 |
+
"unseen_sentence": 7,
|
| 336 |
+
"seen_sentence_new_entity": 83
|
| 337 |
+
},
|
| 338 |
+
"LOC": {
|
| 339 |
+
"unseen_sentence": 17,
|
| 340 |
+
"seen_sentence_new_entity": 222
|
| 341 |
+
},
|
| 342 |
+
"MONEY": {
|
| 343 |
+
"unseen_sentence": 1,
|
| 344 |
+
"seen_sentence_new_entity": 41
|
| 345 |
+
},
|
| 346 |
+
"NORP": {
|
| 347 |
+
"unseen_sentence": 101,
|
| 348 |
+
"seen_sentence_new_entity": 921
|
| 349 |
+
},
|
| 350 |
+
"OCC": {
|
| 351 |
+
"unseen_sentence": 45,
|
| 352 |
+
"seen_sentence_new_entity": 724
|
| 353 |
+
},
|
| 354 |
+
"ORDINAL": {
|
| 355 |
+
"unseen_sentence": 89,
|
| 356 |
+
"seen_sentence_new_entity": 691
|
| 357 |
+
},
|
| 358 |
+
"ORG": {
|
| 359 |
+
"unseen_sentence": 114,
|
| 360 |
+
"seen_sentence_new_entity": 2546
|
| 361 |
+
},
|
| 362 |
+
"PERCENT": {
|
| 363 |
+
"unseen_sentence": 2,
|
| 364 |
+
"seen_sentence_new_entity": 29
|
| 365 |
+
},
|
| 366 |
+
"PERS": {
|
| 367 |
+
"unseen_sentence": 145,
|
| 368 |
+
"seen_sentence_new_entity": 927
|
| 369 |
+
},
|
| 370 |
+
"PRODUCT": {
|
| 371 |
+
"unseen_sentence": 3,
|
| 372 |
+
"seen_sentence_new_entity": 16
|
| 373 |
+
},
|
| 374 |
+
"QUANTITY": {
|
| 375 |
+
"unseen_sentence": 0,
|
| 376 |
+
"seen_sentence_new_entity": 11
|
| 377 |
+
},
|
| 378 |
+
"TIME": {
|
| 379 |
+
"unseen_sentence": 12,
|
| 380 |
+
"seen_sentence_new_entity": 75
|
| 381 |
+
},
|
| 382 |
+
"UNIT": {
|
| 383 |
+
"unseen_sentence": 1,
|
| 384 |
+
"seen_sentence_new_entity": 9
|
| 385 |
+
},
|
| 386 |
+
"WEBSITE": {
|
| 387 |
+
"unseen_sentence": 37,
|
| 388 |
+
"seen_sentence_new_entity": 111
|
| 389 |
+
}
|
| 390 |
+
},
|
| 391 |
+
"test": {
|
| 392 |
+
"CARDINAL": {
|
| 393 |
+
"unseen_sentence": 49,
|
| 394 |
+
"seen_sentence_new_entity": 323
|
| 395 |
+
},
|
| 396 |
+
"CURR": {
|
| 397 |
+
"unseen_sentence": 3,
|
| 398 |
+
"seen_sentence_new_entity": 38
|
| 399 |
+
},
|
| 400 |
+
"DATE": {
|
| 401 |
+
"unseen_sentence": 120,
|
| 402 |
+
"seen_sentence_new_entity": 1857
|
| 403 |
+
},
|
| 404 |
+
"EVENT": {
|
| 405 |
+
"unseen_sentence": 14,
|
| 406 |
+
"seen_sentence_new_entity": 363
|
| 407 |
+
},
|
| 408 |
+
"FAC": {
|
| 409 |
+
"unseen_sentence": 8,
|
| 410 |
+
"seen_sentence_new_entity": 121
|
| 411 |
+
},
|
| 412 |
+
"GPE": {
|
| 413 |
+
"unseen_sentence": 153,
|
| 414 |
+
"seen_sentence_new_entity": 2538
|
| 415 |
+
},
|
| 416 |
+
"LANGUAGE": {
|
| 417 |
+
"unseen_sentence": 8,
|
| 418 |
+
"seen_sentence_new_entity": 25
|
| 419 |
+
},
|
| 420 |
+
"LAW": {
|
| 421 |
+
"unseen_sentence": 8,
|
| 422 |
+
"seen_sentence_new_entity": 83
|
| 423 |
+
},
|
| 424 |
+
"LOC": {
|
| 425 |
+
"unseen_sentence": 15,
|
| 426 |
+
"seen_sentence_new_entity": 224
|
| 427 |
+
},
|
| 428 |
+
"MONEY": {
|
| 429 |
+
"unseen_sentence": 1,
|
| 430 |
+
"seen_sentence_new_entity": 41
|
| 431 |
+
},
|
| 432 |
+
"NORP": {
|
| 433 |
+
"unseen_sentence": 125,
|
| 434 |
+
"seen_sentence_new_entity": 896
|
| 435 |
+
},
|
| 436 |
+
"OCC": {
|
| 437 |
+
"unseen_sentence": 50,
|
| 438 |
+
"seen_sentence_new_entity": 720
|
| 439 |
+
},
|
| 440 |
+
"ORDINAL": {
|
| 441 |
+
"unseen_sentence": 82,
|
| 442 |
+
"seen_sentence_new_entity": 699
|
| 443 |
+
},
|
| 444 |
+
"ORG": {
|
| 445 |
+
"unseen_sentence": 139,
|
| 446 |
+
"seen_sentence_new_entity": 2520
|
| 447 |
+
},
|
| 448 |
+
"PERCENT": {
|
| 449 |
+
"unseen_sentence": 2,
|
| 450 |
+
"seen_sentence_new_entity": 29
|
| 451 |
+
},
|
| 452 |
+
"PERS": {
|
| 453 |
+
"unseen_sentence": 143,
|
| 454 |
+
"seen_sentence_new_entity": 928
|
| 455 |
+
},
|
| 456 |
+
"PRODUCT": {
|
| 457 |
+
"unseen_sentence": 2,
|
| 458 |
+
"seen_sentence_new_entity": 17
|
| 459 |
+
},
|
| 460 |
+
"QUANTITY": {
|
| 461 |
+
"unseen_sentence": 1,
|
| 462 |
+
"seen_sentence_new_entity": 9
|
| 463 |
+
},
|
| 464 |
+
"TIME": {
|
| 465 |
+
"unseen_sentence": 19,
|
| 466 |
+
"seen_sentence_new_entity": 68
|
| 467 |
+
},
|
| 468 |
+
"UNIT": {
|
| 469 |
+
"unseen_sentence": 0,
|
| 470 |
+
"seen_sentence_new_entity": 11
|
| 471 |
+
},
|
| 472 |
+
"WEBSITE": {
|
| 473 |
+
"unseen_sentence": 52,
|
| 474 |
+
"seen_sentence_new_entity": 96
|
| 475 |
+
}
|
| 476 |
+
}
|
| 477 |
+
},
|
| 478 |
+
"validation": {
|
| 479 |
+
"ok": true,
|
| 480 |
+
"errors": []
|
| 481 |
+
}
|
| 482 |
+
}
|
type_predictor_test.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
type_predictor_train.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:20061ac6df35353e01977a85f0d6fc1466a609a093ef76a06a90f7580cbb65f8
|
| 3 |
+
size 70476669
|
type_predictor_val.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|