Upload erukaLabels.py
Browse files- erukaLabels.py +2 -1
erukaLabels.py
CHANGED
|
@@ -7,6 +7,7 @@ Original file is located at
|
|
| 7 |
https://colab.research.google.com/drive/1p0VRh0b-OtHjNNLIcNUPb2BaoiE9Mh7O
|
| 8 |
"""
|
| 9 |
|
|
|
|
| 10 |
|
| 11 |
# coding=utf-8
|
| 12 |
import json
|
|
@@ -120,7 +121,7 @@ class Funsd(datasets.GeneratorBasedBuilder):
|
|
| 120 |
|
| 121 |
file_path = os.path.join(ann_dir, file)
|
| 122 |
with open(file_path, "r", encoding="utf8") as f:
|
| 123 |
-
data = json.load(f)
|
| 124 |
image_path = os.path.join(img_dir, file)
|
| 125 |
|
| 126 |
# changed
|
|
|
|
| 7 |
https://colab.research.google.com/drive/1p0VRh0b-OtHjNNLIcNUPb2BaoiE9Mh7O
|
| 8 |
"""
|
| 9 |
|
| 10 |
+
!pip install -q datasets seqeval
|
| 11 |
|
| 12 |
# coding=utf-8
|
| 13 |
import json
|
|
|
|
| 121 |
|
| 122 |
file_path = os.path.join(ann_dir, file)
|
| 123 |
with open(file_path, "r", encoding="utf8") as f:
|
| 124 |
+
data = json.load(f, ensure_ascii=False)
|
| 125 |
image_path = os.path.join(img_dir, file)
|
| 126 |
|
| 127 |
# changed
|