Datasets:
cjvt
/

License:
Matej Klemen commited on
Commit
0a70ad6
·
1 Parent(s): 230417b

Add coarse POS tag info

Browse files
Files changed (2) hide show
  1. dataset_infos.json +1 -1
  2. sloleks.py +5 -1
dataset_infos.json CHANGED
@@ -1 +1 @@
1
- {"default": {"description": "Sloleks is a reference morphological lexicon of Slovene that was developed to be used in various NLP applications and language manuals. \\ \nIt contains Slovene lemmas, their inflected or derivative word forms and the corresponding grammatical description. In addition to the approx. 100,000 entries already available in Sloleks 2.0, Sloleks 3.0 contains an additional cca. 265,000 newly generated entries from the most frequent lemmas in Gigafida 2.0 not yet included in previous versions of Sloleks. For verbs, adjectives, adverbs, and common nouns, the lemmas were checked manually by three annotators and \\ \nincluded in Sloleks only if confirmed as legitimate by at least one annotator. No manual checking was performed on proper nouns.\n", "citation": "@misc{sloleks3,\n title = {Morphological lexicon Sloleks 3.0},\n author = {{\u000b C}ibej, Jaka and Gantar, Kaja and Dobrovoljc, Kaja and Krek, Simon and Holozan, Peter and Erjavec, Toma{\u000b z} and Romih, Miro and Arhar Holdt, {\u000b S}pela and Krsnik, Luka and Robnik-{\u000b S}ikonja, Marko},\n url = {http://hdl.handle.net/11356/1745},\n note = {Slovenian language resource repository {CLARIN}.{SI}},\n copyright = {Creative Commons - Attribution-{ShareAlike} 4.0 International ({CC} {BY}-{SA} 4.0)},\n year = {2022}\n}\n", "homepage": "https://viri.cjvt.si/sloleks/eng/", "license": "Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)", "features": {"headword_lemma": {"dtype": "string", "id": null, "_type": "Value"}, "lex_unit": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "form": {"dtype": "string", "id": null, "_type": "Value"}, "key": {"dtype": "string", "id": null, "_type": "Value"}, "type": {"dtype": "string", "id": null, "_type": "Value"}}, "word_forms": [{"forms": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "msd": {"dtype": "string", "id": null, "_type": "Value"}}], "is_manually_checked": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sloleks", "config_name": "default", "version": {"version_str": "3.0.0", "description": null, "major": 3, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 256715097, "num_examples": 365340, "dataset_name": "sloleks"}}, "download_checksums": {"https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1745/Sloleks.3.0.zip": {"num_bytes": 251391521, "checksum": "61ff30639daca968f92b262d5c33d6c6e62f0909b037228478b25c1bd7862151"}}, "download_size": 251391521, "post_processing_size": null, "dataset_size": 256715097, "size_in_bytes": 508106618}}
 
1
+ {"default": {"description": "Sloleks is a reference morphological lexicon of Slovene that was developed to be used in various NLP applications and language manuals. \\ \nIt contains Slovene lemmas, their inflected or derivative word forms and the corresponding grammatical description. In addition to the approx. 100,000 entries already available in Sloleks 2.0, Sloleks 3.0 contains an additional cca. 265,000 newly generated entries from the most frequent lemmas in Gigafida 2.0 not yet included in previous versions of Sloleks. For verbs, adjectives, adverbs, and common nouns, the lemmas were checked manually by three annotators and \\ \nincluded in Sloleks only if confirmed as legitimate by at least one annotator. No manual checking was performed on proper nouns.\n", "citation": "@misc{sloleks3,\n title = {Morphological lexicon Sloleks 3.0},\n author = {{\u000b C}ibej, Jaka and Gantar, Kaja and Dobrovoljc, Kaja and Krek, Simon and Holozan, Peter and Erjavec, Toma{\u000b z} and Romih, Miro and Arhar Holdt, {\u000b S}pela and Krsnik, Luka and Robnik-{\u000b S}ikonja, Marko},\n url = {http://hdl.handle.net/11356/1745},\n note = {Slovenian language resource repository {CLARIN}.{SI}},\n copyright = {Creative Commons - Attribution-{ShareAlike} 4.0 International ({CC} {BY}-{SA} 4.0)},\n year = {2022}\n}\n", "homepage": "https://viri.cjvt.si/sloleks/eng/", "license": "Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)", "features": {"headword_lemma": {"dtype": "string", "id": null, "_type": "Value"}, "pos": {"dtype": "string", "id": null, "_type": "Value"}, "lex_unit": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "form": {"dtype": "string", "id": null, "_type": "Value"}, "key": {"dtype": "string", "id": null, "_type": "Value"}, "type": {"dtype": "string", "id": null, "_type": "Value"}}, "word_forms": [{"forms": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "msd": {"dtype": "string", "id": null, "_type": "Value"}}], "is_manually_checked": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sloleks", "config_name": "default", "version": {"version_str": "3.0.0", "description": null, "major": 3, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 259898213, "num_examples": 365340, "dataset_name": "sloleks"}}, "download_checksums": {"https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1745/Sloleks.3.0.zip": {"num_bytes": 251391521, "checksum": "61ff30639daca968f92b262d5c33d6c6e62f0909b037228478b25c1bd7862151"}}, "download_size": 251391521, "post_processing_size": null, "dataset_size": 259898213, "size_in_bytes": 511289734}}
sloleks.py CHANGED
@@ -5,6 +5,8 @@ import os
5
 
6
  import datasets
7
 
 
 
8
 
9
  _CITATION = """\
10
  @misc{sloleks3,
@@ -45,6 +47,7 @@ class Sloleks(datasets.GeneratorBasedBuilder):
45
  features = datasets.Features(
46
  {
47
  "headword_lemma": datasets.Value("string"),
 
48
  "lex_unit": {
49
  "id": datasets.Value("string"),
50
  "form": datasets.Value("string"),
@@ -122,7 +125,7 @@ class Sloleks(datasets.GeneratorBasedBuilder):
122
 
123
  # POS tag (or N/A)
124
  category_tag = grammar_tag.find("category")
125
- category_str = "N/A"
126
  if category_tag is not None:
127
  category_str = category_tag.text.strip()
128
 
@@ -150,6 +153,7 @@ class Sloleks(datasets.GeneratorBasedBuilder):
150
 
151
  yield _idx_ex, {
152
  "headword_lemma": headword_lemma,
 
153
  "lex_unit": {
154
  "id": lu_id,
155
  "form": lu_text,
 
5
 
6
  import datasets
7
 
8
+ NA_STR = "N/A"
9
+
10
 
11
  _CITATION = """\
12
  @misc{sloleks3,
 
47
  features = datasets.Features(
48
  {
49
  "headword_lemma": datasets.Value("string"),
50
+ "pos": datasets.Value("string"),
51
  "lex_unit": {
52
  "id": datasets.Value("string"),
53
  "form": datasets.Value("string"),
 
125
 
126
  # POS tag (or N/A)
127
  category_tag = grammar_tag.find("category")
128
+ category_str = NA_STR
129
  if category_tag is not None:
130
  category_str = category_tag.text.strip()
131
 
 
153
 
154
  yield _idx_ex, {
155
  "headword_lemma": headword_lemma,
156
+ "pos": category_str,
157
  "lex_unit": {
158
  "id": lu_id,
159
  "form": lu_text,