# file: $ISIP_BASE/app/communicator/kb/Grammar/query_direction.gra
# version: $Id: query_direction.gra 9945 2005-02-11 20:22:11Z elliott $
#

############### Query Direction Rules #################
[query_direction]
	(*[what_way] [Query_Direction] [depart_arrive] *[what_way])
	(*[what_way] [Query_Direction] [arriveloc] *[what_way])
	(*[what_way] [Query_Direction] [departloc] *[what_way])
	([Query_Direction] [Arrive_Loc] *located *[what_way])
	([Query_Direction] *[what_way])
;

[Query_Direction]
	([_query_map])
	([_query_ispossible])
	([_which_way])
	([_query_turn])
;

[_query_map]
#A- SAMPLE UTTERANCES COVERED BY THE FOLLOWING GRAMMAR
#1- how do i get to the holiday inn from the erc
#2- list me the directions to the holiday inn from the erc
#3- what directions can i use to get to the holiday inn from the erc
#4- what is the best way to get to the holiday inn from the erc
#5- can you tell me the directions to get to the holiday inn from the erc
#6- how can i make it to the holiday inn from the erc
#7- what is the best route to get from the Golden Triangle Airport to Engineering Research Center
#8- what is your suggestion for the direction from walmart to kroger
#9- from the erc, how do you get to the post office
#10- to the erc, how do you get from the post office
#11- i'm at the intersection of Main and Lampkin, i'd like to go to the Nearest NBC bank
#12- i'm at NBC, how do i get back to the college of Agriculture
#13- how to get to the erc from airport
#14- how do you think I can get to the Holiday Inn from the ERC exit
#15- what direction do you think i can use to get to the Holiday Inn from the ERC exit
#16- i am off Hampton Inn, how do i get to Aspen Bay Candle company
#17- let me have the direction to walmart near kroger
#18- i want to go to kroger on hwy 82, get me there
	(*[what_way] [depart_arrive])
	([whats] *[the] [direction] CAN_I)
	(I_WOULD HOW CAN I KNOW)
	(HOW CAN I GET_GO FAR)
	(HOW to GET_GO *[what_way])
	(*let *[me] SHOW *[me] SPEC_WAY [arriveloc])
	(I WISH FAR)
	(*[departloc] WHATWAY [arriveloc])
	([arriveloc] WHATWAY *[departloc])

#B- SAMPLE UTTERANCES COVERED BY THE FOLLOWING GRAMMAR
#1- where is Human Resources, how do i get there from dean of engineering
#2- i'm at dorman hall, and i need to see someone in human resources, where is human resources located
#3- i'm at the intersection of south jackson and gillespie, and i need get some cash from the bank, where is the bank located
#4- where is walmart, what is the direction from wendy's
#5- what direction is to walmart near kroger how can i drive there from wendy's
	(*[whats] FAR SHOW_WAY *[departloc])
	(*SHOW_WAY [arriveloc] [what_way] *[departloc])

#C- SAMPLE UTTERANCES COVERED BY THE FOLLOWING GRAMMAR
#1- i need to get back to walmart from kroger
#2- we want to go from walmart to kroger
	(*IWANT *GET_GO [departloc] [arriveloc])
	(*IWANT *GET_GO [arriveloc] [departloc])

#D- SAMPLE UTTERANCES COVERED BY THE FOLLOWING GRAMMAR
#1- i need direction that takes me to hibbett's
#2- can you show me the map for the direction to richey's restaurant
#3- can you get the map which shows the direction to erc
	(*CAN *I NEED *[me] SPEC_WAY [which] *CAN GETS *[me] *SPEC_WAY)
	(*CAN *I SHOW *[me] *[the] [direction] [of] SPEC_WAY *to *GET_GO)

#E- SAMPLE UTTERANCES COVERED BY THE FOLLOWING GRAMMAR
#1- i need the name of the business building at mississippi state university and directions to it from the hunter henry center
	(FAR *and [direction] to [that] from NEAR)

#F- SAMPLE UTTERANCES COVERED BY THE FOLLOWING GRAMMAR
#1- where is taco bell from waffle house
	(where [is] FAR from NEAR)

#G- SAMPLE UTTERANCES COVERED BY THE FOLLOWING GRAMMAR
#1- i'm at the corner of main and south jackson, i'd like to go to grocery store, i prefer kroger's
#2- i'm at the intersection of south jackson and gillespie, and i need get some cash from the bank, where is the bank located
#3- i'm at dorman hall, and i need to see someone in human resources, where is human resources located
	(*I WANTING PREFER FAR *located *[what_way])
	(*[on] [some_place] PREFER FAR *located *[what_way])

