Class Definition

class @com.icanhazdadjoke #_[thingpedia_name="Dad Jokes"] #_[thingpedia_description="Ask for a joke"] #_[canonical="dad jokes"] #_[name="Dad Jokes"] #_[description="Ask for a joke"] #[license="BSD-3-Clause"] #[license_gplcompatible=true] #[subcategory=enum service] #[version=14] #[package_version=14] { import loader from @org.thingpedia.v2(); import config from @org.thingpedia.config.none(); entity id #_[description="Joke ID"] #[has_ner=false]; query get(in opt query : String #_[canonical={ base=["topic", "search term", "query"], property=["# topic"], preposition=["about #"], adjective=["#"] }] #[string_values="tt:word"], out id : Entity(com.icanhazdadjoke:id) #_[canonical="id"], out text : String #_[canonical={ base=["text", "content"], verb=["say #"], passive_verb=["saying #"] }]) #_[result=["${text}"]] #_[canonical="joke"] #_[on_error={ no_joke_available=["i do not have any joke about ${query}", "there are no jokes about ${query}", "there are no jokes at the moment"] }] #[minimal_projection=["id", "text"]] #[doc="get a joke"] #[confirm=false]; }

Dataset

dataset @com.icanhazdadjoke #[language="en"] { query = @com.icanhazdadjoke.get() #_[utterances=[", tell me a joke"]] #[id=62939303] #[name="Get"]; }