Yes, this is very helpful! Thanks a lot!
So, if I get it right, I actually need some mapping from the link target
table to the page table in order to have both IDs to be "consistent".
Maybe I'm doing something too complicated here -- what I'm actually looking
for is a way to know the "in degree" of wiki articles. This is the number
of articles that point to a specific article. I'm only interested in
existing articles from namespace 0. Any better approach to do it?

thanks again!

On Fri, Feb 28, 2025 at 2:09 PM Amir Sarabadani <ladsgr...@gmail.com> wrote:

> Hi,
> Please note that the source and the target point to ids in different
> tables. pl_from points to id in page table (page_id) but pl_target_id
> points to id in linktarget table (lt_id). Also note that pages can link to
> non-existent pages (that's one of the reasons the target doesn't point to
> page_id but to a different table).
>
> Hope that helps, let me know if it doesn't fix your problem.
>
> Best
>
> Am Fr., 28. Feb. 2025 um 19:45 Uhr schrieb Abraham Israeli <
> isab...@umich.edu>:
>
>> Hi,
>> I am trying to work with the Pagelinks file in order to extract the
>> number of articles that link to a specific Wiki page (the same idea as can
>> be seen in the "What-links-here" tool:
>> https://en.wikipedia.org/wiki/Help:What_links_here).
>>
>> However, when I loop over this SQL-like file, I find very weird cases of
>> links that don't seem to exist in Wikipedia.
>>
>> For example, the first line in the file indicates that there is a link
>> between page ids 1939 and 2. PageID 2 doesn't even seem to exist.
>>
>> Even when I look at pages that do exist, the link indicated in the file
>> does not exist on the actual wiki page.
>>
>> Am I missing anything?
>> _______________________________________________
>> Xmldatadumps-l mailing list -- xmldatadumps-l@lists.wikimedia.org
>> To unsubscribe send an email to xmldatadumps-l-le...@lists.wikimedia.org
>>
>
>
> --
> Amir (he/him)
>
>

-- 
Best,
Abraham
---------

Abraham I.
Postdoc Researcher
University of Michigan | School of Information
pronouns: he/him
abraham.com <https://www.avrahami-israeli.com/>
_______________________________________________
Xmldatadumps-l mailing list -- xmldatadumps-l@lists.wikimedia.org
To unsubscribe send an email to xmldatadumps-l-le...@lists.wikimedia.org

Reply via email to