Skip to content

Commit

Permalink
Fix in missing definition of dialogue state variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jurcicek committed Nov 1, 2013
1 parent 9a36895 commit 90ac9d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions alex/applications/PublicTransportInfoCS/data/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
'system_informs',
'user_informs',
],
'route_alternative': [
# this is necessary to be defined as it is a state variable used by the policy and automatically added to
# the dialogue state
],

# not implemented yet
'transfer_stops': [
Expand Down
6 changes: 2 additions & 4 deletions alex/applications/PublicTransportInfoCS/hdc_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,10 @@ def get_directions(self, dialogue_state, route_type='true'):
departure_time = now
if departure_time_rel not in ['none', 'now']:
trel_parse = datetime.strptime(departure_time_rel, "%H:%M")
departure_time += timedelta(hours=trel_parse.hour,
minutes=trel_parse.minute)
departure_time += timedelta(hours=trel_parse.hour, minutes=trel_parse.minute)
# absolute time
else:
time_parsed = datetime.combine(now,
datetime.strptime(departure_time, "%H:%M").time())
time_parsed = datetime.combine(now, datetime.strptime(departure_time, "%H:%M").time())
time_hour = time_parsed.hour
now_hour = now.hour
# handle 12hr time
Expand Down

0 comments on commit 90ac9d0

Please sign in to comment.