Matej Klemen commited on
Commit
7513b19
1 Parent(s): f74a75b

Fix punctuation marks occasionally getting skipped

Browse files
Files changed (2) hide show
  1. dataset_infos.json +1 -1
  2. gkomet.py +2 -2
dataset_infos.json CHANGED
@@ -1 +1 @@
1
- {"default": {"description": "G-KOMET 1.0 (a corpus of metaphorical expressions in spoken Slovene language) is a corpus of speech transcriptions and \nconversations that covers 50,000 lexical units. The corpus contains samples from the Gos corpus of spoken Slovene \nand includes a balanced set of transcriptions of informative, educational, entertaining, private, and public discourse.\n\nThe annotation scheme was based on the MIPVU metaphor identification process. \nThis protocol was modified and adapted to the specifics of the Slovene language and the specifics of the spoken \nlanguage. Corpus was annotated for the following relations to metaphor: indirect metaphor, direct metaphor, borderline \ncases and metaphor signals. In addition, the corpus introduces a new \u2018frame\u2019 tag, which gives information about the \nconcept to which it refers. \n", "citation": "@InProceedings{antloga2022gkomet,\ntitle = {Korpusni pristopi za identifikacijo metafore in metonimije: primer metonimije v korpusu gKOMET},\nauthor={Antloga, \u000b{S}pela},\nbooktitle={Proceedings of the Conference on Language Technologies and Digital Humanities (Student papers)},\nyear={2022},\npages={271-277}\n}\n", "homepage": "http://hdl.handle.net/11356/1490", "license": "Creative Commons - Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)", "features": {"document_name": {"dtype": "string", "id": null, "_type": "Value"}, "idx": {"dtype": "uint32", "id": null, "_type": "Value"}, "idx_paragraph": {"dtype": "uint32", "id": null, "_type": "Value"}, "idx_sentence": {"dtype": "uint32", "id": null, "_type": "Value"}, "sentence_words": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "met_type": [{"type": {"dtype": "string", "id": null, "_type": "Value"}, "word_indices": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}], "met_frame": [{"type": {"dtype": "string", "id": null, "_type": "Value"}, "word_indices": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}]}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "g_komet", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 733608, "num_examples": 5695, "dataset_name": "g_komet"}}, "download_checksums": {"https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1490/G-Komet.zip": {"num_bytes": 1005891, "checksum": "29fffdaf085b889926eedcd9673f2129513b4578f41ba9bf7c632fe50cd45a8f"}}, "download_size": 1005891, "post_processing_size": null, "dataset_size": 733608, "size_in_bytes": 1739499}}
 
1
+ {"default": {"description": "G-KOMET 1.0 (a corpus of metaphorical expressions in spoken Slovene language) is a corpus of speech transcriptions and \nconversations that covers 50,000 lexical units. The corpus contains samples from the Gos corpus of spoken Slovene \nand includes a balanced set of transcriptions of informative, educational, entertaining, private, and public discourse.\n\nThe annotation scheme was based on the MIPVU metaphor identification process. \nThis protocol was modified and adapted to the specifics of the Slovene language and the specifics of the spoken \nlanguage. Corpus was annotated for the following relations to metaphor: indirect metaphor, direct metaphor, borderline \ncases and metaphor signals. In addition, the corpus introduces a new \u2018frame\u2019 tag, which gives information about the \nconcept to which it refers. \n", "citation": "@InProceedings{antloga2022gkomet,\ntitle = {Korpusni pristopi za identifikacijo metafore in metonimije: primer metonimije v korpusu gKOMET},\nauthor={Antloga, \u000b{S}pela},\nbooktitle={Proceedings of the Conference on Language Technologies and Digital Humanities (Student papers)},\nyear={2022},\npages={271-277}\n}\n", "homepage": "http://hdl.handle.net/11356/1490", "license": "Creative Commons - Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)", "features": {"document_name": {"dtype": "string", "id": null, "_type": "Value"}, "idx": {"dtype": "uint32", "id": null, "_type": "Value"}, "idx_paragraph": {"dtype": "uint32", "id": null, "_type": "Value"}, "idx_sentence": {"dtype": "uint32", "id": null, "_type": "Value"}, "sentence_words": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "met_type": [{"type": {"dtype": "string", "id": null, "_type": "Value"}, "word_indices": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}], "met_frame": [{"type": {"dtype": "string", "id": null, "_type": "Value"}, "word_indices": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}]}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "gkomet", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 736441, "num_examples": 5695, "dataset_name": "gkomet"}}, "download_checksums": {"https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1490/G-Komet.zip": {"num_bytes": 1005891, "checksum": "29fffdaf085b889926eedcd9673f2129513b4578f41ba9bf7c632fe50cd45a8f"}}, "download_size": 1005891, "post_processing_size": null, "dataset_size": 736441, "size_in_bytes": 1742332}}
gkomet.py CHANGED
@@ -62,7 +62,7 @@ def word_info(sent_el):
62
  elif element.tag.endswith("seg"):
63
  parsed_data = []
64
  for child in element:
65
- if child.tag.endswith(("c", "vocal", "pause")): # empty space betw. words or "special" word
66
  continue
67
 
68
  res = _resolve_recursively(child)
@@ -107,7 +107,7 @@ def seg_info(sent_el):
107
  deeper_elements = []
108
  latest_element = []
109
  for child in element:
110
- if child.tag.endswith(("c", "vocal", "pause")): # empty space betw. words or "special" word
111
  continue
112
 
113
  res = _resolve_recursively(child)
 
62
  elif element.tag.endswith("seg"):
63
  parsed_data = []
64
  for child in element:
65
+ if child.tag.endswith(("c", "vocal", "pause")) and not child.tag.endswith("pc"): # empty space betw. words or "special" word
66
  continue
67
 
68
  res = _resolve_recursively(child)
 
107
  deeper_elements = []
108
  latest_element = []
109
  for child in element:
110
+ if child.tag.endswith(("c", "vocal", "pause")) and not child.tag.endswith("pc"): # empty space betw. words or "special" word
111
  continue
112
 
113
  res = _resolve_recursively(child)