Datasets:
cjvt
/

matejklemen commited on
Commit
d70b510
1 Parent(s): 9bbe4fa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -40
README.md CHANGED
@@ -39,37 +39,9 @@ document available at https://www.clarin.si/repository/xmlui/bitstream/handle/11
39
 
40
  \(*) pronounce "š" as "sh" in "shoe".
41
 
42
- The dataset is provided at sentence-level (125867 instances): each instance contains a source (the original) and a target (the corrected) sentence. Note that either the source or the target sentence in an instance may be missing - this usually happens when a source sentence is marked as redundant or when a new sentence is added by the teacher.
43
- To convert the dataset into document-level (5485 instances), group the data by `id_doc`.
44
- ```python3
45
- import itertools
46
- from datasets import load_dataset, Dataset, DatasetDict
47
- import pandas as pd
48
-
49
- data = load_dataset("cjvt/solar3")
50
-
51
- doc_df = {"id_doc": [], "doc_title": [], "is_manually_validated": [],
52
- "src_tokens": [], "tgt_tokens": [], "corrections": []}
53
- for curr_id, curr_group in data["train"].to_pandas().groupby("id_doc"):
54
- first_instance = curr_group.iloc[0]
55
-
56
- doc_df["id_doc"].append(first_instance["id_doc"])
57
- doc_df["doc_title"].append(first_instance["doc_title"])
58
- doc_df["is_manually_validated"].append(curr_group["is_manually_validated"].all())
59
- doc_df["src_tokens"].append(
60
- list(itertools.chain(*[curr_tokens.tolist() for curr_tokens in curr_group["src_tokens"].values]))
61
- )
62
- doc_df["tgt_tokens"].append(
63
- list(itertools.chain(*[curr_tokens.tolist() for curr_tokens in curr_group["tgt_tokens"].values]))
64
- )
65
- doc_df["corrections"].append(
66
- list(itertools.chain(*[curr_corrs.tolist() for curr_corrs in curr_group["corrections"].values]))
67
- )
68
-
69
- data = DatasetDict({
70
- "train": Dataset.from_pandas(pd.DataFrame(doc_df))
71
- })
72
- ```
73
 
74
  ### Supported Tasks and Leaderboards
75
 
