Datasets:

Languages:
Hebrew
ArXiv:
Libraries:
Datasets
pandas
License:
GiliGold commited on
Commit
44d0be1
1 Parent(s): ca2300a

Upload knessetCorpus.py

Browse files
Files changed (1) hide show
  1. knessetCorpus.py +93 -1
knessetCorpus.py CHANGED
@@ -23,7 +23,15 @@ the Person model features of the speaker and the Faction model features \
23
  of the faction of the speaker at that time.
24
  This is roughly equivalent to a join between all models in dataset (Protocol, Faction, Person, Sentence)
25
  """
 
 
 
 
 
 
 
26
 
 
27
  _CommitteeAllFeaturesSentences_DESCRIPTION = """\
28
  CommitteeAllFeaturesSentences consists of samples of all the sentences in the committee sessions in the corpus together with all the features available in the dataset:\
29
  The features are consistent with the Sentence model features, the Protocol model features of the protocol the sentence belongs to,
@@ -32,6 +40,18 @@ of the faction of the speaker at that time.
32
  This is roughly equivalent to a join between all models in dataset (Protocol, Faction, Person, Sentence)
33
  """
34
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  _PlenaryAllFeaturesSentences_DESCRIPTION = """\
36
  PlenaryAllFeaturesSentences consists of samples of all the sentences in the plenary sessions in the corpus together with all the features available in the dataset:\
37
  The features are consistent with the Sentence model features, the Protocol model features of the protocol the sentence belongs to,
@@ -40,6 +60,16 @@ of the faction of the speaker at that time.
40
  This is roughly equivalent to a join between all models in dataset (Protocol, Faction, Person, Sentence)
41
  """
42
 
 
 
 
 
 
 
 
 
 
 
43
  _KnessetMembers_DESCRIPTION = """\
44
  KnessetMembers consists of samples of the knesset members in the dataset and their meta-data information such as name, gender and factions affiliations.
45
  The features are consistent with the Person model features
@@ -109,6 +139,27 @@ class KnessetCorpus(datasets.GeneratorBasedBuilder):
109
  data_urls=["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/committee_full_sentences.jsonl.bz2","https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/plenary_full_sentences.jsonl.bz2"],
110
  citation=_KnessetCorpus_CITATION,
111
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  KnessetCorpusConfig(
113
  name="committees_all_features_sentences",
114
  description=_AllFeaturesSentences_DESCRIPTION,
@@ -116,11 +167,52 @@ class KnessetCorpus(datasets.GeneratorBasedBuilder):
116
  data_urls=["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/committee_full_sentences.jsonl.bz2"],
117
  citation=_KnessetCorpus_CITATION,
118
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  KnessetCorpusConfig(
120
  name="plenary_all_features_sentences",
121
  description=_AllFeaturesSentences_DESCRIPTION,
122
  features=[ "_id", "knesset_number", "protocol_name", "protocol_number", "protocol_type", "session_name", "parent_session_name", "@timestamp", "protocol_date", "is_ocr_output", "sentence_id", "speaker_id", "speaker_name", "is_valid_speaker", "is_chairman", "turn_num_in_protocol", "sent_num_in_turn", "sentence_text", "morphological_fields", "factuality_fields", "speaker_first_name", "speaker_last_name", "speaker_is_knesset_member", "speaker_gender", "speaker_email", "speaker_last_updated_date", "speaker_date_of_birth", "speaker_place_of_birth","speaker_year_of_aliya", "speaker_date_of_death", "speaker_mother_tongue", "speaker_religion", "speaker_nationality", "speaker_religious_orientation", "speaker_residence", "speaker_factions_memberships", "speaker_languages", "speaker_sources", "speaker_notes","faction_id", "faction_general_name", "knesset_faction_id", "current_faction_name", "faction_popular_initials", "faction_active_periods", "faction_knesset_numbers","faction_coalition_or_opposition_memberships", "faction_political_orientation", "faction_other_names", "faction_notes", "faction_wiki_link"],
123
- data_urls=["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/plenary_full_sentences.jsonl.bz2"],
124
  citation=_KnessetCorpus_CITATION,
125
  )]
126
 
 
23
  of the faction of the speaker at that time.
24
  This is roughly equivalent to a join between all models in dataset (Protocol, Faction, Person, Sentence)
25
  """
26
+ _NoMorphAllFeaturesSentences_DESCRIPTION = """\
27
+ AllFeaturesSentences consists of samples of all the sentences in the corpus (plenary and committee) together with all the non-morphological features available in the dataset :\
28
+ The features are consistent with the Sentence model features, the Protocol model features of the protocol the sentence belongs to,
29
+ the Person model features of the speaker and the Faction model features \
30
+ of the faction of the speaker at that time.
31
+ This is roughly equivalent to a join between all models in dataset (Protocol, Faction, Person, Sentence)
32
+ Ideal if morpho-syntactic annotations aren't relevant to your work, providing a less disk space heavy option.
33
 
