Reputation: 56
I would like to query two or three terms in order to locate them in Wikipedia´s entries. Specifically, I´m trying to see if some terms get repeated in the first paragraphs (abstract) across entries. Could be direct or through dbpedia. Thanks
Upvotes: 0
Views: 129
Reputation: 507
Using Mediawiki API you can find articles that contain those keywords. Try the API:Search documentation.
For doing what you want to do, also, you'd probably need to find the articles that have those keywords and then parse the text to check if they are in the first paragraphs.
With this:
?action=parse&page=Nicolas_Cage&prop=text§ion=0
you can get the HTML of the first section of a page (see this post).
Upvotes: 2