Datasets:

Languages:
Hebrew
ArXiv:
Libraries:
Datasets
pandas
License:
GiliGold commited on
Commit
57cf7b1
1 Parent(s): 8c6205b

Upload knessetCorpus.py

Browse files
Files changed (1) hide show
  1. knessetCorpus.py +12 -11
knessetCorpus.py CHANGED
@@ -219,6 +219,18 @@ class KnessetCorpus(datasets.GeneratorBasedBuilder):
219
  features = {feature: datasets.Value("string") for feature in self.config.features}
220
 
221
  if "all_features_sentences" in self.config.name:
 
 
 
 
 
 
 
 
 
 
 
 
222
  features.update({
223
  "faction_active_periods": datasets.Sequence({
224
  "end_date": datasets.Value("string"), # Date converted to string
@@ -242,17 +254,6 @@ class KnessetCorpus(datasets.GeneratorBasedBuilder):
242
  "is_valid_speaker": datasets.Value("bool"),
243
  "sent_num_in_turn": datasets.Value("int64"),
244
  "turn_num_in_protocol": datasets.Value("int64"),
245
- "morphological_fields": datasets.Sequence({
246
- "id": datasets.Value("string"),
247
- "form": datasets.Value("string"),
248
- "lemma": datasets.Value("string"),
249
- "upos": datasets.Value("string"),
250
- "xpos": datasets.Value("string"),
251
- "feats": datasets.Value("string"),
252
- "head": datasets.Value("int32"),
253
- "deprel": datasets.Value("string"),
254
- "deps": datasets.Value("string"),
255
- "misc": datasets.Value("string")}),
256
  "speaker_factions_memberships": datasets.Sequence({
257
  "end_date": datasets.Value("string"),
258
  "faction_id": datasets.Value("string"),
 
219
  features = {feature: datasets.Value("string") for feature in self.config.features}
220
 
221
  if "all_features_sentences" in self.config.name:
222
+ if not "no_morph" in self.config.name:
223
+ features.update({"morphological_fields": datasets.Sequence({
224
+ "id": datasets.Value("string"),
225
+ "form": datasets.Value("string"),
226
+ "lemma": datasets.Value("string"),
227
+ "upos": datasets.Value("string"),
228
+ "xpos": datasets.Value("string"),
229
+ "feats": datasets.Value("string"),
230
+ "head": datasets.Value("int32"),
231
+ "deprel": datasets.Value("string"),
232
+ "deps": datasets.Value("string"),
233
+ "misc": datasets.Value("string")})})
234
  features.update({
235
  "faction_active_periods": datasets.Sequence({
236
  "end_date": datasets.Value("string"), # Date converted to string
 
254
  "is_valid_speaker": datasets.Value("bool"),
255
  "sent_num_in_turn": datasets.Value("int64"),
256
  "turn_num_in_protocol": datasets.Value("int64"),
 
 
 
 
 
 
 
 
 
 
 
257
  "speaker_factions_memberships": datasets.Sequence({
258
  "end_date": datasets.Value("string"),
259
  "faction_id": datasets.Value("string"),