34
+ """
35
  _CommitteeAllFeaturesSentences_DESCRIPTION = """\
36
  CommitteeAllFeaturesSentences consists of samples of all the sentences in the committee sessions in the corpus together with all the features available in the dataset:\
37
  The features are consistent with the Sentence model features, the Protocol model features of the protocol the sentence belongs to,
 
40
  This is roughly equivalent to a join between all models in dataset (Protocol, Faction, Person, Sentence)
41
  """
42
 
43
+ _NoMorphCommitteeAllFeaturesSentences_DESCRIPTION = """\
44
+ AllFeaturesSentences consists of samples of all the sentences in the committee sessions in the corpus together with all the non-morphological features available in the dataset :\
45
+ The features are consistent with the Sentence model features, the Protocol model features of the protocol the sentence belongs to,
46
+ the Person model features of the speaker and the Faction model features \
47
+ of the faction of the speaker at that time.
48
+ This is roughly equivalent to a join between all models in dataset (Protocol, Faction, Person, Sentence)
49
+ Ideal if morpho-syntactic annotations aren't relevant to your work, providing a less disk space heavy option.
50
+
51
+ """
52
+
53
+
54
+
55
  _PlenaryAllFeaturesSentences_DESCRIPTION = """\
56
  PlenaryAllFeaturesSentences consists of samples of all the sentences in the plenary sessions in the corpus together with all the features available in the dataset:\
57
  The features are consistent with the Sentence model features, the Protocol model features of the protocol the sentence belongs to,
 
60
  This is roughly equivalent to a join between all models in dataset (Protocol, Faction, Person, Sentence)
61
  """
62
 
63
+ _NoMorphPlenaryAllFeaturesSentences_DESCRIPTION = """\
64
+ AllFeaturesSentences consists of samples of all the sentences in the plenary sessions in the corpus together with all the non-morphological features available in the dataset :\
65
+ The features are consistent with the Sentence model features, the Protocol model features of the protocol the sentence belongs to,
66
+ the Person model features of the speaker and the Faction model features \
67
+ of the faction of the speaker at that time.
68
+ This is roughly equivalent to a join between all models in dataset (Protocol, Faction, Person, Sentence)
69
+ Ideal if morpho-syntactic annotations aren't relevant to your work, providing a less disk space heavy option.
70
+
71
+ """
72
+
73
  _KnessetMembers_DESCRIPTION = """\
74
  KnessetMembers consists of samples of the knesset members in the dataset and their meta-data information such as name, gender and factions affiliations.
75
  The features are consistent with the Person model features
 
139
  data_urls=["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/committee_full_sentences.jsonl.bz2","https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/plenary_full_sentences.jsonl.bz2"],
140
  citation=_KnessetCorpus_CITATION,
141
  ),
142
+ KnessetCorpusConfig(
143
+ name="no_morph_all_features_sentences",
144
+ description=_NoMorphAllFeaturesSentences_DESCRIPTION,
145
+ features=["_id", "knesset_number", "protocol_name", "protocol_number", "protocol_type", "session_name",
146
+ "parent_session_name", "@timestamp", "protocol_date", "is_ocr_output", "sentence_id",
147
+ "speaker_id", "speaker_name", "is_valid_speaker", "is_chairman", "turn_num_in_protocol",
148
+ "sent_num_in_turn", "sentence_text", "factuality_fields",
149
+ "speaker_first_name", "speaker_last_name", "speaker_is_knesset_member", "speaker_gender",
150
+ "speaker_email", "speaker_last_updated_date", "speaker_date_of_birth", "speaker_place_of_birth",
151
+ "speaker_year_of_aliya", "speaker_date_of_death", "speaker_mother_tongue", "speaker_religion",
152
+ "speaker_nationality", "speaker_religious_orientation", "speaker_residence",
153
+ "speaker_factions_memberships", "speaker_languages", "speaker_sources", "speaker_notes",
154
+ "faction_id", "faction_general_name", "knesset_faction_id", "current_faction_name",
155
+ "faction_popular_initials", "faction_active_periods", "faction_knesset_numbers",
156
+ "faction_coalition_or_opposition_memberships", "faction_political_orientation",
157
+ "faction_other_names", "faction_notes", "faction_wiki_link"],
158
+ data_urls=[
159
+ "https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/no_morph_committee_full_sentences.jsonl.bz2",
160
+ "https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/no_morph_plenary_full_sentences.jsonl.bz2"],
161
+ citation=_KnessetCorpus_CITATION,
162
+ ),
163
  KnessetCorpusConfig(
164
  name="committees_all_features_sentences",
165
  description=_AllFeaturesSentences_DESCRIPTION,
 
167
  data_urls=["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/committee_full_sentences.jsonl.bz2"],
168
  citation=_KnessetCorpus_CITATION,
169
  ),
