saeedabc commited on
Commit
2e3d5bf
·
1 Parent(s): e0556f5

Update README

Browse files
Files changed (2) hide show
  1. README.md +56 -13
  2. wikisection.py +3 -3
README.md CHANGED
@@ -35,7 +35,7 @@ dataset_info:
35
  dtype: string
36
  - name: title
37
  dtype: string
38
- - name: sent_ids
39
  sequence: string
40
  - name: sentences
41
  sequence: string
@@ -46,26 +46,26 @@ dataset_info:
46
  class_label:
47
  names:
48
  '0': semantic-continuity
49
- '1': semantic-break
50
  splits:
51
  - name: train
52
- num_bytes: 99374519
53
  num_examples: 13679
54
  - name: validation
55
- num_bytes: 14819645
56
  num_examples: 1953
57
  - name: test
58
- num_bytes: 29405354
59
  num_examples: 3907
60
  download_size: 94042594
61
- dataset_size: 143599518
62
  - config_name: en_disease
63
  features:
64
  - name: id
65
  dtype: string
66
  - name: title
67
  dtype: string
68
- - name: sent_ids
69
  sequence: string
70
  - name: sentences
71
  sequence: string
@@ -76,18 +76,61 @@ dataset_info:
76
  class_label:
77
  names:
78
  '0': semantic-continuity
79
- '1': semantic-break
80
  splits:
81
  - name: train
82
- num_bytes: 21279366
83
  num_examples: 2513
84
  - name: validation
85
- num_bytes: 3029140
86
  num_examples: 359
87
  - name: test
88
- num_bytes: 5778276
89
  num_examples: 718
90
  download_size: 94042594
91
- dataset_size: 30086782
92
  ---
93
- # Dataset Card for WikiSection (en_city, en_disease) Dataset
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  dtype: string
36
  - name: title
37
  dtype: string
38
+ - name: ids
39
  sequence: string
40
  - name: sentences
41
  sequence: string
 
46
  class_label:
47
  names:
48
  '0': semantic-continuity
49
+ '1': semantic-shift
50
  splits:
51
  - name: train
52
+ num_bytes: 105236889
53
  num_examples: 13679
54
  - name: validation
55
+ num_bytes: 15693016
56
  num_examples: 1953
57
  - name: test
58
+ num_bytes: 31140798
59
  num_examples: 3907
60
  download_size: 94042594
61
+ dataset_size: 152070703
62
  - config_name: en_disease
63
  features:
64
  - name: id
65
  dtype: string
66
  - name: title
67
  dtype: string
68
+ - name: ids
69
  sequence: string
70
  - name: sentences
71
  sequence: string
 
76
  class_label:
77
  names:
78
  '0': semantic-continuity
79
+ '1': semantic-shift
80
  splits:
81
  - name: train
82
+ num_bytes: 22409988
83
  num_examples: 2513
84
  - name: validation
85
+ num_bytes: 3190201
86
  num_examples: 359
87
  - name: test
88
+ num_bytes: 6088470
89
  num_examples: 718
90
  download_size: 94042594
91
+ dataset_size: 31688659
92
  ---
93
+ # Dataset Card for WikiSection (en_city, en_disease) Dataset
94
+
95
+ The WikiSection dataset is a collection of segmented Wikipedia articles related to cities and diseases, structured in this repository for a sentence-level document segmentation task.
96
+
97
+ ## Dataset Overview
98
+
99
+ WikiSection contains two English subsets:
100
+ - **en_city**: 19.5k Wikipedia articles about cities and city-related topics.
101
+ - **en_disease**: 3.6k articles on diseases and health-related scientific information.
102
+
103
+ Each subset provides segmented articles, where the task is to classify sentence boundaries as either "semantic-continuity" or "semantic-shift."
104
+
105
+ ## Features
106
+
107
+ The dataset provides the following features:
108
+
109
+ - **id**: `string` - A unique identifier for each document.
110
+ - **title**: `string` - The title of the document.
111
+ - **ids**: `list[string]` - The sentence ids within the document
112
+ - **sentences**: `list[string]` - The sentences within the document.
113
+ - **titles_mask**: `list[uint8]` - A binary mask to indicate which sentences are titles.
114
+ - **labels**: `list[int]` - Binary labels for each sentence, where `0` represents "semantic-continuity" and `1` represents "semantic-shift."
115
+
116
+ ## Usage
117
+
118
+ The dataset can be easily loaded using the HuggingFace `datasets` library:
119
+
120
+ ```python
121
+ from datasets import load_dataset
122
+
123
+ # en_city
124
+ titled_en_city = load_dataset('saeedabc/wikisection', 'en_city', trust_remote_code=True)
125
+
126
+ untitled_en_city = load_dataset('saeedabc/wikisection', 'en_city', drop_titles=True, trust_remote_code=True)
127
+
128
+ # en_disease
129
+ titled_en_disease = load_dataset('saeedabc/wikisection', 'en_disease', trust_remote_code=True)
130
+
131
+ untitled_en_disease = load_dataset('saeedabc/wikisection', 'en_disease', drop_titles=True, trust_remote_code=True)
132
+ ```
133
+
134
+ ## Dataset Details
135
+
136
+ - **Homepage**: [WikiSection on GitHub](https://github.com/sebastianarnold/WikiSection)
wikisection.py CHANGED
@@ -18,8 +18,8 @@ See https://github.com/sebastianarnold/WikiSection for more information.
18
 
19
  Usage:
20
  >>> from datasets import load_dataset
21
- >>> dataset = load_dataset('saeedabc/wikisection', 'en_city', trust_remote_code=True, num_proc=8)
22
- >>> dataset = load_dataset('saeedabc/wikisection', 'en_disease', trust_remote_code=True, num_proc=8)
23
  """
24
 
25
 
@@ -120,7 +120,7 @@ class WikiSection(datasets.GeneratorBasedBuilder):
120
  datasets.Value("uint8")
121
  ),
122
  "labels": datasets.Sequence(
123
- datasets.ClassLabel(num_classes=2, names=['semantic-continuity', 'semantic-break'])
124
  ),
125
  }
126
  )
 
18
 
19
  Usage:
20
  >>> from datasets import load_dataset
21
+ >>> dataset = load_dataset('saeedabc/wikisection', 'en_city', trust_remote_code=True)
22
+ >>> dataset = load_dataset('saeedabc/wikisection', 'en_disease', trust_remote_code=True)
23
  """
24
 
25
 
 
120
  datasets.Value("uint8")
121
  ),
122
  "labels": datasets.Sequence(
123
+ datasets.ClassLabel(num_classes=2, names=['semantic-continuity', 'semantic-shift'])
124
  ),
125
  }
126
  )