:param title: (str) the title of the Wikipedia page to summarize :param sentences: (int) the number of sentences to include in the summary (optional, default is 2) :return: (str) the summary of the Wikipedia page
(title: str, sentences = 2)
| 4 | |
| 5 | |
| 6 | def page(title: str, sentences = 2): |
| 7 | """ |
| 8 | :param title: (str) the title of the Wikipedia page to summarize |
| 9 | :param sentences: (int) the number of sentences to include in the summary (optional, default is 2) |
| 10 | :return: (str) the summary of the Wikipedia page |
| 11 | """ |
| 12 | |
| 13 | content = wikipedia.summary(title, sentences = sentences) |
| 14 | |
| 15 | return content |
| 16 | |
| 17 | |
| 18 | def voicing_text(text): |