# This is a comment, does it mess things up?
# Frame:Query_WhereAmI
# [leg_num]
# [Active]+
# [user_query]+
#    Prompt: "Ok. What can I do for you ?"
#
# [Depart_Loc]
#    ..[City_Name]
#      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
#      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
#                Have I got that right?"
#      Sql: "p1.cityname = '!%' $(and p1.state = '[Arrive_Loc].[State]') "
#    ..[State]
#    ..[Place_Type]
#    ..[Place_Spec]
#    ..[Place_Name]
#      Prompt: "In order to query the direction , i need to know your location in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) ."
#      Sql: "depart_place like '!%' "
#      Confirm: "Ok I have your location at $([Depart_Loc].[Place_Name] )"
#    ..[Building_Name]
#    ..[address]
#      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
#    ..[Address]
#      Sql: "p1.address = '!%' "
#;

Frame:Query_General
[leg_num]
[Active]+
[user_query]+
    Prompt: "Ok. What can I do for you ?"

[Depart_Loc]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
      Sql: "p1.cityname = '!%' $(and p1.state = '[Arrive_Loc].[State]') "
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
      Prompt: "In order to query the direction , i need to know your location in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) ."
      Sql: "depart_place like '!%' "
      Confirm: "Ok I have your location at $([Depart_Loc].[Place_Name] )"
    ..[Building_Name]*
    ..[Campus_Service_Name]*
    ..[Campus_Name]*
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]
      Sql: "p1.address = '!%' "

[Arrive_Loc]
    ..[City_Name]
      Prompt: "what city $(in [Arrive_Loc].[State]) would you like to go?"
      Confirm: "Ok . I have you arriving in $([Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
      Sql: "p2.cityname = '!%' $(and p2.state = '[Arrive_Loc].[State]')"
    ..[State]
      Prompt: "what state will you arrive in ?"
    ..[Place_Type]*
      Prompt: "where would you like to go $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Sql: "p2.place_type = '!%' "
    ..[Place_Spec]
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Spec]) $([Arrive_Loc].[Place_Type]) ."
      Sql: "p2.place_spec = '!%' "
    ..[Place_Name]*
      Sql: "p2.place_name = '!%' "
      Prompt: "what $([Arrive_Loc].[Place_Type]) would you like to go ?"
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Name]) $([Arrive_Loc].[Place_Type]) .
		Have I got that right?"
      Sql: "p2.place_spec = '!%' "
    ..[Building_Name]*
    ..[Campus_Service_Name]*
    ..[Campus_Name]*
    ..[address]*
    ..[Address]*
      Prompt: "what's your arrival address $(in [Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) ?"
      Sql: "p2.address = '!%' "
      Confirm: "Ok I have you going to $([Arrive_Loc].[address] )  $(in [Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) . Correct ?"

[confirmed]
    Prompt: "Ok. You are $(at [Depart_Loc].[Place_Name] ) in $([Depart_Loc].[City_Name] ) $([Depart_Loc].[State] ) . $(Your departure address is [Depart_Loc].[address] ) . $(you want to go to [Arrive_Loc].[City_Name] $[Arrive_Loc].[State] ) . $(you are looking for [Arrive_Loc].[Place_Name] $[Arrive_Loc].[Place_Type] ) . $(Your arrival address is [Arrive_Loc].[address] ) . Correct?" 

[question_type]
[next_query]
[optimize_mode]
[accept]
[web_query]
[merged_slot]
[selection]
[return]
[final]
;

Frame:Query_Bus
[leg_num]
[Active]+

[Depart_Loc]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
      Prompt: "In order to query the direction , i need to know your location in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) ."
      Confirm: "Ok I have your location at $([Depart_Loc].[Place_Name] )"
    ..[Building_Name]*
    ..[Campus_Service_Name]*
    ..[Campus_Name]*
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]

[Arrive_Near]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
	Sql: "startname like '%!%' "
    ..[Building_Name]
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]
      Sql: "startaddress like '%!%' "

