Skip to main content

ovos duck duck go skill plugin

Project description

DuckDuckGo

Use DuckDuckGo to answer questions

About

Uses the DuckDuckGo API to provide information.

Examples

  • "when was stephen hawking born"
  • "ask the duck about the big bang"
  • "tell me more"
  • "who is elon musk"
  • "continue"
  • "tell me more"

Adding more infobox intents

internal .intent files can be added to allow parsing infoboxes returned by duckduckgo

first print the target infobox to inspect the returned results

from skill_ovos_ddg import DuckDuckGoSolver
d = DuckDuckGoSolver()
info = d.get_infobox("Stephen Hawking")[0]
print(info)
# {'age at death': '76 years',
#  'born': {'after': 0,
#           'before': 0,
#           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727',
#           'precision': 11,
#           'time': '+1942-01-08T00:00:00Z',
#           'timezone': 0},
#  'children': '3, including Lucy',
#  'died': {'after': 0,
#           'before': 0,
#           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727',
#           'precision': 11,
#           'time': '+2018-03-14T00:00:00Z',
#           'timezone': 0},
#  'education': 'University College, Oxford (BA), Trinity Hall, Cambridge (PhD)',
#  'facebook profile': 'stephenhawking',
#  'fields': 'General relativity, quantum gravity',
#  'imdb id': 'nm0370071',
#  'instance of': {'entity-type': 'item', 'id': 'Q5', 'numeric-id': 5},
#  'institutions': 'University of Cambridge, California Institute of Technology, '
#                  'Perimeter Institute for Theoretical Physics',
#  'official website': 'https://hawking.org.uk',
#  'other academic advisors': 'Robert Berman',
#  'resting place': 'Westminster Abbey',
#  'rotten tomatoes id': 'celebrity/stephen_hawking',
#  'thesis': 'Properties of Expanding Universes (1966)',
#  'wikidata aliases': ['Stephen Hawking',
#                       'Hawking',
#                       'Stephen William Hawking',
#                       'S. W. Hawking',
#                       'stephen'],
#  'wikidata description': 'British theoretical physicist, cosmologist and '
#                          'author (1942–2018)',
#  'wikidata id': 'Q17714',
#  'wikidata label': 'Stephen Hawking',
#  'youtube channel': 'UCPyd4mR0p8zHd8Z0HvHc0fw'}

under DuckDuckGoSolver.register_from_file add your new xxx.intent file, where xxx needs to be a key present in the infobox, underscores are replaced with whitespaces

then that infobox value will be mapped to that intent file

Category

Information

Tags

#duckduckgo #query #search-engine #searchengine

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_skill_ddg-0.3.7a4.tar.gz (50.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_skill_ddg-0.3.7a4-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file ovos_skill_ddg-0.3.7a4.tar.gz.

File metadata

  • Download URL: ovos_skill_ddg-0.3.7a4.tar.gz
  • Upload date:
  • Size: 50.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for ovos_skill_ddg-0.3.7a4.tar.gz
Algorithm Hash digest
SHA256 b3f651571cb9d9e15160edfe1b0141497d1d48311e08c771a3e2dae738c9b3bc
MD5 1caac471fdbf1d24d76db0ba5a41739b
BLAKE2b-256 02294977bab7ef243113817d3e6f48d9e4d788bd308598ef208c90d9817b6760

See more details on using hashes here.

File details

Details for the file ovos_skill_ddg-0.3.7a4-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_skill_ddg-0.3.7a4-py3-none-any.whl
Algorithm Hash digest
SHA256 4529c24df4532faf375a6768153e3026cf720727d1e3638b19206da8b4401d01
MD5 f1b5d5e5bf3608179223bc783fa623d5
BLAKE2b-256 9b906f7a8832a8b89e0ede05b9eaa3c91cafd1f5a21fc6ae7f2d34ad893ebf8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page