#I- SAMPLE UTTERANCES COVERED BY THE FOLLOWING GRAMMAR
#1- first i will go to walmart from here and then to kroger, direction please
	(*to FAR1 [departloc] *and THEN [arriveloc])

THEN
	(then)
	(next)
	(following [the])
WANTING
	(WANTS *to *GET_GO *[on] *[the] [some_place])
	(WANTS [doing_things])
	(WANTS *to DO *[on] *[the] [some_place])
	(CAN GET_GO *[on] *[the] [some_place])
	(WANTS [get] *[the] [some_place] [on] *[the] [some_place])
WANTS
	([want])
	([wants])
DO
	(buy)
	([get])
	(talk to ONE)
	(see ONE)
	(do [any])
ONE
	(somebody)
	(someone)
	(*MY friend)
	([the])
MY
	([its])
	([my])
PREFER
	([i] [want])
	(for example)
	(for instance)
	([how] about)
	([whats])
SHOW_WAY
	([whats] SPEC_WAY *CAN *to *GET_GO)
	(HOW CAN [i] GET_GO *there)
	(*SHOW *[me] HOW to GET_GO *there)
	(*SHOW *[me] HOW [i] CAN GET_GO *there)
WISH
	([want])
	([wants])
	(look for)
	(looks for)
WHATWAY
	([what_way])
	(*I *CAN WANT *to *GET_GO *HOW_TO *to *GET_GO)
CAN_I
	(CAN I *KNOW)
	(CAN TAKE [me])
	(to TAKE *to FAR)
	([is] *to FAR)
	([on] [how] to GET_GO)
GETS
	([gets])
	([get])
	([take])
	([takes])
	([show])
	([shows])
NEED
	([want])
	([get])
	([is] looking for)
	(THINK *[of])
	(SHOW *[get])
TAKE
	(USE)
	([take])
WANT
	([want] SPEC_WAY)
	([is] looking for)
WHICH
	(*[on] [which])
	(where) 
IWANT
	([i_want])
	([i] [can])
MAKE
	([want] SPEC_WAY *to *GET_GO *to)
	([want] to GET_GO *to)
KNOW
	(*USE *to GET_GO *[me])
	(*USE *to GET_GO FAR)
	([is] *[its] *[suggestion] GET_THERE *to)
	(SHOW *[me] *HOW_TO *to GET_GO *[me])
	(SHOW *[me] *HOW_TO *to GET_GO FAR)
	(THINK *[i] *CAN *to USE *to *GET_GO *[me])
	(THINK *[i] *CAN *to USE *to *GET_GO FAR)
USE
	(GET_GO)
	(use)
THINK
	([think])
	([suggest] *[of] *[me])
HOW_TO
	(*[of] *THE *WAY)
	([how])
THE
	([the])
	([my])
WAY
	(to GET_GO)
	(SPEC_WAY *to)
I_WOULD
	(*I *CAN [want] *to *[know])
	([doing_things] DIST)
DIST
	(mileage)
	(distance)
GET_THERE
	(*[of] SPEC_WAY *to *GET_GO *THERE)
THERE
	(*[of] there)
	(*[of] *[the] [an_address])
SHOW
	([get])
	([show])
	([tell])
	([suggest])
	([take])
	(be)
	(let [me] [get])
HOW
	([how])
	([whats] SPEC_WAY)
GET_GO
	([get] *back)
	([go] *back)
	(make *it *back)
	(*drive *to get)
	(arrive)
	([know])
SPEC_WAY
	(*[the] *[spec_way] *[direction])
	(*[the] *[spec_way] [direction])
I
	([i])
	([i_m])
CAN
	([can])
	([is])
FAR
	([Arrive_Loc] *[Arrive_Near])
FAR1
	([Arrive_First])
NEAR
	([Depart_Loc] *[Depart_Near])
;

[_which_way]
#J- SAMPLE UTTERANCES COVERED BY THE FOLLOWING GRAMMAR
#1- is dr. josey's office north or south of walmart
#2- is kroger east or west from here
#3- should i go to east or west if i want to get to the academy
#3- should i go to east or west to find dr john doe's home
	([is] FAR DIRECTION [of] FAR1)
	([is] FAR DIRECTION)
	(*GET_GO DIRECTION *[once] *I *CAN *to *WANT *to *GET_GO)

WANT
	([want])
	([wants])
I
	([i])
	([i_m])
CAN
	([can])
	([is])