[Arrive_Loc]
    ..[City_Name]
      Prompt: "what city $(in [Arrive_Loc].[State]) would you like to go?"
      Sql: "city like 'Starkville' "
      Confirm: "Ok . I have you arriving in $([Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
      Prompt: "what state will you arrive in ?"
    ..[Place_Type]*
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Sql: "type like '!%' "
    ..[Place_Spec]
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Spec]) $([Arrive_Loc].[Place_Type]) ."
      Sql: "specification like '!%' "
    ..[Place_Name]*
      Sql: "name like '!%' "
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Name]) $([Arrive_Loc].[Place_Type]) .
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"

		Have I got that right?"
    ..[Building_Name]*
      Sql: "name like '%!%'"
    ..[Campus_Name]*
      Sql: "name like '%!%'"
    ..[Campus_Service_Name]*
      Sql: "name like '%!%'"
    ..[address]
    ..[Address]

[confirmed]
    Prompt: "Ok. You are $(at [Depart_Loc].[Place_Name] ) in $([Depart_Loc].[City_Name] ) $([Depart_Loc].[State] ) . $(Your departure address is [Depart_Loc].[address] ) . $(you want to go to [Arrive_Loc].[City_Name] $[Arrive_Loc].[State] ) . $(you are looking for [Arrive_Loc].[Place_Name] $[Arrive_Loc].[Place_Type] ) . $(Your arrival address is [Arrive_Loc].[address] ) . Correct?" 

[user_query]
[question_type]
[next_query]
[optimize_mode]
[accept]
[web_query]
[merged_slot]
[selection]
[return]
[final]
;

Frame:Query_Address
[leg_num]
[Active]+

[Depart_Loc]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
      Prompt: "In order to query the direction , i need to know your location in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) ."
      Confirm: "Ok I have your location at $([Depart_Loc].[Place_Name] )"
    ..[Building_Name]*
    ..[Campus_Service_Name]*
    ..[Campus_Name]*
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]

[Arrive_Near]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
	Sql: "startname like '%!%' "
    ..[Building_Name]
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]
      Sql: "startaddress like '%!%' "

[Arrive_Loc]+
    ..[City_Name]
      Prompt: "what city $(in [Arrive_Loc].[State]) would you like to go?"
      Sql: "city like 'Starkville' "
      Confirm: "Ok . I have you arriving in $([Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
      Prompt: "what state will you arrive in ?"
    ..[Place_Type]*
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Sql: "type like '!%' "
    ..[Place_Spec]
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Spec]) $([Arrive_Loc].[Place_Type]) ."
      Sql: "specification like '!%' "
    ..[Place_Name]*
      Sql: "name like '!%' "
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Name]) $([Arrive_Loc].[Place_Type]) .
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"

		Have I got that right?"
    ..[Building_Name]*
      Sql: "name like '%!%'"
    ..[Campus_Name]*
      Sql: "name like '%!%'"
    ..[Campus_Service_Name]*
      Sql: "name like '%!%'"
    ..[address]
    ..[Address]

[confirmed]
    Prompt: "Ok. You are $(at [Depart_Loc].[Place_Name] ) in $([Depart_Loc].[City_Name] ) $([Depart_Loc].[State] ) . $(Your departure address is [Depart_Loc].[address] ) . $(you want to go to [Arrive_Loc].[City_Name] $[Arrive_Loc].[State] ) . $(you are looking for [Arrive_Loc].[Place_Name] $[Arrive_Loc].[Place_Type] ) . $(Your arrival address is [Arrive_Loc].[address] ) . Correct?" 

[user_query]
[question_type]
[next_query]
[optimize_mode]
[accept]
[web_query]
[merged_slot]
[selection]
[return]
[final]
;

Frame:Query_List
[leg_num]
[Active]+

[Depart_Loc]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
      Prompt: "In order to query the direction , i need to know your location in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) ."
      Confirm: "Ok I have your location at $([Depart_Loc].[Place_Name] )"
    ..[Building_Name]*
    ..[Campus_Service_Name]*
    ..[Campus_Name]*
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]

[Arrive_Near]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
	Sql: "startname like '%!%' "
    ..[Building_Name]
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]
      Sql: "startaddress like '%!%' "

[Arrive_Loc]+
    ..[City_Name]
      Prompt: "what city $(in [Arrive_Loc].[State]) would you like to go?"
      Confirm: "Ok . I have you arriving in $([Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
      Prompt: "what state will you arrive in ?"
    ..[Place_Type]*
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Sql: "type like '!%' "
    ..[Place_Spec]
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Spec]) $([Arrive_Loc].[Place_Type]) ."
      Sql: "specification like '!%' "
    ..[Place_Name]*
      Sql: "name like '!%' "
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Name]) $([Arrive_Loc].[Place_Type]) .
		Have I got that right?"
    ..[Building_Name]*
      Sql: "building like '%!%'"
    ..[address]
    ..[Address]

