Datasets:
Matej Klemen
commited on
Commit
•
0389c7f
1
Parent(s):
432d78e
Fix issue with some default language tags being incorrectly formatted using IOB2
Browse files- README.md +2 -2
- janes_preklop.py +4 -0
README.md
CHANGED
@@ -10,10 +10,10 @@ dataset_info:
|
|
10 |
sequence: string
|
11 |
splits:
|
12 |
- name: train
|
13 |
-
num_bytes:
|
14 |
num_examples: 1104
|
15 |
download_size: 623816
|
16 |
-
dataset_size:
|
17 |
---
|
18 |
|
19 |
# Dataset Card for Janes-Preklop
|
|
|
10 |
sequence: string
|
11 |
splits:
|
12 |
- name: train
|
13 |
+
num_bytes: 410822
|
14 |
num_examples: 1104
|
15 |
download_size: 623816
|
16 |
+
dataset_size: 410822
|
17 |
---
|
18 |
|
19 |
# Dataset Card for Janes-Preklop
|
janes_preklop.py
CHANGED
@@ -81,9 +81,13 @@ def word_info(wordlike_tag, _namespace):
|
|
81 |
|
82 |
if _child_langs is None:
|
83 |
_child_langs = [codeswitch_lang for _ in range(len(_child_words))]
|
|
|
84 |
_seg_langs.extend(_child_langs)
|
85 |
|
86 |
if codeswitch_lang != DEFAULT_LANG:
|
|
|
|
|
|
|
87 |
_seg_langs[0] = f"B-{_seg_langs[0]}"
|
88 |
for _i in range(1, len(_seg_words)):
|
89 |
_seg_langs[_i] = f"I-{_seg_langs[_i]}"
|
|
|
81 |
|
82 |
if _child_langs is None:
|
83 |
_child_langs = [codeswitch_lang for _ in range(len(_child_words))]
|
84 |
+
|
85 |
_seg_langs.extend(_child_langs)
|
86 |
|
87 |
if codeswitch_lang != DEFAULT_LANG:
|
88 |
+
_seg_langs = [codeswitch_lang for _ in _seg_langs]
|
89 |
+
|
90 |
+
if _seg_langs[0] != DEFAULT_LANG:
|
91 |
_seg_langs[0] = f"B-{_seg_langs[0]}"
|
92 |
for _i in range(1, len(_seg_words)):
|
93 |
_seg_langs[_i] = f"I-{_seg_langs[_i]}"
|