Gaëtan Caillaut
commited on
Commit
·
9362a18
1
Parent(s):
fcf63d4
updated data
Browse files- .gitattributes +1 -0
- data/{corpus.jsonl.gz → frwiki-20220601/corpus.jsonl.gz} +2 -2
- data/{corpus_abstracts.jsonl.gz → frwiki-20220601/corpus_abstracts.jsonl.gz} +2 -2
- data/{corpus_mini.jsonl.gz → frwiki-20220601/corpus_mini.jsonl.gz} +2 -2
- data/{entities.jsonl.gz → frwiki-20220601/entities.jsonl.gz} +2 -2
- frwiki_el.py +22 -7
.gitattributes
CHANGED
@@ -39,3 +39,4 @@ data/corpus.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
|
39 |
data/entities.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
40 |
data/corpus_mini.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
41 |
data/corpus_abstracts.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
|
|
|
39 |
data/entities.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
40 |
data/corpus_mini.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
41 |
data/corpus_abstracts.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
42 |
+
data/frwiki-20220601/*.jsonl.gz filter=lfs diff=lfs merge=lfs -text
|
data/{corpus.jsonl.gz → frwiki-20220601/corpus.jsonl.gz}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:694f789ff636339c86158233c5818ed0d4c8371297cd3fe0ddd0bb92eaf0098f
|
3 |
+
size 2815590581
|
data/{corpus_abstracts.jsonl.gz → frwiki-20220601/corpus_abstracts.jsonl.gz}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6f12a533c172b58183b24a4ea7460304f9ad4955b153e8abf89b73a476cbbf9c
|
3 |
+
size 284231891
|
data/{corpus_mini.jsonl.gz → frwiki-20220601/corpus_mini.jsonl.gz}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d25d46db621599d28d7513da6ba48a633df210e4eadd256b70ccbfc1ee2413c6
|
3 |
+
size 105519
|
data/{entities.jsonl.gz → frwiki-20220601/entities.jsonl.gz}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2c422a9db41f255a17d48f0ccc5a2c0c746e64a3a704aeb434ef20df20baf33d
|
3 |
+
size 183032054
|
frwiki_el.py
CHANGED
@@ -35,10 +35,10 @@ _HOMEPAGE = "https://github.com/GaaH/frwiki_el"
|
|
35 |
_LICENSE = "WTFPL"
|
36 |
|
37 |
_URLs = {
|
38 |
-
"frwiki": "data/corpus.jsonl.gz",
|
39 |
-
"frwiki-mini": "data/corpus_mini.jsonl.gz",
|
40 |
-
"frwiki-abstracts": "data/corpus_abstracts.jsonl.gz",
|
41 |
-
"entities": "data/entities.jsonl.gz",
|
42 |
}
|
43 |
|
44 |
_NER_CLASS_LABELS = [
|
@@ -139,15 +139,30 @@ class FrwikiElDataset(datasets.GeneratorBasedBuilder):
|
|
139 |
|
140 |
def _info(self):
|
141 |
if self.config.name in ("frwiki", 'frwiki-mini', 'frwiki-abstracts'):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
features = datasets.Features({
|
143 |
"name": datasets.Value("string"),
|
144 |
"wikidata_id": datasets.Value("string"),
|
145 |
"wikipedia_id": datasets.Value("string"),
|
146 |
"wikipedia_url": datasets.Value("string"),
|
147 |
"wikidata_url": datasets.Value("string"),
|
148 |
-
"
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
151 |
})
|
152 |
elif self.config.name == "entities":
|
153 |
features = datasets.Features({
|
|
|
35 |
_LICENSE = "WTFPL"
|
36 |
|
37 |
_URLs = {
|
38 |
+
"frwiki": "data/frwiki-20220601/corpus.jsonl.gz",
|
39 |
+
"frwiki-mini": "data/frwiki-20220601/corpus_mini.jsonl.gz",
|
40 |
+
"frwiki-abstracts": "data/frwiki-20220601/corpus_abstracts.jsonl.gz",
|
41 |
+
"entities": "data/frwiki-20220601/entities.jsonl.gz",
|
42 |
}
|
43 |
|
44 |
_NER_CLASS_LABELS = [
|
|
|
139 |
|
140 |
def _info(self):
|
141 |
if self.config.name in ("frwiki", 'frwiki-mini', 'frwiki-abstracts'):
|
142 |
+
# features = datasets.Features({
|
143 |
+
# "name": datasets.Value("string"),
|
144 |
+
# "wikidata_id": datasets.Value("string"),
|
145 |
+
# "wikipedia_id": datasets.Value("string"),
|
146 |
+
# "wikipedia_url": datasets.Value("string"),
|
147 |
+
# "wikidata_url": datasets.Value("string"),
|
148 |
+
# "words": [datasets.Value("string")],
|
149 |
+
# "ner": [datasets.ClassLabel(names=_NER_CLASS_LABELS)],
|
150 |
+
# "el": [datasets.Value("string")],
|
151 |
+
# })
|
152 |
features = datasets.Features({
|
153 |
"name": datasets.Value("string"),
|
154 |
"wikidata_id": datasets.Value("string"),
|
155 |
"wikipedia_id": datasets.Value("string"),
|
156 |
"wikipedia_url": datasets.Value("string"),
|
157 |
"wikidata_url": datasets.Value("string"),
|
158 |
+
"sentences": [{
|
159 |
+
"words": [datasets.Value("string")],
|
160 |
+
"ner": [datasets.ClassLabel(names=_NER_CLASS_LABELS)],
|
161 |
+
"mention_mappings": [[datasets.Value("int16")]],
|
162 |
+
"el_wikidata_id": [datasets.Value("string")],
|
163 |
+
"el_wikipedia_id": [datasets.Value("string")],
|
164 |
+
"el_wikipedia_title": [datasets.Value("string")],
|
165 |
+
}]
|
166 |
})
|
167 |
elif self.config.name == "entities":
|
168 |
features = datasets.Features({
|