Datasets:
Martyna Wiącek
commited on
Commit
•
d81c5c3
1
Parent(s):
10970e3
add changes to dataset creation - add original sent id
Browse files- nlprepl.py +2 -0
nlprepl.py
CHANGED
@@ -131,6 +131,7 @@ class NLPrePL(datasets.GeneratorBasedBuilder):
|
|
131 |
{
|
132 |
"sent_id": datasets.Value("string"),
|
133 |
"text": datasets.Value("string"),
|
|
|
134 |
"id": datasets.Value("string"),
|
135 |
"tokens": datasets.Sequence(datasets.Value("string")),
|
136 |
"lemmas": datasets.Sequence(datasets.Value("string")),
|
@@ -195,6 +196,7 @@ class NLPrePL(datasets.GeneratorBasedBuilder):
|
|
195 |
yield id, {
|
196 |
"sent_id": str(idx),
|
197 |
"text": txt,
|
|
|
198 |
"id": [token["id"] for token in sent],
|
199 |
"tokens": [token["form"] for token in sent],
|
200 |
"lemmas": [token["lemma"] for token in sent],
|
|
|
131 |
{
|
132 |
"sent_id": datasets.Value("string"),
|
133 |
"text": datasets.Value("string"),
|
134 |
+
"orig_file_sentence": datasets.Value("string"),
|
135 |
"id": datasets.Value("string"),
|
136 |
"tokens": datasets.Sequence(datasets.Value("string")),
|
137 |
"lemmas": datasets.Sequence(datasets.Value("string")),
|
|
|
196 |
yield id, {
|
197 |
"sent_id": str(idx),
|
198 |
"text": txt,
|
199 |
+
"orig_file_sentence": sent.metadata["orig_file_sentence"],
|
200 |
"id": [token["id"] for token in sent],
|
201 |
"tokens": [token["form"] for token in sent],
|
202 |
"lemmas": [token["lemma"] for token in sent],
|