IgoRamli/IndoLAMA

Knowledge probing framework for Indonesian pre-trained language model

0

stars

1

commits

Python

primary language

Nov 30, 2021

updated

benchmark
indonesia
indonesian-language
knowledge-base
knowledge-probing
language-model
machine-learning
natural-language-processing

README

IndoLAMA

IndoLAMA is a knowledge probing benchmark for Indonesian language models. Processing of IndoLAMA dataset follows Petroni et al. 2019

Versions

This repository contais 3 variants of IndoLAMA. All variants are built from IndoWiki:

  • IndoLAMA: Probing dataset taken from the transductive training split of IndoWiki (indowiki_transductive_train.txt). This means that any model trained with IndoWiki would have encountered these dataset. Useful to determine whether the trained model can recall factual knowledge properly.
  • IndoLAMA-Test-Only: Probing dataset taken from the transductive test split of IndoWiki (indowiki_transductive_test.txt). Knowledge in this dataset is not present in the training split. However, entities (subject/object) that appear on this dataset may also appear in the training split.
  • IndoLAMA-Inductive: Probing dataset taken from the inductive test split of IndoWiki (indowiki_inductive_test.txt). No entities present on this knowledge probing dataset should appear on the inductive training split of IndoWiki. This dataset is meant to test if a model is able to "induce" knowledge on unseen entities.

Knowledge Source

This benchmark uses IndoWiki as it's knowledge source. IndoWiki is a knowledge-graph dataset based on Wikipedia Bahasa Indonesia and WikiData. The method of acquiring factual knowledge from IndoWiki follows LAMA's preprocessing step for T-Rex dataset:

""" We consider 41 Wikidata relations and subsam- ple at most 1000 facts per relation. As with the Google-RE corpus, we manually define a tem- plate for each relation """

This repository follows the list of Wikidata relations used by LAMA.

Templates

The templates for each relation is manually defined. Below is the template definition for each predicate:

Relation IDLabelTemplate
P17country(subjek) berada di negara (objek)
P19place of birth(subjek) dilahirkan di (objek)
P20place of death(subjek) wafat di (objek)
P27country of citizenship(subjek) merupakan warga negara dari (objek)
P30continent(subjek) terletak di benua (objek)
P31instance of(subjek) adalah (objek)
P36capitalIbu kota dari (subjek) adalah (objek)
P37official languageSalah satu bahasa resmi dari (subjek) adalah (objek)
P39position held(subjek) memiliki jabatan sebagai (objek)
P47shares border with(subjek) memiliki perbatasan dengan (objek)
P54member of sports team(subjek) bermain untuk (objek)
P69educated at(subjek) pernah menempuh pendidikan di (objek)
P101field of work(subjek) memiliki spesialisasi di bidang (objek)
P102member of
political party
(subjek) adalah anggota partai (objek)
P103native languageBahasa ibu dari (subjek) adalah (objek)
P106occupation(subjek) bekerja sebagai (objek)
P108employer(subjek) bekerja untuk (objek)
P127owned by(subjek) dimiliki oleh (objek)
P131located in the adm.
territorial entity
(subjek) berada di daerah (objek)
P136genre(subjek) memainkan musik (objek)
P138named after(subjek) mendapatkan namanya dari (objek)
P140religionAgama dari (subjek) adalah (objek)
P159headquarters locationKantor pusat (subjek) terletak di (objek)
P166award received(subjek) pernah menerima penghargaan (objek)
P176manufacturer(subjek) diproduksi oleh (objek)
P178developer(subjek) dikembangkan oleh (objek)
P190twinned administrative body(subjek) dan (objek) merupakan kota kembar
P264record labelMerek (subjek) dimiliki oleh (objek)
P276location(subjek) terletak di (objek)
P279subclass of(subjek) adalah jenis dari (objek)
P361part of(subjek) merupakan bagian dari (objek)
P364original language of
film or TV show
Bahasa asli dari (subjek) adalah (objek)
P407language of work or name(subjek) ditulis dalam bahasa (objek)
P413position played on
team/speciality
(subjek) bermain di posisi (objek)
P449original network(subjek) ditayangkan pertama kali pada (objek)
P463member of(subjek) adalah anggota dari (objek)
P495country of origin(subjek) berasal dari (objek)
P527has part(subjek) terdiri dari (objek)
P530diplomatic relation(subjek) memiliki hubungan diplomatik dengan (objek)
P740location of formation(subjek) didirikan di (objek)
P937work location(subjek) bekerja di (objek)
P1001applies to jurisdiction(subjek) pernah diterapkan ke yurisdiksi (objek)
P1303instrument(subjek) bisa memainkan instrumen (objek)
P1376capital of(subjek) adalah ibu kota dari (objek)
P1412language spoken,
written, or signed
(subjek) berbahasa (objek)
P1923participating team(objek) adalah tim yang ikut serta pada (subjek)

Contributors

IgoRamli

1 commits

