Wikipedia¶
-
class
orangecontrib.text.wikipedia.
WikipediaAPI
(on_error=None)[source]¶ Wraps Wikipedia API.
Examples
>>> api = WikipediaAPI() >>> corpus = api.search('en', ['Barack Obama', 'Hillary Clinton'])
-
search
(lang, queries, articles_per_query=10, should_break=None, on_progress=None)[source]¶ Searches for articles.
Parameters: - lang (str) – A language code in ISO 639-1 format.
- queries (list of str) – A list of queries.
- should_break (callback) – Callback for breaking the computation before the end. If it evaluates to True, downloading is stopped and document downloaded till now are returned in a Corpus.
- on_progress (callable) – Callback for progress bar.
-