| 116 | See `kordisbot` app for detailed example. To enable recognition of all stops and street names, special concepts were defined (`Ulice-concept.top` and `Zastavky-concept.top`) with the list of accepted names. |
| 117 | |
| 118 | Timetable search is running as a service, see `scripts/kordisbot_service.py`. On user question, dialog just calls specific function, eg. |
| 119 | |
| 120 | {{{ |
| 121 | u:("[řekni ukaž zobraz najdi] {mi} [odjezdy spoje] ze zastávky _~station_name na zastávku _~station_name") |
| 122 | ^call(DialogKordisbot.say_answer2($1,$2,1)) |
| 123 | }}} |
| 124 | |
| 125 | Service functions `say_answer1` and `say_answer2` are directly generating robot answer sentence. |
| 126 | |
| 127 | Connection map is displayed on the tablet, using usual map from idos.cz with the connection parameters: |
| 128 | |
| 129 | {{{ |
| 130 | self.s.ALTabletService.showWebview("http://mapy.idos.cz/idsjmk/?f={}&t={}&date={}&time={}&submit=true".format( |
| 131 | fromStop, toStop, date, time)) |
| 132 | }}} |