GET_GO
	([get] *back)
	([go] *back)
	(make *it *back)
	(*drive *to get)
	(arrive)
DIRECTION
	(east *or *west)
	(west *or *east)
	(north *or *south)
	(south *or *north)
NEAR
	([Depart_Loc] *[Depart_Near])
FAR
	([Arrive_Loc] *[Arrive_Near])
FAR1
	([Arrive_First])
;

[_query_turn]
	(*[i_m] *[on] NEAR [whats] *[its] FAR)
	(*IF_I *FAR1 CAN I *HAVE FAR)
	(*IF_I *FAR1 CAN I *HAVE FAR [on] FAR1)

HAVE
	([get] *[the])
	(have *[the])
	(make *[the])
	(take *[the])
IF_I
	(*[once] *I *CAN *WANT *to GET_GO *to)
WANT
	([want])
	([wants])
I
	([i])
	([i_m])
CAN
	([can])
	([is])
GET_GO
	([get] *back)
	([go] *back)
	(make *it *back)
	(arrive)
NEAR
	([Depart_Loc] *[Depart_Near])
FAR
	([Arrive_Loc] *[Arrive_Near])
FAR1
	([Arrive_First])
;

[_query_ispossible]
#I- SAMPLE UTTERANCES COVERED BY THE FOLLOWING GRAMMAR
#1- is it possible to get from kroger near walmart to wendy's near mcdonald's
#2- is it possible that there is a route between walmart and kroger 
#3- is there any way to go from walmart to kroger
#4- do they have a direction from walmart to kroger
	(*[how] CAN it *be possible THAT)
	([is] there WAY *to *GET_GO)
THAT
	(to GET_GO)
	([which] there [is] WAY)
WAY
	(*[the] *[spec_way] [direction])
CAN
	([is])
	([can])
GET_GO
	([get] *back)
	([go] *back)
	(make *it *back)
	(arrive)
;

#J- SOME AUXILIARY UTTERANCES THAT MAY FOLLOW REAL UTTERANCES
#1- get me there
#2- how can i go there
#3- please direct me to that location
#4- which direction should i follow
#5- can you show me the direction
#6- how to get there
#7- what is your suggestion for direction to there
#8- let me have the direction to that place
#9- how do you think i should go
#10- i will prefer the shortest direction
#11- can you tell us
[what_way]
	(*DIRECTION *PLEASE *CAN *[i] *SHOW *[me] DIRECTION)
	(DIRECTION *PLEASE *CAN *[i] *SHOW *[me] *DIRECTION)
	(WHATS)
DIRECTION
	(GET_THERE)
	(THERE)
	(WHATS)
	([whats] [that] [is])
WHATS
	(*HOW *CAN *[i] USE *[me] *to *GET_THERE)
	(*HOW *[i] *CAN USE *[me] *to *GET_THERE)
	([whats] *[its] *[suggestion] *GET_THERE *[on])
	(*[i] *CAN USE *GET_THERE)
	(*I [want] SPEC_WAY *to *[get] *[that])
GET_THERE
	(GET_GO)
	(THERE)
	(*[of] SPEC_WAY *to *GET_GO *THERE)
PLEASE
	(*CAN *[i] please)
USE
	(use)
	([take])
	(follow)
	(SPEC_WAY)
	(HEADED)
	(GET_GO)
	([want])
	([think] [i] CAN)
	(help)
THERE
	([that])
	(*[of] there)
HEADED
	(go)
	(be going)
	(be headed)
	(be heading)
SHOW
	([get])
	([show])
	([tell])
	([suggest])
	([want])
	([take])
	(lead)
	(CAN I help [me])
HOW
	([whats])
	([how] *to)
	(*to [whats] SPEC_WAY)
GET_GO
	([get] *back)
	([go] *back)
	(make *it *back)
SPEC_WAY
	(*[the] *[spec_way] [direction]) 
I
	([i])
	([i_m])
CAN
	([can])
	([is])
	(let [me])
;

[spec_way]
	(good)
	(better)
	(best)
	(shortest)
	(short)
	(shorter)
	(back)
	(most scenic)
	(fast)
	(faster)
	(fastest)
	(quick)
	(quicker)
	(quickest)
	(alternate)
	(easy)
	(easier)
	(easiest)
	(far)
	(farther)
	(farthest)
	(*[the] *most convenient)
;

[direction]
	(direction)
	(directions)
	(route)
	(routes)
	(way)
	(path)
	(course)
	(map)
	(road)
	(roads)
	(shortcut)
;


