Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -653,10 +653,26 @@ Thus, by joining per-language datasets by meaning ids, one can obtain a bilingua
|
|
653 |
|
654 |
The intended use of the dataset is to extract monolingual or bilingual dictionaries for the purposes of language learning by machines or humans.
|
655 |
|
656 |
-
The code below illustrates how the dataset could be used to extract French definitions of Finnish words.
|
657 |
|
658 |
```Python
|
659 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
660 |
```
|
661 |
|
662 |
|
@@ -665,28 +681,29 @@ TODO
|
|
665 |
|
666 |
<!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
|
667 |
|
668 |
-
The dataset is split by languages, denoted by their ISO 639 codes. Each language might contain multiple varieties; they are annotated within each per-language split.
|
669 |
|
670 |
To determine a code for your language, please consult the https://panlex.org webside. For additional information about a language, you may also want to consult https://glottolog.org/.
|
671 |
|
672 |
Each split contains the following fields:
|
673 |
-
- `id` (int): id of the
|
674 |
-
- `
|
675 |
-
- `
|
676 |
-
- `
|
677 |
-
- `
|
678 |
-
- `
|
|
|
|
|
679 |
|
680 |
|
681 |
## Dataset Creation
|
682 |
|
683 |
-
This dataset has been extracted from https://panlex.org (the `
|
684 |
|
685 |
The rearrangement consisted of the following steps:
|
686 |
1. Grouping together the language varieties from the `langvar` table with the same `lang_code`.
|
687 |
-
2. For each language, selecting the corresponding subset from the `
|
688 |
-
3. Joining the selected set with the `denotation` table, to
|
689 |
-
This increases the number of rows (for some languages, x5), because multiple meannings may be attached to the same expression.
|
690 |
|
691 |
## Bias, Risks, and Limitations
|
692 |
|
@@ -694,7 +711,6 @@ The rearrangement consisted of the following steps:
|
|
694 |
|
695 |
As with any multilingual dataset, Panlex data may exhbit the problem of under- and mis-representation of some languages.
|
696 |
|
697 |
-
The dataset consists primarily of the standard written forms ("lemmas") of the expressions, so it may not well represent their usage within a language.
|
698 |
|
699 |
## Citation
|
700 |
|
|
|
653 |
|
654 |
The intended use of the dataset is to extract monolingual or bilingual dictionaries for the purposes of language learning by machines or humans.
|
655 |
|
656 |
+
The code below illustrates how the dataset could be used to extract all French definitions of Finnish words found on Panlex.
|
657 |
|
658 |
```Python
|
659 |
+
from datasets import load_dataset
|
660 |
+
ds_fin_word = load_dataset('cointegrated/panlex-meanings', name='fin', split='train')
|
661 |
+
ds_fra_def = load_dataset('cointegrated/panlex-definitions', name='fra', split='train')
|
662 |
+
df_fin_word = ds_fin_word.to_pandas()
|
663 |
+
df_fra_def = ds_fra_def.to_pandas()
|
664 |
+
|
665 |
+
df_matched = df_fin_word.merge(df_fra_def, on='meaning', suffixes=['_wrd', '_def']).drop_duplicates(subset=['txt_wrd', 'txt_def'])
|
666 |
+
print(df_matched.shape)
|
667 |
+
# (11512, 13)
|
668 |
+
|
669 |
+
print(df_matched.sample(5)[['txt_wrd', 'meaning', 'txt_def']])
|
670 |
+
# txt_wrd meaning txt_def
|
671 |
+
# 101 kalsiumpitoisuus 30766618 teneur en calcium
|
672 |
+
# 7003 keho 28131094 Partie matérielle de tout être animé. (2)
|
673 |
+
# 8180 mikä tahansa 27960302 quel que soit celui qui
|
674 |
+
# 4606 Safari 1689224 Safari (logiciel)
|
675 |
+
# 9833 suositella 28251812 à trier
|
676 |
```
|
677 |
|
678 |
|
|
|
681 |
|
682 |
<!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
|
683 |
|
684 |
+
The dataset is split by languages of the definition, denoted by their ISO 639 codes. Each language might contain multiple varieties; they are annotated within each per-language split.
|
685 |
|
686 |
To determine a code for your language, please consult the https://panlex.org webside. For additional information about a language, you may also want to consult https://glottolog.org/.
|
687 |
|
688 |
Each split contains the following fields:
|
689 |
+
- `id` (int): id of the definition
|
690 |
+
- `meaning` (int): id of the meaning, joinable with [cointegrated/panlex-meanings](https://huggingface.co/datasets/cointegrated/panlex-meanings)
|
691 |
+
- `langvar` (int): id of the language variety of the definition
|
692 |
+
- `txt` (str): text of the definition
|
693 |
+
- `langvar_uid` (str): more human-readable id of the definition language (e.g. `eng-000` stands for generic English, `eng-001` for simple English, `eng-004` for American English). These ids could be looked up in the language dropdown at https://vocab.panlex.org/.
|
694 |
+
- `example` (str, optional): example of a word corresponding to the meaning of the definition (preferably, but not always, in the language of the definition)
|
695 |
+
- `example_langvar` (int, optional): id of the language variety of the example
|
696 |
+
- `example_langvar_uid` (str, optional): human-readable id of the language variety of the example
|
697 |
|
698 |
|
699 |
## Dataset Creation
|
700 |
|
701 |
+
This dataset has been extracted from https://panlex.org (the `20250201` database dump) and automatically rearranged on the per-language basis.
|
702 |
|
703 |
The rearrangement consisted of the following steps:
|
704 |
1. Grouping together the language varieties from the `langvar` table with the same `lang_code`.
|
705 |
+
2. For each language, selecting the corresponding subset from the `definition` table.
|
706 |
+
3. Joining the selected set with the `denotation` table, to match an example of expression id with the given meaning, and then with the `expr` table, to get the text and language of the expression.
|
|
|
707 |
|
708 |
## Bias, Risks, and Limitations
|
709 |
|
|
|
711 |
|
712 |
As with any multilingual dataset, Panlex data may exhbit the problem of under- and mis-representation of some languages.
|
713 |
|
|
|
714 |
|
715 |
## Citation
|
716 |
|