Datasets:

Languages:
Hebrew
ArXiv:
Libraries:
Datasets
pandas
License:
KnessetCorpus / README.md
GiliGold's picture
Update README.md
3ce7c4e
|
raw
history blame
18.4 kB
metadata
license: cc-by-sa-4.0
task_categories:
  - text-classification
  - text-generation
language:
  - he
tags:
  - politics
  - parliamentary
  - Knesset
  - Hebrew
pretty_name: Knesset (Israeli Parliament) Proceedings Corpus
size_categories:
  - 10M<n<100M

The Knesset (Israeli Parliament) Proceedings Corpus

๐Ÿ’ป [Github Repo] โ€ข ๐Ÿ“ƒ [Paper] โ€ข ๐Ÿ“Š [ES kibana dashboard]

Dataset Description

An annotated corpus of Hebrew parliamentary proceedings containing over 32 million sentences from all the (plenary and committee) protocols held in the Israeli parliament from 1998 to 2022.
Sentences are annotated with various levels of linguistic information, including part-of-speech tags, morphological features, dependency structures, and named entities.
They are also associated with detailed meta-information reflecting demographic and political properties of the speakers, based on a large database of parliament members and factions that we compiled.

  • Curated by: Gili Goldin (University of Haifa), Nick Howell (IAHLT), Noam Ordan (IAHLT), Ella Rabinovich (The Academic College of Tel-Aviv Yaffo), Shuly Wintner (University of Haifa)

For more information see: ArXiv

Usage

Option 1: HuggingFace

For the All Features Sentences subset:

from datasets import load_dataset
knesset_corpus = load_dataset("HaifaCLGroup/knessetCorpus", name="all_features_sentences")

For the Non-Morphological Features Sentences subset:

  • Ideal if morpho-syntactic annotations aren't relevant to your work, providing a less disk space heavy option.
from datasets import load_dataset
knesset_corpus = load_dataset("HaifaCLGroup/knessetCorpus", name="no_morph_all_features_sentences")

See Subsets for other subsets options and change the name field accordingly.

Option 2: ElasticSearch

IP address, username and password for the es server and Kibana:

elastic_ip = '34.0.64.248:9200'
kibana_ip = '34.0.64.248:5601'
es_username = 'user'
es_password = 'knesset'

Query dataset:

from elasticsearch import Elasticsearch

es = Elasticsearch(f'http://{elastic_ip}',http_auth=(es_username, es_password), timeout=100)
resp = es.search(index="all_features_sentences", body={"query":{"match_all": {}}})
print("Got %d Hits:" % resp['hits']['total']['value'])
for hit in resp['hits']['hits']:
   print("id: %(sentence_id)s: speaker_name: %(speaker_name)s: sentence_text: %(sentence_text)s" % hit["_source"])

Option 3: Directly from files

import json

path = <path to committee_full_sentences.jsonl> #or any other sentences jsonl file
with open(path, encoding="utf-8") as file:
   for line in file:
       try:
           sent = json.loads(line)
       except Exception as e:
           print(f'couldnt load json line. error:{e}.')
       sent_id = sent["sentence_id"]
       sent_text = sent["sentence_text"]
       speaker_name = sent["speaker_name"]
       print(f"ID: {sent_id}, speaker name: {speaker_name},  text: {sent_text")

Subsets

ALL_Features_Sentences

  • name: "all_features_sentences"
  • description: Samples of all the sentences in the corpus (plenary and committee) together with all the features available in the dataset.
    The fields are consistent with the All Features Sentence entity.
  • Number of examples: 32,832,205

Non-Morphological_Features_Sentences

  • name: "no_morph_all_features_sentences"
  • description: The same as All Features Sentences but without the morphological_fields features.
    Ideal if morpho-syntactic annotations aren't relevant to your work, providing a less disk space heavy option.
  • Number of examples: 32,832,205

KnessetMembers

  • name: "knessetMembers"
  • description: samples of the Knesset members in the dataset and their meta-data information such as name, gender, and factions affiliations.
    The fields are consistent with the Person entity.
  • Number of examples: 1,100

Factions

  • name: "factions"
  • description: Samples of all the factions in the dataset and their meta-data information such as name, political orientation and active periods.
    The fields are consistent with the Faction entity.
  • Number of examples: 153

Protocols

  • name: "protocols"
  • description: Samples of the protocols in the dataset and their meta-data information such as date, knesset number, session name and a list of its sentences.
    The fields are consistent with the Protocol entity.
  • Number of examples: 41,319

Committees_ALL_Features_Sentences

  • name: "committees_all_features_sentences"
  • description: Samples of all the sentences in the committee sessions together with all the features available in the dataset.
    The fields are consistent with the All Features Sentence entity.
  • Number of examples: 24,805,925

Plenary_ALL_Features_Sentences

  • name: "plenary_all_features_sentences"
  • description: Samples of all the sentences in the plenary sessions together with all the features available in the dataset.
    The fields are consistent with the All Features Sentence entity.
  • Number of examples: 24,805,925

