Datasets:
Tasks:
Token Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
named-entity-recognition
Languages:
English
Size:
1K - 10K
ArXiv:
License:
Commit
·
4246c86
1
Parent(s):
fcadcc2
added gitignore
Browse files- .gitignore +1 -0
- check.ipynb +111 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
*.ipynb
|
check.ipynb
CHANGED
@@ -49,6 +49,117 @@
|
|
49 |
" print(\"lst\")"
|
50 |
]
|
51 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
{
|
53 |
"cell_type": "code",
|
54 |
"execution_count": null,
|
|
|
49 |
" print(\"lst\")"
|
50 |
]
|
51 |
},
|
52 |
+
{
|
53 |
+
"cell_type": "code",
|
54 |
+
"execution_count": 16,
|
55 |
+
"metadata": {},
|
56 |
+
"outputs": [
|
57 |
+
{
|
58 |
+
"name": "stderr",
|
59 |
+
"output_type": "stream",
|
60 |
+
"text": [
|
61 |
+
"Reusing dataset plod-cw (/home/diptesh/.cache/huggingface/datasets/surrey-nlp___plod-cw/PLOD-CW/0.0.5/ded93459451683583207c3ccb6a22ebeeafd54733e72757b6f73806d9aca6e83)\n"
|
62 |
+
]
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"data": {
|
66 |
+
"application/json": {
|
67 |
+
"ascii": false,
|
68 |
+
"bar_format": null,
|
69 |
+
"colour": null,
|
70 |
+
"elapsed": 0.010100603103637695,
|
71 |
+
"initial": 0,
|
72 |
+
"n": 0,
|
73 |
+
"ncols": null,
|
74 |
+
"nrows": null,
|
75 |
+
"postfix": null,
|
76 |
+
"prefix": "",
|
77 |
+
"rate": null,
|
78 |
+
"total": 3,
|
79 |
+
"unit": "it",
|
80 |
+
"unit_divisor": 1000,
|
81 |
+
"unit_scale": false
|
82 |
+
},
|
83 |
+
"application/vnd.jupyter.widget-view+json": {
|
84 |
+
"model_id": "1f468deeb0f34c0b8fe8bdd94301ba38",
|
85 |
+
"version_major": 2,
|
86 |
+
"version_minor": 0
|
87 |
+
},
|
88 |
+
"text/plain": [
|
89 |
+
" 0%| | 0/3 [00:00<?, ?it/s]"
|
90 |
+
]
|
91 |
+
},
|
92 |
+
"metadata": {},
|
93 |
+
"output_type": "display_data"
|
94 |
+
}
|
95 |
+
],
|
96 |
+
"source": [
|
97 |
+
"from datasets import load_dataset\n",
|
98 |
+
"dataset = load_dataset(\"surrey-nlp/PLOD-CW\")"
|
99 |
+
]
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"cell_type": "code",
|
103 |
+
"execution_count": 17,
|
104 |
+
"metadata": {},
|
105 |
+
"outputs": [
|
106 |
+
{
|
107 |
+
"name": "stdout",
|
108 |
+
"output_type": "stream",
|
109 |
+
"text": [
|
110 |
+
"1072\n",
|
111 |
+
"126\n",
|
112 |
+
"153\n"
|
113 |
+
]
|
114 |
+
}
|
115 |
+
],
|
116 |
+
"source": [
|
117 |
+
"print(len(dataset['train']))\n",
|
118 |
+
"print(len(dataset['validation']))\n",
|
119 |
+
"print(len(dataset['test']))"
|
120 |
+
]
|
121 |
+
},
|
122 |
+
{
|
123 |
+
"cell_type": "code",
|
124 |
+
"execution_count": 18,
|
125 |
+
"metadata": {},
|
126 |
+
"outputs": [
|
127 |
+
{
|
128 |
+
"name": "stdout",
|
129 |
+
"output_type": "stream",
|
130 |
+
"text": [
|
131 |
+
"15\n"
|
132 |
+
]
|
133 |
+
}
|
134 |
+
],
|
135 |
+
"source": [
|
136 |
+
"print(len(dataset['train'][0]['tokens']))"
|
137 |
+
]
|
138 |
+
},
|
139 |
+
{
|
140 |
+
"cell_type": "code",
|
141 |
+
"execution_count": 22,
|
142 |
+
"metadata": {},
|
143 |
+
"outputs": [
|
144 |
+
{
|
145 |
+
"name": "stdout",
|
146 |
+
"output_type": "stream",
|
147 |
+
"text": [
|
148 |
+
"323\n"
|
149 |
+
]
|
150 |
+
}
|
151 |
+
],
|
152 |
+
"source": [
|
153 |
+
"split='train'\n",
|
154 |
+
"maxLen = 0\n",
|
155 |
+
"for i in range(len(dataset[split])):\n",
|
156 |
+
" instanceLen = len(dataset['train'][i]['tokens'])\n",
|
157 |
+
" if instanceLen > maxLen:\n",
|
158 |
+
" maxLen = instanceLen\n",
|
159 |
+
"\n",
|
160 |
+
"print(maxLen)\n"
|
161 |
+
]
|
162 |
+
},
|
163 |
{
|
164 |
"cell_type": "code",
|
165 |
"execution_count": null,
|