Update CAS.py
Browse files
CAS.py
CHANGED
@@ -289,7 +289,7 @@ class CAS(datasets.GeneratorBasedBuilder):
|
|
289 |
all_res.append({
|
290 |
"id": str(doc_id),
|
291 |
"document_id": doc_id,
|
292 |
-
"tokens": tokens,
|
293 |
"lemmas": text_lemmas,
|
294 |
"pos_tags": pos_tags,
|
295 |
"is_oov": [_VOCAB.find(tt.lower()) for tt in tokens],
|
@@ -349,7 +349,7 @@ class CAS(datasets.GeneratorBasedBuilder):
|
|
349 |
all_res.append({
|
350 |
"id": key,
|
351 |
"document_id": doc_id,
|
352 |
-
"tokens": tokens,
|
353 |
"lemmas": text_lemmas,
|
354 |
"ner_tags": ner_tags,
|
355 |
"is_oov": [_VOCAB.find(tt.lower()) for tt in tokens],
|
@@ -396,7 +396,7 @@ class CAS(datasets.GeneratorBasedBuilder):
|
|
396 |
all_res[index_l] = {
|
397 |
"id": str(identifier),
|
398 |
"document_id": identifier,
|
399 |
-
"tokens": tokens,
|
400 |
"label": l,
|
401 |
}
|
402 |
|
@@ -405,7 +405,7 @@ class CAS(datasets.GeneratorBasedBuilder):
|
|
405 |
all_res.append({
|
406 |
"id": str(identifier),
|
407 |
"document_id": identifier,
|
408 |
-
"tokens": tokens,
|
409 |
"label": l,
|
410 |
})
|
411 |
|
|
|
289 |
all_res.append({
|
290 |
"id": str(doc_id),
|
291 |
"document_id": doc_id,
|
292 |
+
"tokens": [tok.lower() for tok in tokens],
|
293 |
"lemmas": text_lemmas,
|
294 |
"pos_tags": pos_tags,
|
295 |
"is_oov": [_VOCAB.find(tt.lower()) for tt in tokens],
|
|
|
349 |
all_res.append({
|
350 |
"id": key,
|
351 |
"document_id": doc_id,
|
352 |
+
"tokens": [tok.lower() for tok in tokens],
|
353 |
"lemmas": text_lemmas,
|
354 |
"ner_tags": ner_tags,
|
355 |
"is_oov": [_VOCAB.find(tt.lower()) for tt in tokens],
|
|
|
396 |
all_res[index_l] = {
|
397 |
"id": str(identifier),
|
398 |
"document_id": identifier,
|
399 |
+
"tokens": [tok.lower() for tok in tokens],
|
400 |
"label": l,
|
401 |
}
|
402 |
|
|
|
405 |
all_res.append({
|
406 |
"id": str(identifier),
|
407 |
"document_id": identifier,
|
408 |
+
"tokens": [tok.lower() for tok in tokens],
|
409 |
"label": l,
|
410 |
})
|
411 |
|