[confirmed]
    Prompt: "Ok. You are $(at [Depart_Loc].[Place_Name] ) in $([Depart_Loc].[City_Name] ) $([Depart_Loc].[State] ) . $(Your departure address is [Depart_Loc].[address] ) . $(you want to go to [Arrive_Loc].[City_Name] $[Arrive_Loc].[State] ) . $(you are looking for [Arrive_Loc].[Place_Name] $[Arrive_Loc].[Place_Type] ) . $(Your arrival address is [Arrive_Loc].[address] ) . Correct?" 

[user_query]
[question_type]
[next_query]
[optimize_mode]
[accept]
[web_query]
[merged_slot]
[selection]
[return]
[final]
;

Frame:Query_Intersect
[leg_num]
[Active]+

#this thing is missing Arrive_First, Arrive_Second, etc
[Depart_Loc]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
      Prompt: "In order to query the direction , i need to know your location in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) ."
      Confirm: "Ok I have your location at $([Depart_Loc].[Place_Name] )"
    ..[Building_Name]*
    ..[Campus_Service_Name]*
    ..[Campus_Name]*
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]

[Arrive_Near]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
	Sql: "startname like '%!%' "
    ..[Building_Name]
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]
      Sql: "startaddress like '%!%' "

[Arrive_Loc]
    ..[City_Name]
      Prompt: "what city $(in [Arrive_Loc].[State]) would you like to go?"
      Confirm: "Ok . I have you arriving in $([Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
      Prompt: "what state will you arrive in ?"
    ..[Place_Type]*
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Sql: "type like '!%' "
    ..[Place_Spec]
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Spec]) $([Arrive_Loc].[Place_Type]) ."
      Sql: "specification like '!%' "
    ..[Place_Name]*
      Sql: "name like '!%' "
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Name]) $([Arrive_Loc].[Place_Type]) .
		Have I got that right?"
    ..[Building_Name]*
      Sql: "building like '%!%'"
    ..[address]
    ..[Address]

[Arrive_Second]+
    ..[City_Name]
      Prompt: "what city $(in [Arrive_Loc].[State]) would you like to go?"
      Confirm: "Ok . I have you arriving in $([Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
      Prompt: "what state will you arrive in ?"
    ..[Place_Type]*
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Sql: "type like '!%' "
    ..[Place_Spec]
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Spec]) $([Arrive_Loc].[Place_Type]) ."
      Sql: "specification like '!%' "
    ..[Place_Name]*
      Sql: "name like '!%' "
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Name]) $([Arrive_Loc].[Place_Type]) .
		Have I got that right?"
    ..[Building_Name]*
      Sql: "building like '%!%'"
    ..[address]
    ..[Address]*
      Sql: "*location like '%!%'" 

[Arrive_First]+
    ..[City_Name]
      Prompt: "what city $(in [Arrive_Loc].[State]) would you like to go?"
      Confirm: "Ok . I have you arriving in $([Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
      Prompt: "what state will you arrive in ?"
    ..[Place_Type]*
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Sql: "type like '!%' "
    ..[Place_Spec]
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Spec]) $([Arrive_Loc].[Place_Type]) ."
      Sql: "specification like '!%' "
    ..[Place_Name]*
      Sql: "name like '!%' "
      Prompt: "what place are you looking for $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Name]) $([Arrive_Loc].[Place_Type]) .
		Have I got that right?"
    ..[Building_Name]*
      Sql: "building like '%!%'"
    ..[address]
    ..[Address]*
      Sql: "*location like '%!%'"


[confirmed]
    Prompt: "Ok. You are $(at [Depart_Loc].[Place_Name] ) in $([Depart_Loc].[City_Name] ) $([Depart_Loc].[State] ) . $(Your departure address is [Depart_Loc].[address] ) . $(you want to go to [Arrive_Loc].[City_Name] $[Arrive_Loc].[State] ) . $(you are looking for [Arrive_Loc].[Place_Name] $[Arrive_Loc].[Place_Type] ) . $(Your arrival address is [Arrive_Loc].[address] ) . Correct?" 