Committees Non-Morphological_Features_Sentences

  • name: "no_morph_committee_all_features_sentences"
  • description: The same as Committees ALL Features Sentences but without the morphological_fields features.
    Ideal if morpho-syntactic annotations aren't relevant to your work, providing a less disk space heavy option.
  • Number of examples: 24,805,925

Plenary Non-Morphological_Features_Sentences

  • name: "no_morph_plenary_all_features_sentences"
  • description: The same as Plenary_ALL_Features_Sentences but without the morphological_fields features.
    Ideal if morpho-syntactic annotations aren't relevant to your work, providing a less disk space heavy option.
  • Number of examples: 24,805,925

Other files in dataset

  • ner_and_ud_manually_annotated_sentences: contains files with ~4700 manually annotated sentences from the Knesset corpus for the NER and dependencies sentences.
  • Conllu files: The morphological fields of the sentences in a conllu format. corresponding to the morphological_fields of the Sentence model.
  • Meta-data files: csv tables containing the details about the factions and the Knesset members in our dataset. corresponding the fields of the Faction and Person models.
  • raw_data: All the original protocols as recieved from the Knesset in .doc, .docx and pdf formats.

Dataset Entities and Fields

* All the dates in the dataset are represented in the format: '%Y-%m-%d %H:%M'

Person

The Person entity contains the following fields:

  • person_id: A unique identifier for the person. For example, "2660". (type: string).
  • first_name: The first name of the person in Hebrew. For example, "ืื‘ืจื”ื". (type: string).
  • last_name: The last name of the person in Hebrew. For example, "ืฉืคื™ืจื". (type: string).
  • full_name: The full name of the person, a combination of the first and last name in Hebrew. For example, "ืื‘ืจื”ื ืฉืคื™ืจื". (type: string).
  • is_knesset_member: Indicates if the person is or ever was a Knesset member. (type: boolean).
  • gender: The person's gender. For example, "male". (type: string).
  • email: The person's email address. (type: string).
  • is_current: Indicates if the person was a Knesset member at the time this record was last updated. (type: boolean).
  • last_updated_date: The date the record was last updated. For example: "2015-03-20 12:03". (type: string).
  • date_of_birth: The person's date of birth. For example: "1921-03-02 00:00". (type: string).
  • place_of_birth: The country the person was born in, mentioned in Hebrew. For example, "ืจื•ืžื ื™ื”". (type: string).
  • year_of_aliya: The year the person migrated to Israel if not born there. For example, "1949". Empty if the person was born in Israel or hasn't migrated there. (type: string).
  • date_of_death: The date the person died, if not alive. For example, "2000-06-26 00:00". Empty if the person is still alive. (type: string).
  • mother_tongue: The person's first language. Currently unavailable. (type: string).
  • religion: The person's religion, mentioned in Hebrew. For example "ื™ื”ื•ื“ื™". (type: string).
  • nationality: The person's nationality, mentioned in Hebrew. For example "ื™ื”ื•ื“ื™". (type: string).
  • religious_orientation: The person's religious orientation. Possible values:, "ื—ืจื“ื™", "ื“ืชื™", "ื—ื™ืœื•ื ื™" or an empty string if not available. (type: string).
  • residence: The place where the person currently resides. For example: "ืชืœ ืื‘ื™ื‘". (type: string).
  • factions_memberships: A list of dicts that includes factions the person has been a member of. Each dict contains:
    • faction_id: General ID of the faction. (type: string).
    • knesset_faction_id: The unique ID for the faction within the Knesset. (type: string).
    • faction_name: Name of the faction in Hebrew. For example, "ืื’ื•ื“ืช ื™ืฉืจืืœ". (type: string).
    • knesset_number: The session of the Knesset during the person's membership in the faction. For example: "13" (type: string).
    • start_date: The date when the person's membership in the faction started. (type: string).
    • end_date: The date when the person's membership in the faction ended. (type: string).
  • languages: Languages spoken by the person, mentioned in Hebrew. For example, [" ื™ื™ื“ื™ืฉ", " ืฆืจืคืชื™ืช", " ื’ืจืžื ื™ืช"] (type: list of strings).
  • allSources: The sources of information for the person, including wikiLink. (type: list of strings).
  • wikiLink: The person's Wikipedia page link. (type: string).
  • notes: Any additional notes on the person. (type: list of strings).

Faction

