imvladikon
commited on
Commit
โข
078a99d
1
Parent(s):
bfc7f8f
Update README.md
Browse files
README.md
CHANGED
@@ -5,8 +5,6 @@ language_creators:
|
|
5 |
- found
|
6 |
language:
|
7 |
- he
|
8 |
-
license:
|
9 |
-
- other
|
10 |
multilinguality:
|
11 |
- monolingual
|
12 |
size_categories:
|
@@ -29,8 +27,8 @@ train-eval-index:
|
|
29 |
tokens: tokens
|
30 |
ner_tags: tags
|
31 |
metrics:
|
32 |
-
|
33 |
-
|
34 |
---
|
35 |
|
36 |
|
@@ -38,17 +36,26 @@ train-eval-index:
|
|
38 |
|
39 |
**Disclaimer**: It's just a huggingface datasets convenient interface for research purpose which is fetching the original data from [github](https://github.com/OnlpLab/NEMO-Corpus). I'm not an author of this work.
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
```python
|
43 |
from datasets import load_dataset
|
44 |
|
45 |
# the main corpus
|
46 |
-
ds = load_dataset('imvladikon/nemo_corpus')
|
47 |
for sample in ds["train"]:
|
48 |
print(sample)
|
49 |
|
50 |
# the nested corpus
|
51 |
-
ds = load_dataset('imvladikon/nemo_corpus', "
|
52 |
```
|
53 |
|
54 |
Getting classes and encoding/decoding could be done through these functions:
|
@@ -66,11 +73,10 @@ available fields (flat):
|
|
66 |
* "tokens"
|
67 |
* "raw_tags"
|
68 |
* "ner_tags"
|
69 |
-
* "spans"
|
70 |
|
71 |
Example of the one record for `flat`:
|
72 |
```json
|
73 |
-
{'id': '0', 'tokens': ['"', 'ืชืืื', 'ื ืงืื', 'ื', 'ืืืืื', '.'], 'sentence': '" ืชืืื ื ืงืื ื ืืืืื .', 'raw_tags': ['O', 'O', 'O', 'O', 'O', 'O'], 'ner_tags': [24, 24, 24, 24, 24, 24]
|
74 |
```
|
75 |
|
76 |
Example of the one record for `nested`:
|
|
|
5 |
- found
|
6 |
language:
|
7 |
- he
|
|
|
|
|
8 |
multilinguality:
|
9 |
- monolingual
|
10 |
size_categories:
|
|
|
27 |
tokens: tokens
|
28 |
ner_tags: tags
|
29 |
metrics:
|
30 |
+
- type: seqeval
|
31 |
+
name: seqeval
|
32 |
---
|
33 |
|
34 |
|
|
|
36 |
|
37 |
**Disclaimer**: It's just a huggingface datasets convenient interface for research purpose which is fetching the original data from [github](https://github.com/OnlpLab/NEMO-Corpus). I'm not an author of this work.
|
38 |
|
39 |
+
## Config and Usage
|
40 |
+
|
41 |
+
Config:
|
42 |
+
* flat_token - flatten tags
|
43 |
+
* nested_token - nested tags
|
44 |
+
* flat_morph - flatten tags with morphologically presegmentized tokens
|
45 |
+
* nested_morph - nested tags with morphologically presegmentized tokens
|
46 |
+
|
47 |
+
Note: It seems that a couple of samples for the flat_token and nested_token are mistakenly presegmented, and as a result, these samples have white space in the token.
|
48 |
|
49 |
```python
|
50 |
from datasets import load_dataset
|
51 |
|
52 |
# the main corpus
|
53 |
+
ds = load_dataset('imvladikon/nemo_corpus', "flat_token")
|
54 |
for sample in ds["train"]:
|
55 |
print(sample)
|
56 |
|
57 |
# the nested corpus
|
58 |
+
ds = load_dataset('imvladikon/nemo_corpus', "nested_morph")
|
59 |
```
|
60 |
|
61 |
Getting classes and encoding/decoding could be done through these functions:
|
|
|
73 |
* "tokens"
|
74 |
* "raw_tags"
|
75 |
* "ner_tags"
|
|
|
76 |
|
77 |
Example of the one record for `flat`:
|
78 |
```json
|
79 |
+
{'id': '0', 'tokens': ['"', 'ืชืืื', 'ื ืงืื', 'ื', 'ืืืืื', '.'], 'sentence': '" ืชืืื ื ืงืื ื ืืืืื .', 'raw_tags': ['O', 'O', 'O', 'O', 'O', 'O'], 'ner_tags': [24, 24, 24, 24, 24, 24]}
|
80 |
```
|
81 |
|
82 |
Example of the one record for `nested`:
|