170
+ KnessetCorpusConfig(
171
+ name="no_morph_committee_all_features_sentences",
172
+ description=_NoMorphCommitteeAllFeaturesSentences_DESCRIPTION,
173
+ features=["_id", "knesset_number", "protocol_name", "protocol_number", "protocol_type", "session_name",
174
+ "parent_session_name", "@timestamp", "protocol_date", "is_ocr_output", "sentence_id",
175
+ "speaker_id", "speaker_name", "is_valid_speaker", "is_chairman", "turn_num_in_protocol",
176
+ "sent_num_in_turn", "sentence_text", "factuality_fields",
177
+ "speaker_first_name", "speaker_last_name", "speaker_is_knesset_member", "speaker_gender",
178
+ "speaker_email", "speaker_last_updated_date", "speaker_date_of_birth", "speaker_place_of_birth",
179
+ "speaker_year_of_aliya", "speaker_date_of_death", "speaker_mother_tongue", "speaker_religion",
180
+ "speaker_nationality", "speaker_religious_orientation", "speaker_residence",
181
+ "speaker_factions_memberships", "speaker_languages", "speaker_sources", "speaker_notes",
182
+ "faction_id", "faction_general_name", "knesset_faction_id", "current_faction_name",
183
+ "faction_popular_initials", "faction_active_periods", "faction_knesset_numbers",
184
+ "faction_coalition_or_opposition_memberships", "faction_political_orientation",
185
+ "faction_other_names", "faction_notes", "faction_wiki_link"],
186
+ data_urls=[
187
+ "https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/no_morph_committee_full_sentences.jsonl.bz2",
188
+ "https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/no_morph_plenary_full_sentences.jsonl.bz2"],
189
+ citation=_KnessetCorpus_CITATION,
190
+ ),
191
+ KnessetCorpusConfig(
192
+ name="no_morph_plenary_all_features_sentences",
193
+ description=_NoMorphPlenaryAllFeaturesSentences_DESCRIPTION,
194
+ features=["_id", "knesset_number", "protocol_name", "protocol_number", "protocol_type", "session_name",
195
+ "parent_session_name", "@timestamp", "protocol_date", "is_ocr_output", "sentence_id",
196
+ "speaker_id", "speaker_name", "is_valid_speaker", "is_chairman", "turn_num_in_protocol",
197
+ "sent_num_in_turn", "sentence_text", "factuality_fields",
198
+ "speaker_first_name", "speaker_last_name", "speaker_is_knesset_member", "speaker_gender",
199
+ "speaker_email", "speaker_last_updated_date", "speaker_date_of_birth", "speaker_place_of_birth",
200
+ "speaker_year_of_aliya", "speaker_date_of_death", "speaker_mother_tongue", "speaker_religion",
201
+ "speaker_nationality", "speaker_religious_orientation", "speaker_residence",
202
+ "speaker_factions_memberships", "speaker_languages", "speaker_sources", "speaker_notes",
203
+ "faction_id", "faction_general_name", "knesset_faction_id", "current_faction_name",
204
+ "faction_popular_initials", "faction_active_periods", "faction_knesset_numbers",
205
+ "faction_coalition_or_opposition_memberships", "faction_political_orientation",
206
+ "faction_other_names", "faction_notes", "faction_wiki_link"],
207
+ data_urls=[
208
+ "https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/no_morph_plenary_full_sentences.jsonl.bz2"],
209
+ citation=_KnessetCorpus_CITATION,
210
+ ),
211
  KnessetCorpusConfig(
212
  name="plenary_all_features_sentences",
213
  description=_AllFeaturesSentences_DESCRIPTION,
214
  features=[ "_id", "knesset_number", "protocol_name", "protocol_number", "protocol_type", "session_name", "parent_session_name", "@timestamp", "protocol_date", "is_ocr_output", "sentence_id", "speaker_id", "speaker_name", "is_valid_speaker", "is_chairman", "turn_num_in_protocol", "sent_num_in_turn", "sentence_text", "morphological_fields", "factuality_fields", "speaker_first_name", "speaker_last_name", "speaker_is_knesset_member", "speaker_gender", "speaker_email", "speaker_last_updated_date", "speaker_date_of_birth", "speaker_place_of_birth","speaker_year_of_aliya", "speaker_date_of_death", "speaker_mother_tongue", "speaker_religion", "speaker_nationality", "speaker_religious_orientation", "speaker_residence", "speaker_factions_memberships", "speaker_languages", "speaker_sources", "speaker_notes","faction_id", "faction_general_name", "knesset_faction_id", "current_faction_name", "faction_popular_initials", "faction_active_periods", "faction_knesset_numbers","faction_coalition_or_opposition_memberships", "faction_political_orientation", "faction_other_names", "faction_notes", "faction_wiki_link"],
215
+ data_urls=[f"https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/plenary_full_sentences_shards_bzip2_files/plenary_full_sentences_shard_00.jsonl.bz2"f"data/shard_{str(i).zfill(2)}.jsonl" for i in range(27)],
216
  citation=_KnessetCorpus_CITATION,
217
  )]
218