[user_query]
[question_type]
[next_query]
[optimize_mode]
[accept]
[web_query]
[merged_slot]
[selection]
[return]
[final]
;

Frame:Query_Direction
[leg_num]
[Active]+

[Depart_Loc]+
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]*
      Prompt: "where are you leaving from in $([Depart_Loc].[City_Name] ) $([Depart_Loc].[State] ) ?"
    ..[Place_Spec]
    ..[Place_Name]*
      Sql: "p1.name like '!%' "
    ..[Building_Name]*
      Sql: "p1.name like '%!%' "
    ..[Campus_Service_Name]*
      Sql: "p1.name like '%!%' "
    ..[Campus_Name]*
      Sql: "c1.building =p1.name and c1.name like '%!%' "
    ..[address]*
    ..[Address]*
      Sql: "p1.address like '!%' "
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"

[Arrive_Loc]+
    ..[City_Name]
      Prompt: "what city $(in [Arrive_Loc].[State]) would you like to go?"
      Confirm: "Ok . I have you arriving in $([Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
      Sql: "p2.city like '!%' $(and p2.state like '[Arrive_Loc].[State]') "
    ..[State]
      Prompt: "what state will you arrive in ?"
    ..[Place_Type]*
      Prompt: "where would you like to go $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
    ..[Place_Spec]
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Spec]) $([Arrive_Loc].[Place_Type]) ."
    ..[Place_Name]*
      Sql: "p2.name like '!%' "
      Prompt: "what $([Arrive_Loc].[Place_Type]) would you like to go ?"
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Name]) $([Arrive_Loc].[Place_Type]) .
		Have I got that right?"
    ..[Building_Name]*
      Sql: "p2.name like '%!%' "
    ..[Campus_Service_Name]*
      Sql: "p2.name like '%!%' "
    ..[Campus_Name]*
      Sql: " c2.building=p2.name and c2.name like '%!%' "
    ..[address]*
    ..[Address]*
      Sql: "p2.address like '!%' "

[Depart_Near]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
	Sql: "p1.startname like '%!%' "
    ..[Building_Name]
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]
      Sql: "p1.startaddress like '%!%' "

[Arrive_Near]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
	Sql: "p2.startname like '%!%' "
    ..[Building_Name]
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]
      Sql: "p2.startaddress like '%!%' "



[confirmed]
    Prompt: "Ok. You are $(at [Depart_Loc].[Place_Name] ) in $([Depart_Loc].[City_Name] ) $([Depart_Loc].[State] ) . $(Your departure address is [Depart_Loc].[address] ) . $(you want to go to [Arrive_Loc].[City_Name] $[Arrive_Loc].[State] ) . $(you are looking for [Arrive_Loc].[Place_Name] $[Arrive_Loc].[Place_Type] ) . $(Your arrival address is [Arrive_Loc].[address] ) . Correct?" 

[user_query]
[question_type]
[next_query]
[optimize_mode]
[accept]
[web_query]
[merged_slot]
[selection]
[return]
[final]
;

Frame:Query_Distance
[leg_num]
[Active]+

[Depart_Loc]+
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]*
      Prompt: "where are you leaving from in $([Depart_Loc].[City_Name] ) $([Depart_Loc].[State] ) ?"
    ..[Place_Spec]
    ..[Place_Name]*
      Sql: "p1.name like '!%' "
    ..[Building_Name]*
      Sql: "p1.name like '%!%' "
    ..[Campus_Service_Name]*
      Sql: "p1.name like '%!%' "
    ..[Campus_Name]*
      Sql: "c1.building =p1.name and c1.name like '%!%' "
    ..[address]*
    ..[Address]*
      Sql: "p1.address like '!%' "
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"

[Arrive_Loc]+
    ..[City_Name]
      Prompt: "what city $(in [Arrive_Loc].[State]) would you like to go?"
      Confirm: "Ok . I have you arriving in $([Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
      Sql: "p2.city like '!%' $(and p2.state like '[Arrive_Loc].[State]') "
    ..[State]
      Prompt: "what state will you arrive in ?"
    ..[Place_Type]*
      Prompt: "where would you like to go $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
    ..[Place_Spec]
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Spec]) $([Arrive_Loc].[Place_Type]) ."
    ..[Place_Name]*
      Sql: "p2.name like '!%' "
      Prompt: "what $([Arrive_Loc].[Place_Type]) would you like to go ?"
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Name]) $([Arrive_Loc].[Place_Type]) .
		Have I got that right?"
    ..[Building_Name]*
      Sql: "p2.name like '%!%' "
    ..[Campus_Service_Name]*
      Sql: "p2.name like '%!%' "
    ..[Campus_Name]*
      Sql: "c2.building =p2.name and c2.name like '%!%' "
    ..[address]*
    ..[Address]*
      Sql: "p2.address like '!%' "


