Datasets:

Languages:
Hebrew
ArXiv:
Libraries:
Datasets
pandas
License:
GiliGold commited on
Commit
c3f3bde
1 Parent(s): 3791d24

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +74 -26
README.md CHANGED
@@ -40,20 +40,75 @@ factions that we compiled.
40
  For more information see: [ArXiv](http://arxiv.org/abs/1111.11111)
41
 
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  ## Subsets
44
 
45
- #### ALL Features Sentences
46
- - `Name`: "all_features_sentences"
47
- - `Description`: Samples of all the sentences in the corpus (plenary and committee) together with all the features available in the dataset.
48
  The fields are consistent with the [All Features Sentence](#all_features_sentence) entity.
49
  - `Number of examples`: 32,832,205
50
  - `Data_urls`:
51
  ["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/committee_full_sentences.jsonl.bz2",
52
  "https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/plenary_full_sentences.jsonl.bz2"]
53
 
54
- #### Non-Morphological Features Sentences
55
- - `Name`: "no_morph_all_features_sentences"
56
- - `Description`: The same as [All Features Sentences](#all_features_sentences) but without the morphological_fields features.
57
  Ideal if morpho-syntactic annotations aren't relevant to your work, providing a less disk space heavy option.
58
  - `Number of examples`: 32,832,205
59
  - `Data_urls`:
@@ -61,37 +116,37 @@ The fields are consistent with the [All Features Sentence](#all_features_sentenc
61
  "https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/plenary_full_sentences.jsonl.bz2"]
62
 
63
  #### KnessetMembers
64
- - `Name`: "knessetMembers"
65
- - `Description`: samples of the knesset members in the dataset and their meta-data information such as name, gender and factions affiliations.
66
  The fields are consistent with the [Person](#person) entity.
67
  - `Number of examples`: 1,100
68
  - Data_urls:["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/raw/main/all_knesset_members_jsons.jsonl"]
69
 
70
  #### Factions
71
- - `Name`: "factions"
72
- - `Description`: Samples of all the factions in the dataset and their meta-data information such as name, political orientation and active periods.
73
  The fields are consistent with the [Faction](#faction) entity.
74
  - `Number of examples`: 153
75
  - Data_urls:["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/raw/main/factions_jsons.jsonl"]
76
 
77
  #### Protocols
78
- - `Name`: "protocols"
79
- - `Description`: Samples of the protocols in the dataset and their meta-data information such as date,
80
  - knesset number, session name and a list of its sentences.
81
  The fields are consistent with the [Protocol](#protocol) entity.
82
  - `Number of examples`: 41,319
83
  - Data_urls:todo
84
 
85
  #### Committees ALL Features Sentences
86
- - `Name`: "committees_all_features_sentences"
87
- - `Description`: Samples of all the sentences in the committee sessions together with all the features available in the dataset.
88
  The fields are consistent with the [All Features Sentence](#all_features_sentence) entity.
89
  - `Number of examples`: 24,805,925
90
  - Data_urls: ["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/committee_full_sentences.jsonl.bz2"]
91
 
92
  #### Plenary ALL Features Sentences
93
- - `Name`: "plenary_all_features_sentences"
94
- - `Description`: Samples of all the sentences in the plenary sessions together with all the features available in the dataset.
95
  The fields are consistent with the [All Features Sentence](#all_features_sentence) entity.
96
  - `Number of examples`: 24,805,925
97
  - Data_urls: ["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/plenary_full_sentences.jsonl.bz2"]
@@ -103,9 +158,10 @@ The fields are consistent with the [All Features Sentence](#all_features_sentenc
103
  [Person](#person) models.
104
  - `raw_data`: All the original protocols as recieved from the Knesset in .doc, .docx and pdf formats.
105
 
106
- # * All the dates in the dataset are represented in the format: '%Y-%m-%d %H:%M'
107
 
108
- ## Dataset Entities
 
 
109
  #### Person
110
  The Person entity contains the following fields:
111
  - `person_id`: A unique identifier for the person. For example, "2660". (type: string).
@@ -217,15 +273,7 @@ Please refer to the respective entity section for details on each field.
217
 
218
 
219
 
220
- ## Usage
221
-
222
- #### Option 1: with HuggingFace
223
-
224
- #### Option 2: with ElasticSearch
225
-
226
- #### Option 3: direct from files
227
 
228
- <!-- Address questions around how the dataset is intended to be used. -->
229
 
230
  ### License
231
 
 
40
  For more information see: [ArXiv](http://arxiv.org/abs/1111.11111)
41
 
42
 
43
+
44
+ ## Usage
45
+
46
+ #### Option 1: HuggingFace
47
+ For the [All Features Sentences](#all_features_sentences) subset:
48
+ ```python
49
+ from datasets import load_dataset
50
+ knesset_corpus = load_dataset("HaifaCLGroup/knessetCorpus", name="all_features_sentences")
51
+
52
+ ```
53
+ For the [Non-Morphological Features Sentences](#non-morphological_features_sentences) subset:
54
+ ```python
55
+ from datasets import load_dataset
56
+ knesset_corpus = load_dataset("HaifaCLGroup/knessetCorpus", name="no_morph_all_features_sentences")
57
+
58
+ ```
59
+ See [Subsets](#subsets) for other subsets options and change the name field accordingly.
60
+
61
+
62
+ #### Option 2: ElasticSearch
63
+ IP address, username and password for the es server and [Kibana](http://34.0.64.248:5601/)
64
+ ```python
65
+ elastic_ip = '34.0.64.248:9200'
66
+ kibana_ip = '34.0.64.248:5601'
67
+ ```
68
+ ```python
69
+ es_username = 'user'
70
+ es_password = 'knesset'
71
+ ```
72
+ ```python
73
+ es = Elasticsearch(f'http://{elastic_ip}',http_auth=(es_username, es_password), timeout=100)
74
+ resp = es.search(index="all_features_sentences", body={"query":{"match_all": {}}})
75
+ print("Got %d Hits:" % resp['hits']['total']['value'])
76
+ for hit in resp['hits']['hits']:
77
+ print("id: %(sentence_id)s: speaker_name: %(speaker_name)s: sentence_text: %(sentence_text)s" % hit["_source"])
78
+ ```
79
+
80
+ #### Option 3: Directly from files
81
+ ```python
82
+ import json
83
+
84
+ path = <path to committee_full_sentences.jsonl> #or any other sentences jsonl file
85
+ with open(path, encoding="utf-8") as file:
86
+ for line in file:
87
+ try:
88
+ sent = json.loads(line)
89
+ except Exception as e:
90
+ print(f'couldnt load json line. error:{e}.')
91
+ sent_id = sent["sentence_id"]
92
+ sent_text = sent["sentence_text"]
93
+ speaker_name = sent["speaker_name"]
94
+ print(f"ID: {sent_id}, speaker name: {speaker_name}, text: {sent_text")
95
+
96
+ ```
97
+
98
  ## Subsets
99
 
100
+ #### ALL_Features_Sentences
101
+ - `name`: "all_features_sentences"
102
+ - `description`: Samples of all the sentences in the corpus (plenary and committee) together with all the features available in the dataset.
103
  The fields are consistent with the [All Features Sentence](#all_features_sentence) entity.
104
  - `Number of examples`: 32,832,205
105
  - `Data_urls`:
106
  ["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/committee_full_sentences.jsonl.bz2",
107
  "https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/plenary_full_sentences.jsonl.bz2"]
108
 
109
+ #### Non-Morphological_Features_Sentences
110
+ - `name`: "no_morph_all_features_sentences"
111
+ - `description`: The same as [All Features Sentences](#all_features_sentences) but without the morphological_fields features.
112
  Ideal if morpho-syntactic annotations aren't relevant to your work, providing a less disk space heavy option.
113
  - `Number of examples`: 32,832,205
114
  - `Data_urls`:
 
116
  "https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/plenary_full_sentences.jsonl.bz2"]
117
 
118
  #### KnessetMembers
119
+ - `name`: "knessetMembers"
120
+ - `description`: samples of the knesset members in the dataset and their meta-data information such as name, gender and factions affiliations.
121
  The fields are consistent with the [Person](#person) entity.
122
  - `Number of examples`: 1,100
123
  - Data_urls:["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/raw/main/all_knesset_members_jsons.jsonl"]
124
 
125
  #### Factions
126
+ - `name`: "factions"
127
+ - `description`: Samples of all the factions in the dataset and their meta-data information such as name, political orientation and active periods.
128
  The fields are consistent with the [Faction](#faction) entity.
129
  - `Number of examples`: 153
130
  - Data_urls:["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/raw/main/factions_jsons.jsonl"]
131
 
132
  #### Protocols
133
+ - `name`: "protocols"
134
+ - `description`: Samples of the protocols in the dataset and their meta-data information such as date,
135
  - knesset number, session name and a list of its sentences.
136
  The fields are consistent with the [Protocol](#protocol) entity.
137
  - `Number of examples`: 41,319
138
  - Data_urls:todo
139
 
140
  #### Committees ALL Features Sentences
141
+ - `name`: "committees_all_features_sentences"
142
+ - `description`: Samples of all the sentences in the committee sessions together with all the features available in the dataset.
143
  The fields are consistent with the [All Features Sentence](#all_features_sentence) entity.
144
  - `Number of examples`: 24,805,925
145
  - Data_urls: ["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/committee_full_sentences.jsonl.bz2"]
146
 
147
  #### Plenary ALL Features Sentences
148
+ - `name`: "plenary_all_features_sentences"
149
+ - `description`: Samples of all the sentences in the plenary sessions together with all the features available in the dataset.
150
  The fields are consistent with the [All Features Sentence](#all_features_sentence) entity.
151
  - `Number of examples`: 24,805,925
152
  - Data_urls: ["https://huggingface.co/datasets/HaifaCLGroup/KnessetCorpus/resolve/main/protocols_sentences/plenary_full_sentences.jsonl.bz2"]
 
158
  [Person](#person) models.
159
  - `raw_data`: All the original protocols as recieved from the Knesset in .doc, .docx and pdf formats.
160
 
 
161
 
162
+ ## Dataset Entities and Fields
163
+ ### * All the dates in the dataset are represented in the format: '%Y-%m-%d %H:%M'
164
+
165
  #### Person
166
  The Person entity contains the following fields:
167
  - `person_id`: A unique identifier for the person. For example, "2660". (type: string).
 
273
 
274
 
275
 
 
 
 
 
 
 
 
276
 
 
277
 
278
  ### License
279