mmmikolajczak commited on
Commit
a51f8ff
·
verified ·
1 Parent(s): 43e22eb

Add FinBen FINER-ORD v0 datasets, requests, and manifests

Browse files
datasets/finer_ord/finben/v0/all_clean.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
datasets/finer_ord/finben/v0/clean_meta.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset_id": "finben_finer_ord_v0",
3
+ "config": "token_labels_v0",
4
+ "source_dataset": "TheFinAI/finben-finer-ord",
5
+ "n_in": 1075,
6
+ "n_out": 1075,
7
+ "allowed_labels": [
8
+ "B-LOC",
9
+ "B-ORG",
10
+ "B-PER",
11
+ "I-LOC",
12
+ "I-ORG",
13
+ "I-PER",
14
+ "O"
15
+ ],
16
+ "token_label_counts": {
17
+ "O": 24130,
18
+ "B-PER": 284,
19
+ "I-PER": 182,
20
+ "B-LOC": 300,
21
+ "I-LOC": 128,
22
+ "B-ORG": 544,
23
+ "I-ORG": 389
24
+ },
25
+ "sentence_signature_counts": {
26
+ "NONE": 524,
27
+ "LOC+PER": 35,
28
+ "LOC": 77,
29
+ "PER": 107,
30
+ "ORG": 200,
31
+ "LOC+ORG": 59,
32
+ "ORG+PER": 50,
33
+ "LOC+ORG+PER": 23
34
+ }
35
+ }
datasets/finer_ord/finben/v0/split_meta.json ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset_id": "finben_finer_ord_v0",
3
+ "config": "stratified_80_20_v0",
4
+ "source_clean_file": "data/finer_ord/processed/finben_finer_ord_all_clean.jsonl",
5
+ "seed": 42,
6
+ "test_fraction": 0.2,
7
+ "n_total": 1075,
8
+ "n_train": 860,
9
+ "n_test": 215,
10
+ "stratify_on": "meta.label_signature",
11
+ "per_signature_split": {
12
+ "LOC": {
13
+ "total": 77,
14
+ "train": 62,
15
+ "test": 15
16
+ },
17
+ "LOC+ORG": {
18
+ "total": 59,
19
+ "train": 47,
20
+ "test": 12
21
+ },
22
+ "LOC+ORG+PER": {
23
+ "total": 23,
24
+ "train": 18,
25
+ "test": 5
26
+ },
27
+ "LOC+PER": {
28
+ "total": 35,
29
+ "train": 28,
30
+ "test": 7
31
+ },
32
+ "NONE": {
33
+ "total": 524,
34
+ "train": 419,
35
+ "test": 105
36
+ },
37
+ "ORG": {
38
+ "total": 200,
39
+ "train": 160,
40
+ "test": 40
41
+ },
42
+ "ORG+PER": {
43
+ "total": 50,
44
+ "train": 40,
45
+ "test": 10
46
+ },
47
+ "PER": {
48
+ "total": 107,
49
+ "train": 86,
50
+ "test": 21
51
+ }
52
+ },
53
+ "sentence_signature_counts_train": {
54
+ "NONE": 419,
55
+ "LOC+ORG": 47,
56
+ "ORG": 160,
57
+ "LOC": 62,
58
+ "LOC+PER": 28,
59
+ "PER": 86,
60
+ "ORG+PER": 40,
61
+ "LOC+ORG+PER": 18
62
+ },
63
+ "sentence_signature_counts_test": {
64
+ "NONE": 105,
65
+ "ORG": 40,
66
+ "PER": 21,
67
+ "ORG+PER": 10,
68
+ "LOC+ORG": 12,
69
+ "LOC+PER": 7,
70
+ "LOC": 15,
71
+ "LOC+ORG+PER": 5
72
+ },
73
+ "token_label_counts_train": {
74
+ "O": 19339,
75
+ "B-ORG": 436,
76
+ "B-LOC": 233,
77
+ "I-ORG": 320,
78
+ "B-PER": 226,
79
+ "I-PER": 144,
80
+ "I-LOC": 109
81
+ },
82
+ "token_label_counts_test": {
83
+ "O": 4791,
84
+ "B-ORG": 108,
85
+ "B-PER": 58,
86
+ "I-PER": 38,
87
+ "I-ORG": 69,
88
+ "B-LOC": 67,
89
+ "I-LOC": 19
90
+ },
91
+ "files": {
92
+ "train": "data/finer_ord/processed/finben_finer_ord_train.jsonl",
93
+ "test": "data/finer_ord/processed/finben_finer_ord_test.jsonl"
94
+ }
95
+ }
datasets/finer_ord/finben/v0/test.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
datasets/finer_ord/finben/v0/train.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
manifests/datasets/finben_finer_ord_v0/checksums.sha256 ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ 60029d0a67c05df8c2c5692a06e2cf3993583a48132b6fd2ef70aafc83836cd6 data/finer_ord/processed/finben_finer_ord_all_clean.jsonl
2
+ c81275976958c7b1c9518e8e39cd98261379a92ac8e7912b2bfd7e3e0cd383c5 data/finer_ord/processed/finben_finer_ord_train.jsonl
3
+ 7a8e34557a9ef4d84a35f38b06f22b6f569804f26dfa6cf732f39a073ba857b2 data/finer_ord/processed/finben_finer_ord_test.jsonl
4
+ 6ec852a13d2e2b0cb93b9ffd86c62c38c4984f15779fcb116919fad8803c0897 data/finer_ord/processed/finben_finer_ord_clean_meta.json
5
+ 6a2ce8a0a5ebc559e183cc13d2b9cd4f230f6b0ab1341ec5fafeb4e2041f210d data/finer_ord/processed/finben_finer_ord_split_meta.json
manifests/datasets/finben_finer_ord_v0/dataset_spec.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset_id": "finben_finer_ord_v0",
3
+ "dataset_name": "FinBen FINER-ORD",
4
+ "version": "0.1.0",
5
+ "dataset_folder": "datasets/finben_finer_ord_v0",
6
+ "provenance": {
7
+ "upstream_source": "TheFinAI/finben-finer-ord",
8
+ "source_kind": "finben_mirror",
9
+ "finben_reference": "TheFinAI/finben-finer-ord"
10
+ },
11
+ "processed": {
12
+ "config": "stratified_80_20_v0",
13
+ "files": {
14
+ "all_clean": "data/finer_ord/processed/finben_finer_ord_all_clean.jsonl",
15
+ "train": "data/finer_ord/processed/finben_finer_ord_train.jsonl",
16
+ "test": "data/finer_ord/processed/finben_finer_ord_test.jsonl"
17
+ },
18
+ "meta_files": {
19
+ "clean_meta": "data/finer_ord/processed/finben_finer_ord_clean_meta.json",
20
+ "split_meta": "data/finer_ord/processed/finben_finer_ord_split_meta.json"
21
+ }
22
+ },
23
+ "label_scheme": {
24
+ "type": "token_classification_bio",
25
+ "task": "named_entity_recognition",
26
+ "entities": [
27
+ "PER",
28
+ "LOC",
29
+ "ORG"
30
+ ],
31
+ "classes": [
32
+ "O",
33
+ "B-PER",
34
+ "I-PER",
35
+ "B-LOC",
36
+ "I-LOC",
37
+ "B-ORG",
38
+ "I-ORG"
39
+ ]
40
+ },
41
+ "split_policy": {
42
+ "type": "local_stratified_train_test",
43
+ "train_fraction": 0.8,
44
+ "test_fraction": 0.2,
45
+ "stratify_on": "meta.label_signature",
46
+ "seed": 42
47
+ },
48
+ "hf_publish": {
49
+ "repo_id": "mmmikolajczak/st312-data",
50
+ "repo_type": "dataset",
51
+ "dataset_root": "datasets/finer_ord/finben/v0",
52
+ "upstream_license": "cc-by-nc-4.0",
53
+ "upstream_license_name": "Creative Commons Attribution-NonCommercial 4.0 International",
54
+ "upstream_license_url": "https://creativecommons.org/licenses/by-nc/4.0/",
55
+ "upstream_license_note": "License listed on the Hugging Face dataset card for TheFinAI/finben-finer-ord (verify when comparing with original source)."
56
+ },
57
+ "status": {
58
+ "raw_ingested": true,
59
+ "cleaned": true,
60
+ "split": true,
61
+ "requests_built": true,
62
+ "published_to_hf": false
63
+ }
64
+ }
manifests/tasks/finben_finer_ord_ner_v0/task_spec.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "task_id": "TA_NER_FINER_ORD_FINBEN_v0",
3
+ "task_name": "FinBen FINER-ORD NER (BIO token tagging)",
4
+ "version": "0.1.0",
5
+ "task_type": "token_classification",
6
+ "dataset": {
7
+ "dataset_id": "finben_finer_ord_v0",
8
+ "train_file": "data/finer_ord/processed/finben_finer_ord_train.jsonl",
9
+ "test_file": "data/finer_ord/processed/finben_finer_ord_test.jsonl"
10
+ },
11
+ "input_schema": {
12
+ "required_fields": [
13
+ "data.tokens"
14
+ ]
15
+ },
16
+ "output_schema": {
17
+ "type": "json_object",
18
+ "strict_single_key": "tags",
19
+ "allowed_tag_values": [
20
+ "O",
21
+ "B-PER",
22
+ "I-PER",
23
+ "B-LOC",
24
+ "I-LOC",
25
+ "B-ORG",
26
+ "I-ORG"
27
+ ]
28
+ },
29
+ "prompt_template": {
30
+ "system": "You are a financial NER tagger. Return ONLY a JSON object with exactly one key: \"tags\". The value must be a JSON array of BIO tags (same length as input tokens). Allowed tags: O, B-PER, I-PER, B-LOC, I-LOC, B-ORG, I-ORG. Do not include any extra text.",
31
+ "user": "Assign a BIO NER tag to each token in order. Output JSON only.\n\nTokens (one per line):\n{{data.tokens_lines}}"
32
+ },
33
+ "metrics": [
34
+ "exact_sequence_accuracy",
35
+ "token_accuracy",
36
+ "entity_span_precision",
37
+ "entity_span_recall",
38
+ "entity_span_f1",
39
+ "micro_f1_non_o"
40
+ ],
41
+ "reward": {
42
+ "script": "scripts/tasks/finben_finer_ord_ner_v0/reward_finer_ord_ner.py",
43
+ "format_reward": {
44
+ "type": "strict_json_schema",
45
+ "weight": 1.0
46
+ },
47
+ "correctness_reward": {
48
+ "name": "shaped_ner_reward_v1",
49
+ "range": [
50
+ 0.0,
51
+ 1.0
52
+ ],
53
+ "components": {
54
+ "entity_span_f1": 0.5,
55
+ "token_accuracy": 0.4,
56
+ "exact_sequence_match": 0.1
57
+ }
58
+ },
59
+ "total_reward_range": [
60
+ 0.0,
61
+ 2.0
62
+ ]
63
+ }
64
+ }
tasks/finben_finer_ord_ner_v0/README.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FinBen FINER-ORD NER Task (v0)
2
+
3
+ Task module for token-level NER tagging (BIO format) on `finben_finer_ord_v0`.
4
+
5
+ ## Task ID
6
+ `TA_NER_FINER_ORD_FINBEN_v0`
7
+
8
+ ## Dataset module
9
+ - Dataset ID: `finben_finer_ord_v0`
10
+ - Train: `data/finer_ord/processed/finben_finer_ord_train.jsonl`
11
+ - Test: `data/finer_ord/processed/finben_finer_ord_test.jsonl`
12
+
13
+ ## Labels
14
+ - `O`
15
+ - `B-PER`, `I-PER`
16
+ - `B-LOC`, `I-LOC`
17
+ - `B-ORG`, `I-ORG`
18
+
19
+ ## Output schema (strict)
20
+ Return ONLY:
21
+ ```json
22
+ {"tags": ["O", "B-ORG", "I-ORG"]}
23
+ ```
24
+
25
+ Rules:
26
+ - Exactly one key: `tags`
27
+ - `tags` must be a JSON array of strings
28
+ - Length must match number of input tokens
29
+ - Every tag must be one of the allowed BIO labels
30
+ - No extra keys
31
+ - No extra text
32
+
33
+ <!-- REWARD_SECTION_START -->
34
+ ## Reward function (shaped, v1)
35
+
36
+ This task uses a **strict-format + shaped-correctness** reward.
37
+
38
+ ### Total reward
39
+ `total_reward = format_reward + correctness_reward_industry`
40
+
41
+ - `format_reward` ∈ {0, 1}
42
+ - 1 only if output is valid JSON with exactly one key (`"tags"`), all tags valid, and length matches input tokens
43
+ - `correctness_reward_industry` ∈ [0, 1]
44
+ - `0.50 * entity_span_f1`
45
+ - `0.40 * token_accuracy`
46
+ - `0.10 * exact_sequence_match`
47
+
48
+ So the total reward is in **[0, 2]**.
49
+
50
+ This design is stricter than free-form outputs but more informative than all-or-nothing correctness, and is better suited to RL/GRPO-style optimization.
51
+ <!-- REWARD_SECTION_END -->
52
+
tasks/finben_finer_ord_ner_v0/requests/test_requests.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
tasks/finben_finer_ord_ner_v0/requests/train_requests.jsonl ADDED
The diff for this file is too large to render. See raw diff