The Faction entity contains the following fields:

  • faction_name: Name of the faction in Hebrew. For example, "ืžืคืœื’ืช ืคื•ืขืœื™ื ืžืื•ื—ื“ืช". (type: string).
  • faction_popular_initials: The common initials or acronym of the party name, if any. (type: string).
  • faction_id: Unique identifier for the faction. (type: string).
  • active_periods: List of active periods for this faction, each entry is a dict:
    • start_date: The date when the active period started. (type: string).
    • end_date: The date when the active period ended. (type: string).
  • knesset_numbers: List of Knesset sessions where the faction was active. Each entry is a string representing the Knesset number. (type: list of strings).
  • coalition_or_opposition_memberships: A list of Knesset memberships, each entry is a dict that includes:
    • knesset_num: The session of the Knesset during the faction's membership. (type: string).
    • start_date: The date when the membership started. (type: string).
    • end_date: The date when the membership ended. (type: string).
    • knesset_faction_name: The faction's name in Knesset. (type: string).
    • member_of_coalition: Boolean indicating whether the faction was a member of the coalition. (type: boolean).
    • notes: Any additional notes related to the membership. (type: string).
  • political_orientation: The political orientation of the party. Possible values: "ืฉืžืืœ ืงื™ืฆื•ื ื™", "ืฉืžืืœ", "ื™ืžื™ืŸ", "ื™ืžื™ืŸ ืงื™ืฆื•ื ื™", "ืžืจื›ื–", "ืขืจื‘ื™ื", "ื“ืชื™ื™ื", "ื—ืจื“ื™ื". (type: string).
  • other_names: Other names used to describe the faction, if any. (type: list of strings).
  • notes: Any additional notes related to the faction. (type: string).
  • wiki_link: The link to the faction's Wikipedia page in Hebrew. (type: string).

Protocol

The Protocol entity contains the following fields:

  • protocol_name: The name of the protocol document and also serves as a unique identifier for the protocol. For example, "18_ptv_140671.doc". (type: string)
  • session_name: The name of the session where the protocol was created. For example, "ื”ื•ื•ืขื“ื” ืœืขื ื™ื™ื ื™ ื‘ื™ืงื•ืจืช ื”ืžื“ื™ื ื”". (type: string)
  • parent_session_name: The name of the parent session where the protocol was created, if any. For example, "ื”ื•ื•ืขื“ื” ืœืขื ื™ื™ื ื™ ื‘ื™ืงื•ืจืช ื”ืžื“ื™ื ื”". (type: string)
  • knesset_number: The number of the Knesset session. For example, "18". (type: string)
  • protocol_number: The number of the protocol. For example, "92". (type: string)
  • protocol_date: The date and time of the meeting. For example, "2010-06-14 12:30". (type: string)
  • is_ocr_output: A Boolean value indicating whether the protocol is an output from Optical Character Recognition (OCR). Currently all documents in the dataset are not an ocr_output. (type: boolean)
  • protocol_type: The type of the protocol. possible values: "committee", "plenary". (type: string)
  • protocol_sentences: A list of sentences in the protocol. Each item in the list is a dict with fields of the Sentence entity described below.

Sentence

The Sentence entity contains the following fields:

  • sentence_id: Unique identifier for the sentence. (type: string)
  • protocol_name: Name of the protocol this sentence is part of. Corresponds to the protocol_name field in the Protocol entity. (type: string)
  • speaker_id: Identifier for the speaker of the sentence. Corresponds to the person_id field in the Person entity. (type: string)
  • speaker_name: Name of the speaker. Corresponds to the full_name field in the Person entity. (type: string)
  • is_valid_speaker: A Boolean value indicating whether the speaker is valid. (type: boolean)
  • turn_num_in_protocol: The turn number in the protocol where this sentence was spoken. (type: integer)
  • sent_num_in_turn: The number of this sentence in its respective turn. (type: integer)
  • sentence_text: The text content of the sentence. (type: string)
  • is_chairman: A Boolean value indicating whether the speaker is the chairman of this meeting. (type: boolean)
  • morphological_fields: A List of morphological structures of words in the sentence, each being a dictionary. These fields are based on the CoNLL-U morphological annotations format:
    • id: The identifier for the word in the sentence. (type: integer)
    • form: The form of the word. (type: string)
    • lemma: The base or dictionary form of the word. (type: string)
    • upos: Universal part-of-speech tag. (type: string)
    • xpos: Language-specific part-of-speech tag. (type: string)
    • feats: Grammatical features of the word. This is a dictionary with features such as: {"Gender": "Masc", "Number": "Plur"}. (type: dictionary)
    • head: The ID of the word that the current word is attached to, creating a syntactic relation. (type: integer)
    • deprel: Universal dependency relation to the HEAD (root independent). (type: string)
    • deps: Enhanced dependency graph in the form of a list of head-deprel pairs. (type: list)
    • misc: Any other miscellaneous information. (type: string)
  • factuality_fields: Currently unavailable.

All_Features_Sentence

The All_Features_Sentence entity combines fields from the Person,Faction, Protocol and Sentence entities, each corresponding to its specific context in relation to the sentence. This is roughly equivalent to a join between all the entities in dataset.
Each field corresponds to its respective description in the entity's section. The structure includes the following fields:

  • Protocol fields: These correspond to the protocol from which the sentence is extracted and include:
    knesset_number, protocol_name, protocol_number, protocol_type, session_name, parent_session_name, protocol_date, is_ocr_output.
  • Sentence fields: These correspond to the specific sentence and include:
    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.
  • Person (Speaker) fields: These correspond to the speaker of the sentence and include:
    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 fields: These correspond to the faction of the speaker at the time the sentence was delivered and include:
    faction_id, faction_general_name, knesset_faction_id, current_faction_name, member_of_coalition_or_opposition, 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.
    Please refer to the respective entity section for details on each field.

License

license: cc-by-sa-4.0
The raw data files were received from the Knesset archives. The original data are copyright-free and are released under no license.

license: CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0

Citation