ovos duckduckgo plugin
Project description
DuckDuckGo Plugin
from ovos_ddg_solver import DuckDuckGoSolver
d = DuckDuckGoSolver()
ans = d.spoken_answer("Quem foi Bartolomeu Dias", lang="pt")
print(ans)
# Bartolomeu Dias, OM, OMP foi um navegador português que ficou célebre por ter sido o primeiro europeu a navegar para além do extremo sul da África, contornando o Cabo da Boa Esperança e chegando ao Oceano Índico a partir do Atlântico, abrindo o caminho marítimo para a Índia. Dele não se conhecem os antepassados, mas mercês e armas a ele outorgadas passaram a seus descendentes. Seu irmão foi Diogo Dias, também experiente navegador. Foi o principal navegador da esquadra de Pedro Álvares Cabral em 1500. As terras do Brasil, até então desconhecidas pelos portugueses, confundiram os navegadores, que pensaram tratar-se de uma ilha, a que deram o nome de "Vera Cruz".
info = d.get_infobox("Stephen Hawking", lang="pt")[0]
from pprint import pprint
pprint(info)
# {'born': 'Quinta-feira, oito de Janeiro, mil novecentos e quarenta e dois',
# 'died': 'Quarta-feira, catorze de Março, dois mil e dezoito',
# 'facebook profile': 'stephenhawking',
# 'imdb id': 'nm0370071',
# 'instance of': {'entity-type': 'item', 'id': 'Q5', 'numeric-id': 5},
# 'official website': 'https://hawking.org.uk',
# 'rotten tomatoes id': 'celebrity/stephen_hawking',
# 'wikidata aliases': ['Stephen Hawking',
# 'Hawking',
# 'Stephen William Hawking',
# 'S. W. Hawking'],
# 'wikidata description': 'físico teórico, cosmólogo e autor inglês (1942–2018)',
# 'wikidata id': 'Q17714',
# 'wikidata label': 'Stephen Hawking',
# 'youtube channel': 'UCPyd4mR0p8zHd8Z0HvHc0fw'}
# chunked answer, "tell me more"
for sentence in d.long_answer("who is Isaac Newton", lang="en"):
print(sentence["title"])
print(sentence["summary"])
print(sentence.get("img"))
# who is Isaac Newton
# Sir Isaac Newton was an English polymath active as a mathematician, physicist, astronomer, alchemist, theologian, author, and inventor.
# https://duckduckgo.com/i/401ff0bf4dfa0847.jpg
# who is Isaac Newton
# He was a key figure in the Scientific Revolution and the Enlightenment that followed.
# https://duckduckgo.com/i/401ff0bf4dfa0847.jpg
# who is Isaac Newton
# His book Philosophiæ Naturalis Principia Mathematica, first published in 1687, achieved the first great unification in physics and established classical mechanics.
# https://duckduckgo.com/i/401ff0bf4dfa0847.jpg
# who is Isaac Newton
# Newton also made seminal contributions to optics, and shares credit with German mathematician Gottfried Wilhelm Leibniz for formulating infinitesimal calculus, though he developed calculus years before Leibniz.
# https://duckduckgo.com/i/401ff0bf4dfa0847.jpg
# who is Isaac Newton
# Newton contributed to and refined the scientific method, and his work is considered the most influential in bringing forth modern science.
# https://duckduckgo.com/i/401ff0bf4dfa0847.jpg
# who is Isaac Newton
# In the Principia, Newton formulated the laws of motion and universal gravitation that formed the dominant scientific viewpoint for centuries until it was superseded by the theory of relativity.
# https://duckduckgo.com/i/401ff0bf4dfa0847.jpg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ovos_ddg_solver_plugin-0.0.2a2.tar.gz.
File metadata
- Download URL: ovos_ddg_solver_plugin-0.0.2a2.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d4651b8865cbca39a6f00935161318c5358b6b0945d99ac9cc0e7993e1182d3
|
|
| MD5 |
9289a42bf080cb4d64d97d9dc2ee821b
|
|
| BLAKE2b-256 |
499b5aaf6bc7faca2a210394c32e99d4bcac572ef2c587d19085e9074c9bc995
|
File details
Details for the file ovos_ddg_solver_plugin-0.0.2a2-py3-none-any.whl.
File metadata
- Download URL: ovos_ddg_solver_plugin-0.0.2a2-py3-none-any.whl
- Upload date:
- Size: 55.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55919a80c38950fa245c069f016af979dffce50214c4d53c2cf7931638ef1a49
|
|
| MD5 |
034d941b7887fac0a2d49bd705fb7c86
|
|
| BLAKE2b-256 |
e0f9745e1485ce357cfdc5f05806b2c870771c58860f102d9740c27777f66d31
|