@@ -88,10 +60,8 @@ A sample instance from the dataset:
88
  {
89
  'id_doc': 'solar1',
90
  'doc_title': 'KUS-G-slo-1-GO-E-2009-10001',
91
- 'is_manually_validated': True,
92
- 'id_src_tokens': ['solar1s.3.1.1', 'solar1s.3.1.2', 'solar1s.3.1.3', 'solar1s.3.1.4', 'solar1s.3.1.5', 'solar1s.3.1.6', 'solar1s.3.1.7', 'solar1s.3.1.8', 'solar1s.3.1.9', 'solar1s.3.1.10', 'solar1s.3.1.11', 'solar1s.3.1.12', 'solar1s.3.1.13', 'solar1s.3.1.14', 'solar1s.3.1.15', 'solar1s.3.1.16', 'solar1s.3.1.17', 'solar1s.3.1.18', 'solar1s.3.1.19', 'solar1s.3.1.20', 'solar1s.3.1.21', 'solar1s.3.1.22', 'solar1s.3.1.23', 'solar1s.3.1.24', 'solar1s.3.1.25'],
93
  'src_tokens': ['”', 'Ne', 'da', 'sovražim', ',', 'da', 'ljubim', 'sem', 'na', 'svetu', '”', ',', 'izreče', 'Antigona', 'v', 'bran', 'kralju', 'Kreonu', 'za', 'svoje', 'nasprotno', 'mišljenje', 'pred', 'smrtjo', '.'],
94
- 'id_tgt_tokens': ['solar1t.3.1.1', 'solar1t.3.1.2', 'solar1t.3.1.3', 'solar1t.3.1.4', 'solar1t.3.1.5', 'solar1t.3.1.6', 'solar1t.3.1.7', 'solar1t.3.1.8', 'solar1t.3.1.9', 'solar1t.3.1.10', 'solar1t.3.1.11', 'solar1t.3.1.12', 'solar1t.3.1.13', 'solar1t.3.1.14', 'solar1t.3.1.15', 'solar1t.3.1.16', 'solar1t.3.1.17', 'solar1t.3.1.18', 'solar1t.3.1.19', 'solar1t.3.1.20', 'solar1t.3.1.21', 'solar1t.3.1.22', 'solar1t.3.1.23', 'solar1t.3.1.24', 'solar1t.3.1.25', 'solar1t.3.1.26'],
95
  'tgt_tokens': ['„', 'Ne', 'da', 'sovražim', ',', 'da', 'ljubim', 'sem', 'na', 'svetu', ',', '”', 'izreče', 'Antigona', 'sebi', 'v', 'bran', 'kralju', 'Kreonu', 'za', 'svoje', 'nasprotno', 'mišljenje', 'pred', 'smrtjo', '.'],
96
  'corrections': [
97
  {'idx_src': [0], 'idx_tgt': [0], 'corr_types': ['Z/LOČ/nerazvrščeno']},
@@ -111,21 +81,16 @@ The instance represents a correction in the document 'solar1' (`id_doc`), which
111
  - `id_doc`: a string containing the identifying name of the document in which the sentence appears;
112
  - `doc_title`: a string containing the assigned document title;
113
  - `is_manually_validated`: a bool indicating whether the document in which the sentence appears was reviewed by a teacher;
114
- - `id_src_tokens`: identifiers of words in the source sentence (`[]` if there is no source sentence);
115
  - `src_tokens`: words in the source sentence (`[]` if there is no source sentence);
116
- - `id_tgt_tokens`: identifiers of words in the target sentence (`[]` if there is no target sentence);
117
  - `tgt_tokens`: words in the target sentence (`[]` if there is no target sentence);
118
  - `corrections`: a list of the corrections, with each correction represented with a dictionary, containing the indices of the source tokens involved (`idx_src`), target tokens involved (`idx_tgt`), and the categories of the corrections made (`corr_types`). Please note that there can be multiple assigned categories for one annotated correction, in which case `len(corr_types) > 1`.
119
 
120
- Note: `idx_src_par`, `idx_src_sent`, `idx_tgt_par`, `idx_tgt_sent` can be used to reconstruct the order of the sentences in the document (although in the above code snippet for grouping by documents, the instances are assumed to be listed in order of appearance).
121
-
122
 
123
  ## Dataset Creation
124
 
125
  The Developmental corpus Šolar consists of 5,485 texts written by students in Slovenian secondary schools (age 15-19) and pupils in the 7th-9th grade of primary school (13-15), with a small percentage also from the 6th grade. The information on school (elementary or secondary), subject, level (grade or year), type of text, region, and date of production is provided for each text. School essays form the majority of the corpus while other material includes texts created during lessons, such as text recapitulations or descriptions, examples of formal applications, etc.
126
 
127
- Part of the corpus (1516 texts) is annotated with teachers' corrections using a system of labels described in the attached document (in Slovenian). Teacher corrections were part of the original files and reflect real classroom situations of essay marking. Corrections were then inserted into texts by annotators and subsequently categorized.
128
-
129
 
130
  ## Additional Information
131
 
 
39
 
40
  \(*) pronounce "š" as "sh" in "shoe".
41
 
42
+ By default the dataset is provided at **sentence-level** (125867 instances): each instance contains a source (the original) and a target (the corrected) sentence. Note that either the source or the target sentence in an instance may be missing - this usually happens when a source sentence is marked as redundant or when a new sentence is added by the teacher. Additionally, a source or a target sentence may appear in multiple instances - for example, this happens when one sentence gets divided into multiple sentences.
43
+
44
+ There is also an option to aggregate the instances at the **document-level** by explicitly providing the correct config: `datasets.load_dataset("cjvt/solar3", "document_level")`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  ### Supported Tasks and Leaderboards
47
 
 
60
  {
61
  'id_doc': 'solar1',
62
  'doc_title': 'KUS-G-slo-1-GO-E-2009-10001',
63
+ 'is_manually_validated': True,
 
64
  'src_tokens': ['”', 'Ne', 'da', 'sovražim', ',', 'da', 'ljubim', 'sem', 'na', 'svetu', '”', ',', 'izreče', 'Antigona', 'v', 'bran', 'kralju', 'Kreonu', 'za', 'svoje', 'nasprotno', 'mišljenje', 'pred', 'smrtjo', '.'],
 
65
  'tgt_tokens': ['„', 'Ne', 'da', 'sovražim', ',', 'da', 'ljubim', 'sem', 'na', 'svetu', ',', '”', 'izreče', 'Antigona', 'sebi', 'v', 'bran', 'kralju', 'Kreonu', 'za', 'svoje', 'nasprotno', 'mišljenje', 'pred', 'smrtjo', '.'],
66
  'corrections': [
67
  {'idx_src': [0], 'idx_tgt': [0], 'corr_types': ['Z/LOČ/nerazvrščeno']},
 
81
  - `id_doc`: a string containing the identifying name of the document in which the sentence appears;
82
  - `doc_title`: a string containing the assigned document title;
83
  - `is_manually_validated`: a bool indicating whether the document in which the sentence appears was reviewed by a teacher;
 
84
  - `src_tokens`: words in the source sentence (`[]` if there is no source sentence);
 
85
  - `tgt_tokens`: words in the target sentence (`[]` if there is no target sentence);
86
  - `corrections`: a list of the corrections, with each correction represented with a dictionary, containing the indices of the source tokens involved (`idx_src`), target tokens involved (`idx_tgt`), and the categories of the corrections made (`corr_types`). Please note that there can be multiple assigned categories for one annotated correction, in which case `len(corr_types) > 1`.
87
 
 
 
88
 
89
  ## Dataset Creation
90
 
91
  The Developmental corpus Šolar consists of 5,485 texts written by students in Slovenian secondary schools (age 15-19) and pupils in the 7th-9th grade of primary school (13-15), with a small percentage also from the 6th grade. The information on school (elementary or secondary), subject, level (grade or year), type of text, region, and date of production is provided for each text. School essays form the majority of the corpus while other material includes texts created during lessons, such as text recapitulations or descriptions, examples of formal applications, etc.
92
 
93
+ Part of the corpus (1516 texts) is annotated with teachers' corrections using a system of labels described in the attached document (in Slovenian). Teacher corrections were part of the original files and reflect real classroom situations of essay marking. Corrections were then inserted into texts by annotators and subsequently categorized. Due to the annotations being gathered in a practical (i.e. classroom) setting, only the most relevant errors may sometimes be annotated, e.g., not all incorrectly placed commas are annotated if there is a bigger issue in the text.
 
94
 
95
  ## Additional Information
96