kgdata.wikidata.datasets.entity_redirections#
Functions
Wikidata entity redirections. |
|
|
|
|
- entity_redirections() Dataset[Tuple[str, str]][source]#
Wikidata entity redirections. It combines two datasets: page_ids and entity_redirection_dump. The first one contains mapping from page_id => entity_id (can be old id). The second one contains mapping from page_id => final entity_id.
We did a join between two datasets based on page_id so we can get the mapping from old entity_id to the final entity_id.
Finally, we check if the final entity id is in the entity_ids dataset. If not, we remove the mapping.