rayliuca commited on
Commit
0d82a24
·
1 Parent(s): 9d64cc0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -5
README.md CHANGED
@@ -7884,8 +7884,22 @@ language:
7884
  - es
7885
  ---
7886
 
7887
- Entity label data extracted from Wikidata (wikidata-20220103-all.json.gz), filtered for item entities only
7888
- Similar dataset: https://huggingface.co/datasets/wmt/wikititles (Wikipedia titles instead of all Wikidata entities)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7889
 
7890
  You can generate parallel text examples from this dataset like below:
7891
 
@@ -7910,9 +7924,9 @@ def parallel_labels(lang_codes: list, how="inner", repo_id="rayliuca/wikidata_en
7910
  return out_df
7911
 
7912
  # Note: the "en" subset is >4GB
7913
- parallel_labels(['en', 'fr', 'ja', 'zh'])
7914
  ```
7915
-
7916
  | | wikidata_id | en | fr | ja | zh |
7917
  |---:|:--------------|:------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|:---------------------------------------|:---------------------------------------------|
7918
  | 0 | Q109739412 | SARS-CoV-2 Omicron variant | variant Omicron du SARS-CoV-2 | SARSコロナウイルス2-オミクロン株 | 嚴重急性呼吸道症候群冠狀病毒2型Omicron變異株 |
@@ -7921,4 +7935,28 @@ parallel_labels(['en', 'fr', 'ja', 'zh'])
7921
  | 3 | Q106496152 | Claude Joseph | Claude Joseph | クロード・ジョゼフ | 克洛德·约瑟夫 |
7922
  | 4 | Q105519361 | The World's Finest Assassin Gets Reincarnated in a Different World as an Aristocrat | The World's Finest Assassin Gets Reincarnated in Another World as an Aristocrat | 世界最高の暗殺者、異世界貴族に転生する | 世界頂尖的暗殺者轉生為異世界貴族 |
7923
 
7924
- Note: this example shows a quirk(?) of the Wiki data. The French Wikipedia page [The World's Finest Assassin Gets Reincarnated in Another World as an Aristocrat](https://fr.wikipedia.org/wiki/The_World%27s_Finest_Assassin_Gets_Reincarnated_in_Another_World_as_an_Aristocrat) used the English title as its translation. While this could be disadvantageous for direct translation training, it also provides insights into how native speakers might call this entity instead of the literal translation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7884
  - es
7885
  ---
7886
 
7887
+ # Wikidata Labels
7888
+
7889
+ Large parallel corpus for machine translation
7890
+
7891
+ - Entity label data extracted from Wikidata (wikidata-20220103-all.json.gz), filtered for item entities only
7892
+ - Only download the languages you need with datasets>=2.14.0
7893
+ - Similar dataset: https://huggingface.co/datasets/wmt/wikititles (Selected Wikipedia titles pairs instead of all Wikidata entities)
7894
+
7895
+ ## Dataset Details
7896
+
7897
+
7898
+ ### Dataset Sources
7899
+
7900
+ - Wikidata JSON dump (2022-01-03) https://www.wikidata.org/wiki/Wikidata:Database_download
7901
+
7902
+ ## Uses
7903
 
7904
  You can generate parallel text examples from this dataset like below:
7905
 
 
7924
  return out_df
7925
 
7926
  # Note: the "en" subset is >4GB
7927
+ parallel_labels(['en', 'fr', 'ja', 'zh']).head()
7928
  ```
7929
+ ### Output
7930
  | | wikidata_id | en | fr | ja | zh |
7931
  |---:|:--------------|:------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|:---------------------------------------|:---------------------------------------------|
7932
  | 0 | Q109739412 | SARS-CoV-2 Omicron variant | variant Omicron du SARS-CoV-2 | SARSコロナウイルス2-オミクロン株 | 嚴重急性呼吸道症候群冠狀病毒2型Omicron變異株 |
 
7935
  | 3 | Q106496152 | Claude Joseph | Claude Joseph | クロード・ジョゼフ | 克洛德·约瑟夫 |
7936
  | 4 | Q105519361 | The World's Finest Assassin Gets Reincarnated in a Different World as an Aristocrat | The World's Finest Assassin Gets Reincarnated in Another World as an Aristocrat | 世界最高の暗殺者、異世界貴族に転生する | 世界頂尖的暗殺者轉生為異世界貴族 |
7937
 
7938
+ Note: this example table above shows a quirk(?) of the Wiki data. The French Wikipedia page [The World's Finest Assassin Gets Reincarnated in Another World as an Aristocrat](https://fr.wikipedia.org/wiki/The_World%27s_Finest_Assassin_Gets_Reincarnated_in_Another_World_as_an_Aristocrat) uses English for its title. While this could be disadvantageous for direct translation training, it also provides insights into how native speakers might call this entity instead of the literal translation on the Wiki page as well
7939
+
7940
+
7941
+ ## Dataset Structure
7942
+
7943
+ Each language has its own subset (aka config), which means you only have to download the languages you need with `datasets>=2.14.0`
7944
+
7945
+ Each subset has these fields:
7946
+ - wikidata_id
7947
+ - lastrevid
7948
+ - label
7949
+
7950
+
7951
+ ## Dataset Creation
7952
+
7953
+ #### Data Collection and Processing
7954
+
7955
+ - Filtered for item entities only
7956
+ - Ignored the descriptions as those texts are not very parallel
7957
+
7958
+ ## Bias, Risks, and Limitations
7959
+
7960
+ - Might be slightly outdated (2022)
7961
+ - Popular languages have more entries
7962
+ - Labels are not guaranteed to be literal translations (see examples above)