IgoRamli/IndoLAMA

Knowledge probing framework for Indonesian pre-trained language model

0

stars

1

commits

Python

primary language

Nov 30, 2021

updated

benchmark
indonesia
indonesian-language
knowledge-base
knowledge-probing
language-model
machine-learning
natural-language-processing

README

IndoLAMA

IndoLAMA is a knowledge probing benchmark for Indonesian language models. Processing of IndoLAMA dataset follows Petroni et al. 2019

Versions

This repository contais 3 variants of IndoLAMA. All variants are built from IndoWiki:

  • IndoLAMA: Probing dataset taken from the transductive training split of IndoWiki (indowiki_transductive_train.txt). This means that any model trained with IndoWiki would have encountered these dataset. Useful to determine whether the trained model can recall factual knowledge properly.
  • IndoLAMA-Test-Only: Probing dataset taken from the transductive test split of IndoWiki (indowiki_transductive_test.txt). Knowledge in this dataset is not present in the training split. However, entities (subject/object) that appear on this dataset may also appear in the training split.
  • IndoLAMA-Inductive: Probing dataset taken from the inductive test split of IndoWiki (indowiki_inductive_test.txt). No entities present on this knowledge probing dataset should appear on the inductive training split of IndoWiki. This dataset is meant to test if a model is able to "induce" knowledge on unseen entities.

Knowledge Source

This benchmark uses IndoWiki as it's knowledge source. IndoWiki is a knowledge-graph dataset based on Wikipedia Bahasa Indonesia and WikiData. The method of acquiring factual knowledge from IndoWiki follows LAMA's preprocessing step for T-Rex dataset:

""" We consider 41 Wikidata relations and subsam- ple at most 1000 facts per relation. As with the Google-RE corpus, we manually define a tem- plate for each relation """

This repository follows the list of Wikidata relations used by LAMA.

Templates

The templates for each relation is manually defined. Below is the template definition for each predicate:

Relation IDLabelTemplate
P17country(subjek) berada di negara (objek)
P19place of birth(subjek) dilahirkan di (objek)
P20place of death(subjek) wafat di (objek)
P27country of citizenship(subjek) merupakan warga negara dari (objek)
P30continent(subjek) terletak di benua (objek)
P31instance of(subjek) adalah (objek)
P36capitalIbu kota dari (subjek) adalah (objek)
P37official languageSalah satu bahasa resmi dari (subjek) adalah (objek)
P39position held(subjek) memiliki jabatan sebagai (objek)
P47shares border with(subjek) memiliki perbatasan dengan (objek)
P54member of sports team(subjek) bermain untuk (objek)
P69educated at(subjek) pernah menempuh pendidikan di (objek)
P101field of work(subjek) memiliki spesialisasi di bidang (objek)
P102member of
political party
(subjek) adalah anggota partai (objek)
P103native languageBahasa ibu dari (subjek) adalah (objek)
P106occupation(subjek) bekerja sebagai (objek)
P108employer(subjek) bekerja untuk (objek)
P127owned by(subjek) dimiliki oleh (objek)
P131located in the adm.
territorial entity
(subjek) berada di daerah (objek)
P136genre(subjek) memainkan musik (objek)
P138named after(subjek) mendapatkan namanya dari (objek)
P140religionAgama dari (subjek) adalah (objek)
P159headquarters locationKantor pusat (subjek) terletak di (objek)
P166award received(subjek) pernah menerima penghargaan (objek)
P176manufacturer(subjek) diproduksi oleh (objek)
P178developer(subjek) dikembangkan oleh (objek)
P190twinned administrative body(subjek) dan (objek) merupakan kota kembar
P264record labelMerek (subjek) dimiliki oleh (objek)
P276location(subjek) terletak di (objek)
P279subclass of(subjek) adalah jenis dari (objek)
P361part of(subjek) merupakan bagian dari (objek)
P364original language of
film or TV show
Bahasa asli dari (subjek) adalah (objek)
P407language of work or name(subjek) ditulis dalam bahasa (objek)
P413position played on
team/speciality
(subjek) bermain di posisi (objek)
P449original network(subjek) ditayangkan pertama kali pada (objek)
P463member of(subjek) adalah anggota dari (objek)
P495country of origin(subjek) berasal dari (objek)
P527has part(subjek) terdiri dari (objek)
P530diplomatic relation(subjek) memiliki hubungan diplomatik dengan (objek)
P740location of formation(subjek) didirikan di (objek)
P937work location(subjek) bekerja di (objek)
P1001applies to jurisdiction(subjek) pernah diterapkan ke yurisdiksi (objek)
P1303instrument(subjek) bisa memainkan instrumen (objek)
P1376capital of(subjek) adalah ibu kota dari (objek)
P1412language spoken,
written, or signed
(subjek) berbahasa (objek)
P1923participating team(objek) adalah tim yang ikut serta pada (subjek)

Contributors

IgoRamli

1 commits

Languages

Python

100.0%