wikipediawikipedia-apisummarization

Article summarization in wikipedia


Wikipedia provides article summaries for most articles when using its search feature (see screenshot below). I have looked at various articles and couldn't find the text in the original article; neither in the rendered page nor in the metadata inside the Edit section.

Now, I have two questions:

  1. How does Wikipedia show these summarizations? Are these precurated texts entered by the community or is there any underlying ML algorithm to summarize articles? In the case of the former, can you point me to the location where these data are sourced? In case of the latter, has the algorithm been open-sourced?

  2. Does Wikipedia API support retrieving these summaries for a given article?

enter image description here


Solution

  • I found the answer to my question. Those summarizations come from Wikidata which is a sister project to Wikipedia. According to Wikidata's Wikipedia page:

    Wikidata is a collaboratively edited knowledge base operated by the Wikimedia Foundation. It is intended to provide a common source of data which can be used by Wikimedia projects such as Wikipedia, and by anyone else, under a public domain license.

    For instance, the Wikidata page for Pizza is https://www.wikidata.org/wiki/Q177. It has its own API which is described in https://www.wikidata.org/w/api.php.