[Depart_Near]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
	Sql: "startname like '%!%' "
    ..[Building_Name]
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]
      Sql: "startaddress like '%!%' "

[Arrive_Near]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
	Sql: "startname like '%!%' "
    ..[Building_Name]
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]
      Sql: "startaddress like '%!%' "


[confirmed]
    Prompt: "Ok. You are $(at [Depart_Loc].[Place_Name] ) in $([Depart_Loc].[City_Name] ) $([Depart_Loc].[State] ) . $(Your departure address is [Depart_Loc].[address] ) . $(you want to go to [Arrive_Loc].[City_Name] $[Arrive_Loc].[State] ) . $(you are looking for [Arrive_Loc].[Place_Name] $[Arrive_Loc].[Place_Type] ) . $(Your arrival address is [Arrive_Loc].[address] ) . Correct?" 

[user_query]
[question_type]
[next_query]
[optimize_mode]
[accept]
[web_query]
[merged_slot]
[selection]
[return]
[final]
;


Frame:Query_Building
[leg_num]
[Active]+

[Depart_Loc]
    ..[City_Name]
      Prompt: "which city $(in [Depart_Loc].[State]) are you in?"
      Confirm: "Oops let's try again I have you in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
    ..[Place_Type]
    ..[Place_Spec]
    ..[Place_Name]
      Prompt: "In order to query the direction , i need to know your location in $([Depart_Loc].[City_Name] ) $([Arrive_Loc].[State] ) ."
      Confirm: "Ok I have your location at $([Depart_Loc].[Place_Name] )"
    ..[address]
      Confirm: "Ok I have your location at $([Depart_Loc].[address] ) . Correct ?"
    ..[Address]

[Arrive_Loc]+
    ..[City_Name]
      Prompt: "what city $(in [Arrive_Loc].[State]) would you like to go?"
      Confirm: "Ok . I have you arriving in $([Arrive_Loc].[City_Name] ) $([Arrive_Loc].[State] ) .
                Have I got that right?"
    ..[State]
      Prompt: "what state will you arrive in ?"
    ..[Place_Type]
      Prompt: "where would you like to go $(in [Arrive_Loc].[City_Name]) $([Arrive_Loc].[State]) ?"
    ..[Place_Spec]
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Spec]) $([Arrive_Loc].[Place_Type]) ."
    ..[Campus_Name]+
      Prompt: "say the place name again please ?"
      Confirm: "I have you looking for a $([Arrive_Loc].[Place_Name]) $([Arrive_Loc].[Place_Type]) .
		Have I got that right?"
      Sql: "name like '%!%' "
    ..[Building_Name]
    ..[address]
    ..[Address]

[confirmed]
[user_query]
[question_type]
[next_query]
[accept]
[web_query]
[merged_slot]
[selection]
[return]
[final]
;

Frame:Query
[leg_num]
[Active]+
[Help]
[accept]
[web_query]
[merged_slot]
[selection]
[Hotel]
;

# This is left over from the airplane with they would close you
# out with this stuff
#
# Frame:Closing
# [Summarize]+
#    Prompt:  "would you like a summary of your itinerary"
# [Email]+
#    Prompt: "should I email this itinerary to you"
# ;

# This is left over from the airplane when they would retrieve
# feedback as to how the experience with the tripmanager went
#
#Frame:Feedback
#[Success]+
#    Prompt: "did you get the information you were seeking"
#[Real]+
#    Prompt: "are you really going to take such a trip"
#;

Frame:Respond
[Yes]
[No]
[Accept]
[Repeat]
[Reset]
[Anything]
[Help]
;

Frame:Closing
[Summarize]+
    Prompt:  "would you like a summary of your itinerary"
[Email]+
    Prompt: "should I email this itinerary to you"
[Success]+
    Prompt: "did you get the information you were seeking"
[Real]+
    Prompt: "are you really going to take such a trip"
[Dummy]
;

