Exercise 26: Web queries

Summary

To be useful, an in-house AI needs to be able to answer questions that involve getting data from the web.

At its base level, this will be handled as a linguistic transformation. For example:

what temperature is it outside? -> temperature()

A new mapping type called Programs will be defined, which will associate function names with their implementations. For example:

temperature -> Plato.Programs.Temperature.Query

Optionally, a DLL name can be specified:

temperature -> plato.dll: Plato.Programs.Temperature.Query

Arguments can be specified as well:

what's the current temperature in {city} ? -> city_temperature($1)

city_temperature -> Plato.Programs.Temperature.CityQuery

All arguments are of type string and consist of the entity's ID. The function return value is also a string.

Implement the Query and CityQuery functions mentioned here.