From sveta at cs.sunysb.edu Mon Oct 2 12:32:40 2006 From: sveta at cs.sunysb.edu (Svetlana Stenchikova) Date: Mon, 2 Oct 2006 12:32:40 -0400 (EDT) Subject: RavenclawDev: RavenClawDev: reusing agents in another part of a tree In-Reply-To: <1546B8BE23C96940B5B4929DB7CC2343908EF7@e2k3.srv.cs.cmu.edu> References: <1546B8BE23C96940B5B4929DB7CC2343908EF7@e2k3.srv.cs.cmu.edu> Message-ID: Hi, I would like to reuse the agents for requesting date/time in another branch of my dialog tree. These agents may have slightly different prompts and fill out different concepts (of the same type). Is it possible to implement this without the duplication of the agents? thank you To illustrate, my tree is as following: DECLARE_AGENT(CTask) DECLARE_AGENT(CHowMayIHelpYou) DECLARE_AGENT(CHowMayIHelpYouAgain) DECLARE_AGENT(CDebugInformCommand) DECLARE_AGENT(CTaskAddEvent) DECLARE_AGENT(CGetQuery) DECLARE_AGENT(CRequestDateTime) DECLARE_AGENT(CRequestWhen) DECLARE_AGENT(CRequestDay) DECLARE_AGENT(CRequestTime) DECLARE_AGENT(CRequestSpecificTimes) DECLARE_AGENT(CRequestStartTime) DECLARE_AGENT(CRequestEndTime) DECLARE_AGENT(CDisambiguateDate) DECLARE_AGENT(CRequestUnambiguousDate) DECLARE_AGENT(CNeitherDate) DECLARE_AGENT(CFirstDate) DECLARE_AGENT(CSecondDate) DECLARE_AGENT(CPastDate) DECLARE_AGENT(CWrongTimeOrder) DECLARE_AGENT(CComputeEndTimeFromDuration) DECLARE_AGENT(CWrongDuration) DECLARE_AGENT(CDBAddEvent) DECLARE_AGENT(CInformAddedEvent) DECLARE_AGENT(CTaskListEvents) DECLARE_AGENT(CQueryFilter) DECLARE_AGENT(CInformQueryFilter) DECLARE_AGENT(CConfirmQueryFilter) DECLARE_AGENT(CRequestQueryEventsDateTime) /*here would be a duplication of the CRequestDateTime branch*/ DECLARE_AGENT(CRequestQueryEventsType) DECLARE_AGENT(CDBGetEvents) DECLARE_AGENT(CListEvents) DECLARE_AGENT(CExpectAddCommand) /* add event command*/ DECLARE_AGENT(CExpectQueryCommand) /* add event command*/ --------------------------------------------------------- Svetlana Stenchikova, Ph.D. Candidate Computer Science Department, Stony Brook University http://cs.sunysb.edu/~sveta sveta at cs.sunysb.edu --------------------------------------------------------- From antoine at cs.cmu.edu Wed Oct 4 09:41:38 2006 From: antoine at cs.cmu.edu (Antoine Raux) Date: Wed, 4 Oct 2006 09:41:38 -0400 Subject: RavenclawDev: FW: Meeting this week? Thursday before Sphinx lunch? Message-ID: <008101c6e7ba$d127af10$03bd0280@sp.cs.cmu.edu> Sorry guys, I had sent this to the wrong email address. _____ From: Antoine Raux [mailto:antoine at cs.cmu.edu] Sent: Monday, October 02, 2006 5:02 PM To: 'RavenClaw Developers' Subject: Meeting this week? Thursday before Sphinx lunch? Hi people, Thomas and I were discussing various Olympus issues and we thought it would be a good idea to meet soon. Thomas can't make it on Wednesday so what about Thursday 11:30? Agenda items (non-exhaustive): - How to keep the Visual Studio 2005 / 2003 branches of Olympus sync? Can we have a version-independent "makefile" type of script for VS so that Olympus developers could work with whatever version of VS they have? - The ProcessMonitor. Let's clean it up! Thomas and to some extent Antoine already worked on this but let's make a concerted effort to 1) get rid of the (hazardous) junk in there, 2) add really useful functionalities. We can decide on which features we'd want at the meeting. - Towards a RavenClaw debugger? The idea was (re)thrown by J and Udhay last week. What do we need? Who can do it? - VoIP/Asterisk? Any other topic is welcome too. Please let me know if the time of the meeting fits your schedule. antoine -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061004/51d92a9b/attachment-0001.html From dbohus at cs.cmu.edu Wed Oct 4 09:44:20 2006 From: dbohus at cs.cmu.edu (Dan Bohus) Date: Wed, 4 Oct 2006 09:44:20 -0400 Subject: RavenclawDev: FW: Meeting this week? Thursday before Sphinx lunch? In-Reply-To: <008101c6e7ba$d127af10$03bd0280@sp.cs.cmu.edu> Message-ID: <1546B8BE23C96940B5B4929DB7CC234390995B@e2k3.srv.cs.cmu.edu> Thursday 11:30 works for me. -Dan ________________________________ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of Antoine Raux Sent: Wednesday, October 04, 2006 9:42 AM To: 'Dialog Group CMU' Subject: RavenclawDev: FW: Meeting this week? Thursday before Sphinx lunch? Sorry guys, I had sent this to the wrong email address... ________________________________ From: Antoine Raux [mailto:antoine at cs.cmu.edu] Sent: Monday, October 02, 2006 5:02 PM To: 'RavenClaw Developers' Subject: Meeting this week? Thursday before Sphinx lunch? Hi people, Thomas and I were discussing various Olympus issues and we thought it would be a good idea to meet soon. Thomas can't make it on Wednesday so what about Thursday 11:30? Agenda items (non-exhaustive): - How to keep the Visual Studio 2005 / 2003 branches of Olympus sync? Can we have a version-independent "makefile" type of script for VS so that Olympus developers could work with whatever version of VS they have? - The ProcessMonitor... Let's clean it up! Thomas and to some extent Antoine already worked on this but let's make a concerted effort to 1) get rid of the (hazardous) junk in there, 2) add really useful functionalities. We can decide on which features we'd want at the meeting. - Towards a RavenClaw debugger? The idea was (re)thrown by J and Udhay last week. What do we need? Who can do it? - VoIP/Asterisk? Any other topic is welcome too... Please let me know if the time of the meeting fits your schedule. antoine -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061004/196af686/attachment.html From basiamucha at gmail.com Wed Oct 4 10:15:46 2006 From: basiamucha at gmail.com (Basia Mucha) Date: Wed, 4 Oct 2006 10:15:46 -0400 Subject: RavenclawDev: RavenClawDev: reusing agents in another part of a tree In-Reply-To: References: <1546B8BE23C96940B5B4929DB7CC2343908EF7@e2k3.srv.cs.cmu.edu> Message-ID: <727b4d390610040715k2dc1a33er7a5928b9747a21f1@mail.gmail.com> Received frame: {c java_be.get_events :hub_opaque_data {c admin_info :reply_requested 1 :session_id "Default" :invoked_stype "java_be" :tidx 12 :provider_id "[8]" :timestamp [array: type GAL_FLOAT_64, 1 elements] :scriptless 1 } :session_id "Default" :tidx 12 :inframe "{ event_query { event_type CLASS } } " } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061004/c3f2d42c/attachment.html From basiamucha at gmail.com Wed Oct 4 10:22:03 2006 From: basiamucha at gmail.com (Basia Mucha) Date: Wed, 4 Oct 2006 10:22:03 -0400 Subject: RavenclawDev: RavenClawDev: reusing agents in another part of a tree In-Reply-To: <727b4d390610040715k2dc1a33er7a5928b9747a21f1@mail.gmail.com> References: <1546B8BE23C96940B5B4929DB7CC2343908EF7@e2k3.srv.cs.cmu.edu> <727b4d390610040715k2dc1a33er7a5928b9747a21f1@mail.gmail.com> Message-ID: <727b4d390610040722x79eb12d0h57135cc22d865fc4@mail.gmail.com> Sorry for the last email, I pressed send by mistake. What I wanted to write: We have created a CalendarBackened that receive GFrames from the DataManagar. The GFrame looks like this: Received frame: {c java_be.get_events :hub_opaque_data {c admin_info :reply_requested 1 :session_id "Default" :invoked_stype "java_be" :tidx 12 :provider_id "[8]" :timestamp [array: type GAL_FLOAT_64, 1 elements] :scriptless 1 } :session_id "Default" :tidx 12 * :inframe "{ event_query { event_type CLASS** }* } " } *I could easity get the inframe by* String tokens = ((String)f.getProperty(":inframe")); *however is there a way to get the event_type without parsing the string meaning something like* *String tokesn = ((String)f.getPropperty(":inframe.event_query.event_type ")????* ** *Thank You for all your help.* On 10/4/06, Basia Mucha wrote: > > Received frame: > {c java_be.get_events > :hub_opaque_data {c admin_info > :reply_requested 1 > :session_id "Default" > :invoked_stype "java_be" > :tidx 12 > :provider_id "[8]" > :timestamp [array: type GAL_FLOAT_64, 1 elements] > :scriptless 1 } > :session_id "Default" > :tidx 12 > :inframe "{ > event_query { > event_type CLASS > } > > } > " } > -- Thanks, Basia -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061004/497c39cf/attachment.html From tkharris+ at cs.cmu.edu Wed Oct 4 10:41:16 2006 From: tkharris+ at cs.cmu.edu (Thomas K Harris) Date: Wed, 4 Oct 2006 10:41:16 -0400 Subject: RavenclawDev: RavenClawDev: reusing agents in another part of atree In-Reply-To: <727b4d390610040722x79eb12d0h57135cc22d865fc4@mail.gmail.com> Message-ID: <200610041441.k94EfGvo020564@chokecherry.srv.cs.cmu.edu> Yes, Ravenclaw uses this pseudo-galaxy-frame format for the inframe. I wrote some fix-up code that converts these frames to real galaxy frames, but the code is in c++. The code snippet follows. This is something that probably needs to be fixed in Ravenclaw eventually, but there's an installed code base that depends on the current format, so it will take some coordination. Gal_PrFrame(f); char* s_inframe = Gal_StringValue(aStr); if(s_inframe) { //frame fixup -> ravenclaw embeds inframe frame ostringstream fixed; string notfixed(s_inframe + 1); istringstream inotfixed(notfixed); fixed << "{c zap "; string token; do { inotfixed >> token; if(token == "}") break; fixed << ':' << token << ' '; char cpVal[255]; inotfixed.ignore(); inotfixed.getline(cpVal, 254); fixed << '"' << cpVal << "\" "; } while(inotfixed); GalUtil_Error("working with fixed version: %s", fixed.str().c_str()); Gal_Frame inframe = Gal_ReadFrameFromString(fixed.str().c_str()); } -Thomas _____ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of Basia Mucha Sent: Wednesday, October 04, 2006 10:22 AM To: Dan Bohus; Dialog Group CMU Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another part of atree Sorry for the last email, I pressed send by mistake. What I wanted to write: We have created a CalendarBackened that receive GFrames from the DataManagar. The GFrame looks like this: Received frame: {c java_be.get_events :hub_opaque_data {c admin_info :reply_requested 1 :session_id "Default" :invoked_stype "java_be" :tidx 12 :provider_id "[8]" :timestamp [array: type GAL_FLOAT_64, 1 elements] :scriptless 1 } :session_id "Default" :tidx 12 :inframe "{ event_query { event_type CLASS } } " } I could easity get the inframe by String tokens = ((String)f.getProperty(":inframe")); however is there a way to get the event_type without parsing the string meaning something like String tokesn = ((String)f.getPropperty(":inframe.event_query.event_type")???? Thank You for all your help. On 10/4/06, Basia Mucha wrote: Received frame: {c java_be.get_events :hub_opaque_data {c admin_info :reply_requested 1 :session_id "Default" :invoked_stype "java_be" :tidx 12 :provider_id "[8]" :timestamp [array: type GAL_FLOAT_64, 1 elements] :scriptless 1 } :session_id "Default" :tidx 12 :inframe "{ event_query { event_type CLASS } } " } -- Thanks, Basia -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061004/60f9996e/attachment-0001.html From sveta at cs.sunysb.edu Wed Oct 4 11:14:27 2006 From: sveta at cs.sunysb.edu (Svetlana Stenchikova) Date: Wed, 4 Oct 2006 11:14:27 -0400 (EDT) Subject: RavenclawDev: RavenClawDev: reusing agents in another part of atree In-Reply-To: <200610041441.k94EfGvo020564@chokecherry.srv.cs.cmu.edu> References: <200610041441.k94EfGvo020564@chokecherry.srv.cs.cmu.edu> Message-ID: Thanks Thomas, in your Jason server you used: int i = Integer.parseInt((String)f.getFrame(":parse").getProperty(":uttid")); How did you make that work, did it require some change in RavenClaw? Svetlana --------------------------------------------------------- Svetlana Stenchikova, Ph.D. Candidate Computer Science Department, Stony Brook University http://cs.sunysb.edu/~sveta sveta at cs.sunysb.edu --------------------------------------------------------- On Wed, 4 Oct 2006, Thomas K Harris wrote: > Yes, Ravenclaw uses this pseudo-galaxy-frame format for the inframe. I wrote > some fix-up code that converts these frames to real galaxy frames, but the > code is in c++. The code snippet follows. This is something that probably > needs to be fixed in Ravenclaw eventually, but there's an installed code > base that depends on the current format, so it will take some coordination. > > > > Gal_PrFrame(f); > > char* s_inframe = Gal_StringValue(aStr); > > if(s_inframe) { > > //frame fixup -> ravenclaw embeds inframe frame > > ostringstream fixed; > > string notfixed(s_inframe + 1); > > istringstream inotfixed(notfixed); > > fixed << "{c zap "; > > string token; > > do { > > inotfixed >> token; > > if(token == "}") break; > > fixed << ':' << token << ' '; > > char cpVal[255]; > > inotfixed.ignore(); > > inotfixed.getline(cpVal, 254); > > fixed << '"' << cpVal << "\" "; > > } while(inotfixed); > > GalUtil_Error("working with fixed version: %s", > fixed.str().c_str()); > > Gal_Frame inframe = > Gal_ReadFrameFromString(fixed.str().c_str()); > > } > > > > -Thomas > > > > _____ > > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of > Basia Mucha > Sent: Wednesday, October 04, 2006 10:22 AM > To: Dan Bohus; Dialog Group CMU > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another part of > atree > > > > Sorry for the last email, I pressed send by mistake. > > > > What I wanted to write: > > > > We have created a CalendarBackened that receive GFrames from the > DataManagar. > > The GFrame looks like this: > > Received frame: > {c java_be.get_events > :hub_opaque_data {c admin_info > :reply_requested 1 > :session_id "Default" > :invoked_stype "java_be" > :tidx 12 > :provider_id "[8]" > :timestamp [array: type GAL_FLOAT_64, 1 elements] > :scriptless 1 } > :session_id "Default" > :tidx 12 > :inframe "{ > event_query { > event_type CLASS > } > > } > " } > > I could easity get the inframe by > > String tokens = ((String)f.getProperty(":inframe")); > > however is there a way to get the event_type without parsing the string > meaning something like > > String tokesn = > ((String)f.getPropperty(":inframe.event_query.event_type")???? > > > > Thank You for all your help. > > > > > > On 10/4/06, Basia Mucha wrote: > > Received frame: > {c java_be.get_events > :hub_opaque_data {c admin_info > :reply_requested 1 > :session_id "Default" > :invoked_stype "java_be" > :tidx 12 > :provider_id "[8]" > :timestamp [array: type GAL_FLOAT_64, 1 elements] > :scriptless 1 } > :session_id "Default" > :tidx 12 > :inframe "{ > event_query { > event_type CLASS > } > > } > " } > > > > > -- > Thanks, > Basia > > From tkharris+ at cs.cmu.edu Wed Oct 4 11:49:27 2006 From: tkharris+ at cs.cmu.edu (Thomas K Harris) Date: Wed, 4 Oct 2006 11:49:27 -0400 Subject: RavenclawDev: RavenClawDev: reusing agents in another part of atree In-Reply-To: Message-ID: <200610041549.k94FnR1L023521@chokecherry.srv.cs.cmu.edu> No, it's just the frame that Ravenclaw sends to the backend that has a galaxy frame embedded as a string. Its output frame contents are accessible via the normal galaxy frame access calls. -Thomas -----Original Message----- From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] Sent: Wednesday, October 04, 2006 11:14 AM To: Thomas K Harris Cc: 'Basia Mucha'; 'Dialog Group CMU' Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another part of atree Thanks Thomas, in your Jason server you used: int i = Integer.parseInt((String)f.getFrame(":parse").getProperty(":uttid")); How did you make that work, did it require some change in RavenClaw? Svetlana --------------------------------------------------------- Svetlana Stenchikova, Ph.D. Candidate Computer Science Department, Stony Brook University http://cs.sunysb.edu/~sveta sveta at cs.sunysb.edu --------------------------------------------------------- On Wed, 4 Oct 2006, Thomas K Harris wrote: > Yes, Ravenclaw uses this pseudo-galaxy-frame format for the inframe. I wrote > some fix-up code that converts these frames to real galaxy frames, but the > code is in c++. The code snippet follows. This is something that probably > needs to be fixed in Ravenclaw eventually, but there's an installed code > base that depends on the current format, so it will take some coordination. > > > > Gal_PrFrame(f); > > char* s_inframe = Gal_StringValue(aStr); > > if(s_inframe) { > > //frame fixup -> ravenclaw embeds inframe frame > > ostringstream fixed; > > string notfixed(s_inframe + 1); > > istringstream inotfixed(notfixed); > > fixed << "{c zap "; > > string token; > > do { > > inotfixed >> token; > > if(token == "}") break; > > fixed << ':' << token << ' '; > > char cpVal[255]; > > inotfixed.ignore(); > > inotfixed.getline(cpVal, 254); > > fixed << '"' << cpVal << "\" "; > > } while(inotfixed); > > GalUtil_Error("working with fixed version: %s", > fixed.str().c_str()); > > Gal_Frame inframe = > Gal_ReadFrameFromString(fixed.str().c_str()); > > } > > > > -Thomas > > > > _____ > > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of > Basia Mucha > Sent: Wednesday, October 04, 2006 10:22 AM > To: Dan Bohus; Dialog Group CMU > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another part of > atree > > > > Sorry for the last email, I pressed send by mistake. > > > > What I wanted to write: > > > > We have created a CalendarBackened that receive GFrames from the > DataManagar. > > The GFrame looks like this: > > Received frame: > {c java_be.get_events > :hub_opaque_data {c admin_info > :reply_requested 1 > :session_id "Default" > :invoked_stype "java_be" > :tidx 12 > :provider_id "[8]" > :timestamp [array: type GAL_FLOAT_64, 1 elements] > :scriptless 1 } > :session_id "Default" > :tidx 12 > :inframe "{ > event_query { > event_type CLASS > } > > } > " } > > I could easity get the inframe by > > String tokens = ((String)f.getProperty(":inframe")); > > however is there a way to get the event_type without parsing the string > meaning something like > > String tokesn = > ((String)f.getPropperty(":inframe.event_query.event_type")???? > > > > Thank You for all your help. > > > > > > On 10/4/06, Basia Mucha wrote: > > Received frame: > {c java_be.get_events > :hub_opaque_data {c admin_info > :reply_requested 1 > :session_id "Default" > :invoked_stype "java_be" > :tidx 12 > :provider_id "[8]" > :timestamp [array: type GAL_FLOAT_64, 1 elements] > :scriptless 1 } > :session_id "Default" > :tidx 12 > :inframe "{ > event_query { > event_type CLASS > } > > } > " } > > > > > -- > Thanks, > Basia > > From sveta at cs.sunysb.edu Wed Oct 4 12:12:15 2006 From: sveta at cs.sunysb.edu (Svetlana Stenchikova) Date: Wed, 4 Oct 2006 12:12:15 -0400 (EDT) Subject: RavenclawDev: RavenClawDev: reusing agents in another part of atree In-Reply-To: <200610041549.k94FnR1L023521@chokecherry.srv.cs.cmu.edu> References: <200610041549.k94FnR1L023521@chokecherry.srv.cs.cmu.edu> Message-ID: Thomas, The frame is sent by a dialog manager, right? In our dialog manager we have an agent which calls add_event method of the backend and passes an object "event_add" DEFINE_EXECUTE_AGENT( CDBAddEvent, CALL("java_be.add_event backend_error") ) The framework generates the inframe that is passed to the back end. How would do you embed a galaxy frame in a string when making a CALL to a back end from the dialog manager? Is this where your fix-up code comes in? Is your fix-up code part of the dialog manager (as opposed to being a part of a back-end server)? thank you, Svetlana On Wed, 4 Oct 2006, Thomas K Harris wrote: > No, it's just the frame that Ravenclaw sends to the backend that has a > galaxy frame embedded as a string. Its output frame contents are accessible > via the normal galaxy frame access calls. > > -Thomas > > > -----Original Message----- > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > Sent: Wednesday, October 04, 2006 11:14 AM > To: Thomas K Harris > Cc: 'Basia Mucha'; 'Dialog Group CMU' > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another part of > atree > > Thanks Thomas, > > in your Jason server you used: > int i = > Integer.parseInt((String)f.getFrame(":parse").getProperty(":uttid")); > > How did you make that work, did it require some change in RavenClaw? > > Svetlana > > --------------------------------------------------------- > Svetlana Stenchikova, Ph.D. Candidate > Computer Science Department, Stony Brook University > http://cs.sunysb.edu/~sveta > sveta at cs.sunysb.edu > --------------------------------------------------------- > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > > Yes, Ravenclaw uses this pseudo-galaxy-frame format for the inframe. I > wrote > > some fix-up code that converts these frames to real galaxy frames, but the > > code is in c++. The code snippet follows. This is something that probably > > needs to be fixed in Ravenclaw eventually, but there's an installed code > > base that depends on the current format, so it will take some > coordination. > > > > > > > > Gal_PrFrame(f); > > > > char* s_inframe = Gal_StringValue(aStr); > > > > if(s_inframe) { > > > > //frame fixup -> ravenclaw embeds inframe frame > > > > ostringstream fixed; > > > > string notfixed(s_inframe + 1); > > > > istringstream inotfixed(notfixed); > > > > fixed << "{c zap "; > > > > string token; > > > > do { > > > > inotfixed >> token; > > > > if(token == "}") break; > > > > fixed << ':' << token << ' '; > > > > char cpVal[255]; > > > > inotfixed.ignore(); > > > > inotfixed.getline(cpVal, 254); > > > > fixed << '"' << cpVal << "\" "; > > > > } while(inotfixed); > > > > GalUtil_Error("working with fixed version: %s", > > fixed.str().c_str()); > > > > Gal_Frame inframe = > > Gal_ReadFrameFromString(fixed.str().c_str()); > > > > } > > > > > > > > -Thomas > > > > > > > > _____ > > > > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf > Of > > Basia Mucha > > Sent: Wednesday, October 04, 2006 10:22 AM > > To: Dan Bohus; Dialog Group CMU > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another part of > > atree > > > > > > > > Sorry for the last email, I pressed send by mistake. > > > > > > > > What I wanted to write: > > > > > > > > We have created a CalendarBackened that receive GFrames from the > > DataManagar. > > > > The GFrame looks like this: > > > > Received frame: > > {c java_be.get_events > > :hub_opaque_data {c admin_info > > :reply_requested 1 > > :session_id "Default" > > :invoked_stype "java_be" > > :tidx 12 > > :provider_id "[8]" > > :timestamp [array: type GAL_FLOAT_64, 1 elements] > > :scriptless 1 } > > :session_id "Default" > > :tidx 12 > > :inframe "{ > > event_query { > > event_type CLASS > > } > > > > } > > " } > > > > I could easity get the inframe by > > > > String tokens = ((String)f.getProperty(":inframe")); > > > > however is there a way to get the event_type without parsing the string > > meaning something like > > > > String tokesn = > > ((String)f.getPropperty(":inframe.event_query.event_type")???? > > > > > > > > Thank You for all your help. > > > > > > > > > > > > On 10/4/06, Basia Mucha wrote: > > > > Received frame: > > {c java_be.get_events > > :hub_opaque_data {c admin_info > > :reply_requested 1 > > :session_id "Default" > > :invoked_stype "java_be" > > :tidx 12 > > :provider_id "[8]" > > :timestamp [array: type GAL_FLOAT_64, 1 elements] > > :scriptless 1 } > > :session_id "Default" > > :tidx 12 > > :inframe "{ > > event_query { > > event_type CLASS > > } > > > > } > > " } > > > > > > > > > > -- > > Thanks, > > Basia > > > > > > > From tkharris at cs.cmu.edu Wed Oct 4 13:38:55 2006 From: tkharris at cs.cmu.edu (Thomas K Harris) Date: Wed, 4 Oct 2006 13:38:55 -0400 Subject: RavenclawDev: RavenClawDev: reusing agents in another part of atree In-Reply-To: Message-ID: <002f01c6e7db$f75896b0$e6cb0280@speech.cs.cmu.edu> Yes, the frame is sent by the dialog manager. My fixup code is in my backend server to parse the inframe. If you write a java version of the fixup code and put it in your java backend, then you can treat the inframe like any other galaxy frame and make a call something like the following to get the inframe properties. String EventType = (String)inframe.getFrame(":event_query").getProperty(":event_type"); The other solution is to change Ravenclaw to not embed the inframe as a string, or at least to make that string a validly-formed galaxy frame. I'll bring this up tomorrow when the group meets. -Thomas > -----Original Message----- > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > Sent: Wednesday, October 04, 2006 12:12 PM > To: Thomas K Harris > Cc: 'Basia Mucha'; 'Dialog Group CMU' > Subject: RE: RavenclawDev: RavenClawDev: reusing agents in another part of > atree > > > Thomas, > The frame is sent by a dialog manager, right? > > In our dialog manager we have an agent which calls add_event method of the > backend and passes an object "event_add" > > > DEFINE_EXECUTE_AGENT( CDBAddEvent, > CALL("java_be.add_event backend_error") > ) > > The framework generates the inframe that is passed to the back end. > > How would do you embed a galaxy frame in a string when making a CALL to > a back end from the dialog manager? > > Is this where your fix-up code comes in? Is your fix-up code part of the > dialog manager (as opposed to being a part of a back-end server)? > > thank you, > Svetlana > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > > No, it's just the frame that Ravenclaw sends to the backend that has a > > galaxy frame embedded as a string. Its output frame contents are > accessible > > via the normal galaxy frame access calls. > > > > -Thomas > > > > > > -----Original Message----- > > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > > Sent: Wednesday, October 04, 2006 11:14 AM > > To: Thomas K Harris > > Cc: 'Basia Mucha'; 'Dialog Group CMU' > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another part > of > > atree > > > > Thanks Thomas, > > > > in your Jason server you used: > > int i = > > Integer.parseInt((String)f.getFrame(":parse").getProperty(":uttid")); > > > > How did you make that work, did it require some change in RavenClaw? > > > > Svetlana > > > > --------------------------------------------------------- > > Svetlana Stenchikova, Ph.D. Candidate > > Computer Science Department, Stony Brook University > > http://cs.sunysb.edu/~sveta > > sveta at cs.sunysb.edu > > --------------------------------------------------------- > > > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > > > > Yes, Ravenclaw uses this pseudo-galaxy-frame format for the inframe. I > > wrote > > > some fix-up code that converts these frames to real galaxy frames, but > the > > > code is in c++. The code snippet follows. This is something that > probably > > > needs to be fixed in Ravenclaw eventually, but there's an installed > code > > > base that depends on the current format, so it will take some > > coordination. > > > > > > > > > > > > Gal_PrFrame(f); > > > > > > char* s_inframe = Gal_StringValue(aStr); > > > > > > if(s_inframe) { > > > > > > //frame fixup -> ravenclaw embeds inframe frame > > > > > > ostringstream fixed; > > > > > > string notfixed(s_inframe + 1); > > > > > > istringstream inotfixed(notfixed); > > > > > > fixed << "{c zap "; > > > > > > string token; > > > > > > do { > > > > > > inotfixed >> token; > > > > > > if(token == "}") break; > > > > > > fixed << ':' << token << ' '; > > > > > > char cpVal[255]; > > > > > > inotfixed.ignore(); > > > > > > inotfixed.getline(cpVal, 254); > > > > > > fixed << '"' << cpVal << "\" "; > > > > > > } while(inotfixed); > > > > > > GalUtil_Error("working with fixed version: %s", > > > fixed.str().c_str()); > > > > > > Gal_Frame inframe = > > > Gal_ReadFrameFromString(fixed.str().c_str()); > > > > > > } > > > > > > > > > > > > -Thomas > > > > > > > > > > > > _____ > > > > > > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > > > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On > Behalf > > Of > > > Basia Mucha > > > Sent: Wednesday, October 04, 2006 10:22 AM > > > To: Dan Bohus; Dialog Group CMU > > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another > part of > > > atree > > > > > > > > > > > > Sorry for the last email, I pressed send by mistake. > > > > > > > > > > > > What I wanted to write: > > > > > > > > > > > > We have created a CalendarBackened that receive GFrames from the > > > DataManagar. > > > > > > The GFrame looks like this: > > > > > > Received frame: > > > {c java_be.get_events > > > :hub_opaque_data {c admin_info > > > :reply_requested 1 > > > :session_id "Default" > > > :invoked_stype "java_be" > > > :tidx 12 > > > :provider_id "[8]" > > > :timestamp [array: type GAL_FLOAT_64, 1 > elements] > > > :scriptless 1 } > > > :session_id "Default" > > > :tidx 12 > > > :inframe "{ > > > event_query { > > > event_type CLASS > > > } > > > > > > } > > > " } > > > > > > I could easity get the inframe by > > > > > > String tokens = ((String)f.getProperty(":inframe")); > > > > > > however is there a way to get the event_type without parsing the > string > > > meaning something like > > > > > > String tokesn = > > > ((String)f.getPropperty(":inframe.event_query.event_type")???? > > > > > > > > > > > > Thank You for all your help. > > > > > > > > > > > > > > > > > > On 10/4/06, Basia Mucha wrote: > > > > > > Received frame: > > > {c java_be.get_events > > > :hub_opaque_data {c admin_info > > > :reply_requested 1 > > > :session_id "Default" > > > :invoked_stype "java_be" > > > :tidx 12 > > > :provider_id "[8]" > > > :timestamp [array: type GAL_FLOAT_64, 1 > elements] > > > :scriptless 1 } > > > :session_id "Default" > > > :tidx 12 > > > :inframe "{ > > > event_query { > > > event_type CLASS > > > } > > > > > > } > > > " } > > > > > > > > > > > > > > > -- > > > Thanks, > > > Basia > > > > > > > > > > > > From sveta at cs.sunysb.edu Thu Oct 5 09:19:17 2006 From: sveta at cs.sunysb.edu (Svetlana Stenchikova) Date: Thu, 5 Oct 2006 09:19:17 -0400 (EDT) Subject: RavenclawDev: RavenClawDev: reusing agents in another part of atree In-Reply-To: <002f01c6e7db$f75896b0$e6cb0280@speech.cs.cmu.edu> References: <002f01c6e7db$f75896b0$e6cb0280@speech.cs.cmu.edu> Message-ID: Thanks Thomas, this makes sense. I just have one more question. Your Jason server is a Java server, why is the workaround code in C? Do you use the C server as a wrapper for Jason? Svetlana On Wed, 4 Oct 2006, Thomas K Harris wrote: > Yes, the frame is sent by the dialog manager. My fixup code is in my backend > server to parse the inframe. If you write a java version of the fixup code > and put it in your java backend, then you can treat the inframe like any > other galaxy frame and make a call something like the following to get the > inframe properties. > > String EventType = > (String)inframe.getFrame(":event_query").getProperty(":event_type"); > > The other solution is to change Ravenclaw to not embed the inframe as a > string, or at least to make that string a validly-formed galaxy frame. I'll > bring this up tomorrow when the group meets. > > -Thomas > > > -----Original Message----- > > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > > Sent: Wednesday, October 04, 2006 12:12 PM > > To: Thomas K Harris > > Cc: 'Basia Mucha'; 'Dialog Group CMU' > > Subject: RE: RavenclawDev: RavenClawDev: reusing agents in another part of > > atree > > > > > > Thomas, > > The frame is sent by a dialog manager, right? > > > > In our dialog manager we have an agent which calls add_event method of the > > backend and passes an object "event_add" > > > > > > DEFINE_EXECUTE_AGENT( CDBAddEvent, > > CALL("java_be.add_event backend_error") > > ) > > > > The framework generates the inframe that is passed to the back end. > > > > How would do you embed a galaxy frame in a string when making a CALL to > > a back end from the dialog manager? > > > > Is this where your fix-up code comes in? Is your fix-up code part of the > > dialog manager (as opposed to being a part of a back-end server)? > > > > thank you, > > Svetlana > > > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > > > > No, it's just the frame that Ravenclaw sends to the backend that has a > > > galaxy frame embedded as a string. Its output frame contents are > > accessible > > > via the normal galaxy frame access calls. > > > > > > -Thomas > > > > > > > > > -----Original Message----- > > > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > > > Sent: Wednesday, October 04, 2006 11:14 AM > > > To: Thomas K Harris > > > Cc: 'Basia Mucha'; 'Dialog Group CMU' > > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another part > > of > > > atree > > > > > > Thanks Thomas, > > > > > > in your Jason server you used: > > > int i = > > > Integer.parseInt((String)f.getFrame(":parse").getProperty(":uttid")); > > > > > > How did you make that work, did it require some change in RavenClaw? > > > > > > Svetlana > > > > > > --------------------------------------------------------- > > > Svetlana Stenchikova, Ph.D. Candidate > > > Computer Science Department, Stony Brook University > > > http://cs.sunysb.edu/~sveta > > > sveta at cs.sunysb.edu > > > --------------------------------------------------------- > > > > > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > > > > > > Yes, Ravenclaw uses this pseudo-galaxy-frame format for the inframe. I > > > wrote > > > > some fix-up code that converts these frames to real galaxy frames, but > > the > > > > code is in c++. The code snippet follows. This is something that > > probably > > > > needs to be fixed in Ravenclaw eventually, but there's an installed > > code > > > > base that depends on the current format, so it will take some > > > coordination. > > > > > > > > > > > > > > > > Gal_PrFrame(f); > > > > > > > > char* s_inframe = Gal_StringValue(aStr); > > > > > > > > if(s_inframe) { > > > > > > > > //frame fixup -> ravenclaw embeds inframe frame > > > > > > > > ostringstream fixed; > > > > > > > > string notfixed(s_inframe + 1); > > > > > > > > istringstream inotfixed(notfixed); > > > > > > > > fixed << "{c zap "; > > > > > > > > string token; > > > > > > > > do { > > > > > > > > inotfixed >> token; > > > > > > > > if(token == "}") break; > > > > > > > > fixed << ':' << token << ' '; > > > > > > > > char cpVal[255]; > > > > > > > > inotfixed.ignore(); > > > > > > > > inotfixed.getline(cpVal, 254); > > > > > > > > fixed << '"' << cpVal << "\" "; > > > > > > > > } while(inotfixed); > > > > > > > > GalUtil_Error("working with fixed version: %s", > > > > fixed.str().c_str()); > > > > > > > > Gal_Frame inframe = > > > > Gal_ReadFrameFromString(fixed.str().c_str()); > > > > > > > > } > > > > > > > > > > > > > > > > -Thomas > > > > > > > > > > > > > > > > _____ > > > > > > > > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > > > > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On > > Behalf > > > Of > > > > Basia Mucha > > > > Sent: Wednesday, October 04, 2006 10:22 AM > > > > To: Dan Bohus; Dialog Group CMU > > > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another > > part of > > > > atree > > > > > > > > > > > > > > > > Sorry for the last email, I pressed send by mistake. > > > > > > > > > > > > > > > > What I wanted to write: > > > > > > > > > > > > > > > > We have created a CalendarBackened that receive GFrames from the > > > > DataManagar. > > > > > > > > The GFrame looks like this: > > > > > > > > Received frame: > > > > {c java_be.get_events > > > > :hub_opaque_data {c admin_info > > > > :reply_requested 1 > > > > :session_id "Default" > > > > :invoked_stype "java_be" > > > > :tidx 12 > > > > :provider_id "[8]" > > > > :timestamp [array: type GAL_FLOAT_64, 1 > > elements] > > > > :scriptless 1 } > > > > :session_id "Default" > > > > :tidx 12 > > > > :inframe "{ > > > > event_query { > > > > event_type CLASS > > > > } > > > > > > > > } > > > > " } > > > > > > > > I could easity get the inframe by > > > > > > > > String tokens = ((String)f.getProperty(":inframe")); > > > > > > > > however is there a way to get the event_type without parsing the > > string > > > > meaning something like > > > > > > > > String tokesn = > > > > ((String)f.getPropperty(":inframe.event_query.event_type")???? > > > > > > > > > > > > > > > > Thank You for all your help. > > > > > > > > > > > > > > > > > > > > > > > > On 10/4/06, Basia Mucha wrote: > > > > > > > > Received frame: > > > > {c java_be.get_events > > > > :hub_opaque_data {c admin_info > > > > :reply_requested 1 > > > > :session_id "Default" > > > > :invoked_stype "java_be" > > > > :tidx 12 > > > > :provider_id "[8]" > > > > :timestamp [array: type GAL_FLOAT_64, 1 > > elements] > > > > :scriptless 1 } > > > > :session_id "Default" > > > > :tidx 12 > > > > :inframe "{ > > > > event_query { > > > > event_type CLASS > > > > } > > > > > > > > } > > > > " } > > > > > > > > > > > > > > > > > > > > -- > > > > Thanks, > > > > Basia > > > > > > > > > > > > > > > > > > > > From tkharris at cs.cmu.edu Thu Oct 5 10:09:47 2006 From: tkharris at cs.cmu.edu (tkharris@cs.cmu.edu) Date: Thu, 5 Oct 2006 10:09:47 -0400 (EDT) Subject: RavenclawDev: RavenClawDev: reusing agents in another part of atree In-Reply-To: References: <002f01c6e7db$f75896b0$e6cb0280@speech.cs.cmu.edu> Message-ID: <1278.66.167.91.81.1160057387.squirrel@webmail.cs.cmu.edu> Sure, Oh, the fixup code didn't have anything to do with Jason. Sorry for the confusion. The inframe is only intended for the backend, and Jason is a front-end component, so the fixup code wasn't required for Jason. The reason I have the fixup code is because I needed a new backend, which happened to be written in c++. -Thomas > Thanks Thomas, this makes sense. > I just have one more question. Your Jason server is a Java server, why is > the workaround code in C? Do you use the C server as a wrapper for > Jason? > > Svetlana > > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > >> Yes, the frame is sent by the dialog manager. My fixup code is in my >> backend >> server to parse the inframe. If you write a java version of the fixup >> code >> and put it in your java backend, then you can treat the inframe like any >> other galaxy frame and make a call something like the following to get >> the >> inframe properties. >> >> String EventType = >> (String)inframe.getFrame(":event_query").getProperty(":event_type"); >> >> The other solution is to change Ravenclaw to not embed the inframe as a >> string, or at least to make that string a validly-formed galaxy frame. >> I'll >> bring this up tomorrow when the group meets. >> >> -Thomas >> >> > -----Original Message----- >> > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] >> > Sent: Wednesday, October 04, 2006 12:12 PM >> > To: Thomas K Harris >> > Cc: 'Basia Mucha'; 'Dialog Group CMU' >> > Subject: RE: RavenclawDev: RavenClawDev: reusing agents in another >> part of >> > atree >> > >> > >> > Thomas, >> > The frame is sent by a dialog manager, right? >> > >> > In our dialog manager we have an agent which calls add_event method of >> the >> > backend and passes an object "event_add" >> > >> > >> > DEFINE_EXECUTE_AGENT( CDBAddEvent, >> > CALL("java_be.add_event backend_error") >> > ) >> > >> > The framework generates the inframe that is passed to the back end. >> > >> > How would do you embed a galaxy frame in a string when making a CALL >> to >> > a back end from the dialog manager? >> > >> > Is this where your fix-up code comes in? Is your fix-up code part of >> the >> > dialog manager (as opposed to being a part of a back-end server)? >> > >> > thank you, >> > Svetlana >> > >> > On Wed, 4 Oct 2006, Thomas K Harris wrote: >> > >> > > No, it's just the frame that Ravenclaw sends to the backend that has >> a >> > > galaxy frame embedded as a string. Its output frame contents are >> > accessible >> > > via the normal galaxy frame access calls. >> > > >> > > -Thomas >> > > >> > > >> > > -----Original Message----- >> > > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] >> > > Sent: Wednesday, October 04, 2006 11:14 AM >> > > To: Thomas K Harris >> > > Cc: 'Basia Mucha'; 'Dialog Group CMU' >> > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another >> part >> > of >> > > atree >> > > >> > > Thanks Thomas, >> > > >> > > in your Jason server you used: >> > > int i = >> > > Integer.parseInt((String)f.getFrame(":parse").getProperty(":uttid")); >> > > >> > > How did you make that work, did it require some change in RavenClaw? >> > > >> > > Svetlana >> > > >> > > --------------------------------------------------------- >> > > Svetlana Stenchikova, Ph.D. Candidate >> > > Computer Science Department, Stony Brook University >> > > http://cs.sunysb.edu/~sveta >> > > sveta at cs.sunysb.edu >> > > --------------------------------------------------------- >> > > >> > > On Wed, 4 Oct 2006, Thomas K Harris wrote: >> > > >> > > > Yes, Ravenclaw uses this pseudo-galaxy-frame format for the >> inframe. I >> > > wrote >> > > > some fix-up code that converts these frames to real galaxy frames, >> but >> > the >> > > > code is in c++. The code snippet follows. This is something that >> > probably >> > > > needs to be fixed in Ravenclaw eventually, but there's an >> installed >> > code >> > > > base that depends on the current format, so it will take some >> > > coordination. >> > > > >> > > > >> > > > >> > > > Gal_PrFrame(f); >> > > > >> > > > char* s_inframe = Gal_StringValue(aStr); >> > > > >> > > > if(s_inframe) { >> > > > >> > > > //frame fixup -> ravenclaw embeds inframe frame >> > > > >> > > > ostringstream fixed; >> > > > >> > > > string notfixed(s_inframe + 1); >> > > > >> > > > istringstream inotfixed(notfixed); >> > > > >> > > > fixed << "{c zap "; >> > > > >> > > > string token; >> > > > >> > > > do { >> > > > >> > > > inotfixed >> token; >> > > > >> > > > if(token == "}") break; >> > > > >> > > > fixed << ':' << token << ' '; >> > > > >> > > > char cpVal[255]; >> > > > >> > > > inotfixed.ignore(); >> > > > >> > > > inotfixed.getline(cpVal, 254); >> > > > >> > > > fixed << '"' << cpVal << "\" "; >> > > > >> > > > } while(inotfixed); >> > > > >> > > > GalUtil_Error("working with fixed version: %s", >> > > > fixed.str().c_str()); >> > > > >> > > > Gal_Frame inframe = >> > > > Gal_ReadFrameFromString(fixed.str().c_str()); >> > > > >> > > > } >> > > > >> > > > >> > > > >> > > > -Thomas >> > > > >> > > > >> > > > >> > > > _____ >> > > > >> > > > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu >> > > > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On >> > Behalf >> > > Of >> > > > Basia Mucha >> > > > Sent: Wednesday, October 04, 2006 10:22 AM >> > > > To: Dan Bohus; Dialog Group CMU >> > > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another >> > part of >> > > > atree >> > > > >> > > > >> > > > >> > > > Sorry for the last email, I pressed send by mistake. >> > > > >> > > > >> > > > >> > > > What I wanted to write: >> > > > >> > > > >> > > > >> > > > We have created a CalendarBackened that receive GFrames from the >> > > > DataManagar. >> > > > >> > > > The GFrame looks like this: >> > > > >> > > > Received frame: >> > > > {c java_be.get_events >> > > > :hub_opaque_data {c admin_info >> > > > :reply_requested 1 >> > > > :session_id "Default" >> > > > :invoked_stype "java_be" >> > > > :tidx 12 >> > > > :provider_id "[8]" >> > > > :timestamp [array: type GAL_FLOAT_64, 1 >> > elements] >> > > > :scriptless 1 } >> > > > :session_id "Default" >> > > > :tidx 12 >> > > > :inframe "{ >> > > > event_query { >> > > > event_type CLASS >> > > > } >> > > > >> > > > } >> > > > " } >> > > > >> > > > I could easity get the inframe by >> > > > >> > > > String tokens = ((String)f.getProperty(":inframe")); >> > > > >> > > > however is there a way to get the event_type without parsing the >> > string >> > > > meaning something like >> > > > >> > > > String tokesn = >> > > > ((String)f.getPropperty(":inframe.event_query.event_type")???? >> > > > >> > > > >> > > > >> > > > Thank You for all your help. >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > On 10/4/06, Basia Mucha wrote: >> > > > >> > > > Received frame: >> > > > {c java_be.get_events >> > > > :hub_opaque_data {c admin_info >> > > > :reply_requested 1 >> > > > :session_id "Default" >> > > > :invoked_stype "java_be" >> > > > :tidx 12 >> > > > :provider_id "[8]" >> > > > :timestamp [array: type GAL_FLOAT_64, 1 >> > elements] >> > > > :scriptless 1 } >> > > > :session_id "Default" >> > > > :tidx 12 >> > > > :inframe "{ >> > > > event_query { >> > > > event_type CLASS >> > > > } >> > > > >> > > > } >> > > > " } >> > > > >> > > > >> > > > >> > > > >> > > > -- >> > > > Thanks, >> > > > Basia >> > > > >> > > > >> > > >> > > >> > > >> >> >> > > From sveta at cs.sunysb.edu Thu Oct 5 10:34:02 2006 From: sveta at cs.sunysb.edu (Svetlana Stenchikova) Date: Thu, 5 Oct 2006 10:34:02 -0400 (EDT) Subject: RavenclawDev: passing frames to back end seervers + front end In-Reply-To: <1278.66.167.91.81.1160057387.squirrel@webmail.cs.cmu.edu> References: <002f01c6e7db$f75896b0$e6cb0280@speech.cs.cmu.edu> <1278.66.167.91.81.1160057387.squirrel@webmail.cs.cmu.edu> Message-ID: I see - thank you. Current back end servers (NLG and RavenClaw backend) are perl servers but are communicated through the C server backendserver2. If you change RavenClaw to pass frames properly, wouldn't this affect just the backendserver2? So, how does Jason communicate with DM, Does it replace the TTY and act as TTY by receiving its messages? I have not yet ran Jason, but we will be also writing a new front-end server to replace the TTY. We don't need it to work remotely (like Jason), we just need a nicer UI to show a demo, so I suppose that we do not need the support for sessions that was recently done to RavenClaw in order to support Jason, right? If you have any suggestions to us regarding front end server, we would appreciate them. Thank you, Svetlana --------------------------------------------------------- Svetlana Stenchikova, Ph.D. Candidate Computer Science Department, Stony Brook University http://cs.sunysb.edu/~sveta sveta at cs.sunysb.edu --------------------------------------------------------- On Thu, 5 Oct 2006 tkharris at cs.cmu.edu wrote: > Sure, > > Oh, the fixup code didn't have anything to do with Jason. Sorry for the > confusion. The inframe is only intended for the backend, and Jason is a > front-end component, so the fixup code wasn't required for Jason. The > reason I have the fixup code is because I needed a new backend, which > happened to be written in c++. > > -Thomas > > > Thanks Thomas, this makes sense. > > I just have one more question. Your Jason server is a Java server, why is > > the workaround code in C? Do you use the C server as a wrapper for > > Jason? > > > > Svetlana > > > > > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > > >> Yes, the frame is sent by the dialog manager. My fixup code is in my > >> backend > >> server to parse the inframe. If you write a java version of the fixup > >> code > >> and put it in your java backend, then you can treat the inframe like any > >> other galaxy frame and make a call something like the following to get > >> the > >> inframe properties. > >> > >> String EventType = > >> (String)inframe.getFrame(":event_query").getProperty(":event_type"); > >> > >> The other solution is to change Ravenclaw to not embed the inframe as a > >> string, or at least to make that string a validly-formed galaxy frame. > >> I'll > >> bring this up tomorrow when the group meets. > >> > >> -Thomas > >> > >> > -----Original Message----- > >> > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > >> > Sent: Wednesday, October 04, 2006 12:12 PM > >> > To: Thomas K Harris > >> > Cc: 'Basia Mucha'; 'Dialog Group CMU' > >> > Subject: RE: RavenclawDev: RavenClawDev: reusing agents in another > >> part of > >> > atree > >> > > >> > > >> > Thomas, > >> > The frame is sent by a dialog manager, right? > >> > > >> > In our dialog manager we have an agent which calls add_event method of > >> the > >> > backend and passes an object "event_add" > >> > > >> > > >> > DEFINE_EXECUTE_AGENT( CDBAddEvent, > >> > CALL("java_be.add_event backend_error") > >> > ) > >> > > >> > The framework generates the inframe that is passed to the back end. > >> > > >> > How would do you embed a galaxy frame in a string when making a CALL > >> to > >> > a back end from the dialog manager? > >> > > >> > Is this where your fix-up code comes in? Is your fix-up code part of > >> the > >> > dialog manager (as opposed to being a part of a back-end server)? > >> > > >> > thank you, > >> > Svetlana > >> > > >> > On Wed, 4 Oct 2006, Thomas K Harris wrote: > >> > > >> > > No, it's just the frame that Ravenclaw sends to the backend that has > >> a > >> > > galaxy frame embedded as a string. Its output frame contents are > >> > accessible > >> > > via the normal galaxy frame access calls. > >> > > > >> > > -Thomas > >> > > > >> > > > >> > > -----Original Message----- > >> > > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > >> > > Sent: Wednesday, October 04, 2006 11:14 AM > >> > > To: Thomas K Harris > >> > > Cc: 'Basia Mucha'; 'Dialog Group CMU' > >> > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another > >> part > >> > of > >> > > atree > >> > > > >> > > Thanks Thomas, > >> > > > >> > > in your Jason server you used: > >> > > int i = > >> > > Integer.parseInt((String)f.getFrame(":parse").getProperty(":uttid")); > >> > > > >> > > How did you make that work, did it require some change in RavenClaw? > >> > > > >> > > Svetlana > >> > > > >> > > --------------------------------------------------------- > >> > > Svetlana Stenchikova, Ph.D. Candidate > >> > > Computer Science Department, Stony Brook University > >> > > http://cs.sunysb.edu/~sveta > >> > > sveta at cs.sunysb.edu > >> > > --------------------------------------------------------- > >> > > > >> > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > >> > > > >> > > > Yes, Ravenclaw uses this pseudo-galaxy-frame format for the > >> inframe. I > >> > > wrote > >> > > > some fix-up code that converts these frames to real galaxy frames, > >> but > >> > the > >> > > > code is in c++. The code snippet follows. This is something that > >> > probably > >> > > > needs to be fixed in Ravenclaw eventually, but there's an > >> installed > >> > code > >> > > > base that depends on the current format, so it will take some > >> > > coordination. > >> > > > > >> > > > > >> > > > > >> > > > Gal_PrFrame(f); > >> > > > > >> > > > char* s_inframe = Gal_StringValue(aStr); > >> > > > > >> > > > if(s_inframe) { > >> > > > > >> > > > //frame fixup -> ravenclaw embeds inframe frame > >> > > > > >> > > > ostringstream fixed; > >> > > > > >> > > > string notfixed(s_inframe + 1); > >> > > > > >> > > > istringstream inotfixed(notfixed); > >> > > > > >> > > > fixed << "{c zap "; > >> > > > > >> > > > string token; > >> > > > > >> > > > do { > >> > > > > >> > > > inotfixed >> token; > >> > > > > >> > > > if(token == "}") break; > >> > > > > >> > > > fixed << ':' << token << ' '; > >> > > > > >> > > > char cpVal[255]; > >> > > > > >> > > > inotfixed.ignore(); > >> > > > > >> > > > inotfixed.getline(cpVal, 254); > >> > > > > >> > > > fixed << '"' << cpVal << "\" "; > >> > > > > >> > > > } while(inotfixed); > >> > > > > >> > > > GalUtil_Error("working with fixed version: %s", > >> > > > fixed.str().c_str()); > >> > > > > >> > > > Gal_Frame inframe = > >> > > > Gal_ReadFrameFromString(fixed.str().c_str()); > >> > > > > >> > > > } > >> > > > > >> > > > > >> > > > > >> > > > -Thomas > >> > > > > >> > > > > >> > > > > >> > > > _____ > >> > > > > >> > > > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > >> > > > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On > >> > Behalf > >> > > Of > >> > > > Basia Mucha > >> > > > Sent: Wednesday, October 04, 2006 10:22 AM > >> > > > To: Dan Bohus; Dialog Group CMU > >> > > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in another > >> > part of > >> > > > atree > >> > > > > >> > > > > >> > > > > >> > > > Sorry for the last email, I pressed send by mistake. > >> > > > > >> > > > > >> > > > > >> > > > What I wanted to write: > >> > > > > >> > > > > >> > > > > >> > > > We have created a CalendarBackened that receive GFrames from the > >> > > > DataManagar. > >> > > > > >> > > > The GFrame looks like this: > >> > > > > >> > > > Received frame: > >> > > > {c java_be.get_events > >> > > > :hub_opaque_data {c admin_info > >> > > > :reply_requested 1 > >> > > > :session_id "Default" > >> > > > :invoked_stype "java_be" > >> > > > :tidx 12 > >> > > > :provider_id "[8]" > >> > > > :timestamp [array: type GAL_FLOAT_64, 1 > >> > elements] > >> > > > :scriptless 1 } > >> > > > :session_id "Default" > >> > > > :tidx 12 > >> > > > :inframe "{ > >> > > > event_query { > >> > > > event_type CLASS > >> > > > } > >> > > > > >> > > > } > >> > > > " } > >> > > > > >> > > > I could easity get the inframe by > >> > > > > >> > > > String tokens = ((String)f.getProperty(":inframe")); > >> > > > > >> > > > however is there a way to get the event_type without parsing the > >> > string > >> > > > meaning something like > >> > > > > >> > > > String tokesn = > >> > > > ((String)f.getPropperty(":inframe.event_query.event_type")???? > >> > > > > >> > > > > >> > > > > >> > > > Thank You for all your help. > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > On 10/4/06, Basia Mucha wrote: > >> > > > > >> > > > Received frame: > >> > > > {c java_be.get_events > >> > > > :hub_opaque_data {c admin_info > >> > > > :reply_requested 1 > >> > > > :session_id "Default" > >> > > > :invoked_stype "java_be" > >> > > > :tidx 12 > >> > > > :provider_id "[8]" > >> > > > :timestamp [array: type GAL_FLOAT_64, 1 > >> > elements] > >> > > > :scriptless 1 } > >> > > > :session_id "Default" > >> > > > :tidx 12 > >> > > > :inframe "{ > >> > > > event_query { > >> > > > event_type CLASS > >> > > > } > >> > > > > >> > > > } > >> > > > " } > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > -- > >> > > > Thanks, > >> > > > Basia > >> > > > > >> > > > > >> > > > >> > > > >> > > > >> > >> > >> > > > > > > > From dbohus at cs.cmu.edu Thu Oct 5 11:29:55 2006 From: dbohus at cs.cmu.edu (Dan Bohus) Date: Thu, 5 Oct 2006 11:29:55 -0400 Subject: RavenclawDev: passing frames to back end seervers + front end In-Reply-To: Message-ID: <1546B8BE23C96940B5B4929DB7CC2343909A0C@e2k3.srv.cs.cmu.edu> Svetlana, I think these are all interesting points, and maybe it would be good if you could participate in our ravencalw meetings. Do you think you'd be available for a 4pm phone-call today? (using the same setup as we do in the dialog group). If so, we can discuss this then. I agree, it would be cool to have a nicer UI. Let us know, Tahnks. -Dan > -----Original Message----- > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf > Of Svetlana Stenchikova > Sent: Thursday, October 05, 2006 10:34 AM > To: tkharris at cs.cmu.edu > Cc: 'Dialog Group CMU' > Subject: Re: RavenclawDev: passing frames to back end seervers + front end > > I see - thank you. > Current back end servers (NLG and RavenClaw backend) are perl servers but > are communicated through the C server backendserver2. If you change > RavenClaw to pass frames properly, wouldn't this affect just the > backendserver2? > > So, how does Jason communicate with DM, Does it replace the TTY and act as > TTY by receiving its messages? I have not yet ran Jason, but we will be > also writing a new front-end server to replace the TTY. We don't need it > to work remotely (like Jason), we just need a nicer UI to show a demo, so > I suppose that we do not need the support for sessions that was recently > done to RavenClaw in order to support Jason, right? > If you have any suggestions to us regarding front end server, we would > appreciate them. > > Thank you, > Svetlana > > --------------------------------------------------------- > Svetlana Stenchikova, Ph.D. Candidate > Computer Science Department, Stony Brook University > http://cs.sunysb.edu/~sveta > sveta at cs.sunysb.edu > --------------------------------------------------------- > > On Thu, 5 Oct 2006 tkharris at cs.cmu.edu wrote: > > > Sure, > > > > Oh, the fixup code didn't have anything to do with Jason. Sorry for the > > confusion. The inframe is only intended for the backend, and Jason is a > > front-end component, so the fixup code wasn't required for Jason. The > > reason I have the fixup code is because I needed a new backend, which > > happened to be written in c++. > > > > -Thomas > > > > > Thanks Thomas, this makes sense. > > > I just have one more question. Your Jason server is a Java server, why > is > > > the workaround code in C? Do you use the C server as a wrapper for > > > Jason? > > > > > > Svetlana > > > > > > > > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > > > > >> Yes, the frame is sent by the dialog manager. My fixup code is in my > > >> backend > > >> server to parse the inframe. If you write a java version of the fixup > > >> code > > >> and put it in your java backend, then you can treat the inframe like > any > > >> other galaxy frame and make a call something like the following to > get > > >> the > > >> inframe properties. > > >> > > >> String EventType > > >> (String)inframe.getFrame(":event_query").getProperty(":event_type"); > > >> > > >> The other solution is to change Ravenclaw to not embed the inframe as > a > > >> string, or at least to make that string a validly-formed galaxy > frame. > > >> I'll > > >> bring this up tomorrow when the group meets. > > >> > > >> -Thomas > > >> > > >> > -----Original Message----- > > >> > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > > >> > Sent: Wednesday, October 04, 2006 12:12 PM > > >> > To: Thomas K Harris > > >> > Cc: 'Basia Mucha'; 'Dialog Group CMU' > > >> > Subject: RE: RavenclawDev: RavenClawDev: reusing agents in another > > >> part of > > >> > atree > > >> > > > >> > > > >> > Thomas, > > >> > The frame is sent by a dialog manager, right? > > >> > > > >> > In our dialog manager we have an agent which calls add_event method > of > > >> the > > >> > backend and passes an object "event_add" > > >> > > > >> > > > >> > DEFINE_EXECUTE_AGENT( CDBAddEvent, > > >> > CALL("java_be.add_event backend_error") > > >> > ) > > >> > > > >> > The framework generates the inframe that is passed to the back end. > > >> > > > >> > How would do you embed a galaxy frame in a string when making a > CALL > > >> to > > >> > a back end from the dialog manager? > > >> > > > >> > Is this where your fix-up code comes in? Is your fix-up code part > of > > >> the > > >> > dialog manager (as opposed to being a part of a back-end server)? > > >> > > > >> > thank you, > > >> > Svetlana > > >> > > > >> > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > >> > > > >> > > No, it's just the frame that Ravenclaw sends to the backend that > has > > >> a > > >> > > galaxy frame embedded as a string. Its output frame contents are > > >> > accessible > > >> > > via the normal galaxy frame access calls. > > >> > > > > >> > > -Thomas > > >> > > > > >> > > > > >> > > -----Original Message----- > > >> > > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > > >> > > Sent: Wednesday, October 04, 2006 11:14 AM > > >> > > To: Thomas K Harris > > >> > > Cc: 'Basia Mucha'; 'Dialog Group CMU' > > >> > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in > another > > >> part > > >> > of > > >> > > atree > > >> > > > > >> > > Thanks Thomas, > > >> > > > > >> > > in your Jason server you used: > > >> > > int i > > >> > > > Integer.parseInt((String)f.getFrame(":parse").getProperty(":uttid")); > > >> > > > > >> > > How did you make that work, did it require some change in > RavenClaw? > > >> > > > > >> > > Svetlana > > >> > > > > >> > > --------------------------------------------------------- > > >> > > Svetlana Stenchikova, Ph.D. Candidate > > >> > > Computer Science Department, Stony Brook University > > >> > > http://cs.sunysb.edu/~sveta > > >> > > sveta at cs.sunysb.edu > > >> > > --------------------------------------------------------- > > >> > > > > >> > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > >> > > > > >> > > > Yes, Ravenclaw uses this pseudo-galaxy-frame format for the > > >> inframe. I > > >> > > wrote > > >> > > > some fix-up code that converts these frames to real galaxy > frames, > > >> but > > >> > the > > >> > > > code is in c++. The code snippet follows. This is something > that > > >> > probably > > >> > > > needs to be fixed in Ravenclaw eventually, but there's an > > >> installed > > >> > code > > >> > > > base that depends on the current format, so it will take some > > >> > > coordination. > > >> > > > > > >> > > > > > >> > > > > > >> > > > Gal_PrFrame(f); > > >> > > > > > >> > > > char* s_inframe = Gal_StringValue(aStr); > > >> > > > > > >> > > > if(s_inframe) { > > >> > > > > > >> > > > //frame fixup -> ravenclaw embeds inframe frame > > >> > > > > > >> > > > ostringstream fixed; > > >> > > > > > >> > > > string notfixed(s_inframe + 1); > > >> > > > > > >> > > > istringstream inotfixed(notfixed); > > >> > > > > > >> > > > fixed << "{c zap "; > > >> > > > > > >> > > > string token; > > >> > > > > > >> > > > do { > > >> > > > > > >> > > > inotfixed >> token; > > >> > > > > > >> > > > if(token == "}") break; > > >> > > > > > >> > > > fixed << ':' << token << ' '; > > >> > > > > > >> > > > char cpVal[255]; > > >> > > > > > >> > > > inotfixed.ignore(); > > >> > > > > > >> > > > inotfixed.getline(cpVal, 254); > > >> > > > > > >> > > > fixed << '"' << cpVal << "\" "; > > >> > > > > > >> > > > } while(inotfixed); > > >> > > > > > >> > > > GalUtil_Error("working with fixed version: %s", > > >> > > > fixed.str().c_str()); > > >> > > > > > >> > > > Gal_Frame inframe > > >> > > > Gal_ReadFrameFromString(fixed.str().c_str()); > > >> > > > > > >> > > > } > > >> > > > > > >> > > > > > >> > > > > > >> > > > -Thomas > > >> > > > > > >> > > > > > >> > > > > > >> > > > _____ > > >> > > > > > >> > > > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > > >> > > > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] > On > > >> > Behalf > > >> > > Of > > >> > > > Basia Mucha > > >> > > > Sent: Wednesday, October 04, 2006 10:22 AM > > >> > > > To: Dan Bohus; Dialog Group CMU > > >> > > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in > another > > >> > part of > > >> > > > atree > > >> > > > > > >> > > > > > >> > > > > > >> > > > Sorry for the last email, I pressed send by mistake. > > >> > > > > > >> > > > > > >> > > > > > >> > > > What I wanted to write: > > >> > > > > > >> > > > > > >> > > > > > >> > > > We have created a CalendarBackened that receive GFrames from > the > > >> > > > DataManagar. > > >> > > > > > >> > > > The GFrame looks like this: > > >> > > > > > >> > > > Received frame: > > >> > > > {c java_be.get_events > > >> > > > :hub_opaque_data {c admin_info > > >> > > > :reply_requested 1 > > >> > > > :session_id "Default" > > >> > > > :invoked_stype "java_be" > > >> > > > :tidx 12 > > >> > > > :provider_id "[8]" > > >> > > > :timestamp [array: type GAL_FLOAT_64, 1 > > >> > elements] > > >> > > > :scriptless 1 } > > >> > > > :session_id "Default" > > >> > > > :tidx 12 > > >> > > > :inframe "{ > > >> > > > event_query { > > >> > > > event_type CLASS > > >> > > > } > > >> > > > > > >> > > > } > > >> > > > " } > > >> > > > > > >> > > > I could easity get the inframe by > > >> > > > > > >> > > > String tokens = ((String)f.getProperty(":inframe")); > > >> > > > > > >> > > > however is there a way to get the event_type without parsing > the > > >> > string > > >> > > > meaning something like > > >> > > > > > >> > > > String tokesn > > >> > > > ((String)f.getPropperty(":inframe.event_query.event_type")???? > > >> > > > > > >> > > > > > >> > > > > > >> > > > Thank You for all your help. > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > On 10/4/06, Basia Mucha wrote: > > >> > > > > > >> > > > Received frame: > > >> > > > {c java_be.get_events > > >> > > > :hub_opaque_data {c admin_info > > >> > > > :reply_requested 1 > > >> > > > :session_id "Default" > > >> > > > :invoked_stype "java_be" > > >> > > > :tidx 12 > > >> > > > :provider_id "[8]" > > >> > > > :timestamp [array: type GAL_FLOAT_64, 1 > > >> > elements] > > >> > > > :scriptless 1 } > > >> > > > :session_id "Default" > > >> > > > :tidx 12 > > >> > > > :inframe "{ > > >> > > > event_query { > > >> > > > event_type CLASS > > >> > > > } > > >> > > > > > >> > > > } > > >> > > > " } > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > -- > > >> > > > Thanks, > > >> > > > Basia > > >> > > > > > >> > > > > > >> > > > > >> > > > > >> > > > > >> > > >> > > >> > > > > > > > > > > > > From sveta at cs.sunysb.edu Thu Oct 5 13:43:56 2006 From: sveta at cs.sunysb.edu (Svetlana Stenchikova) Date: Thu, 5 Oct 2006 13:43:56 -0400 (EDT) Subject: RavenclawDev: passing frames to back end seervers + front end In-Reply-To: <1546B8BE23C96940B5B4929DB7CC2343909A0C@e2k3.srv.cs.cmu.edu> References: <1546B8BE23C96940B5B4929DB7CC2343909A0C@e2k3.srv.cs.cmu.edu> Message-ID: Yes, 4 pm today is good for me. I will call the same number as on Fridays. Svetlana --------------------------------------------------------- Svetlana Stenchikova, Ph.D. Candidate Computer Science Department, Stony Brook University http://cs.sunysb.edu/~sveta sveta at cs.sunysb.edu --------------------------------------------------------- On Thu, 5 Oct 2006, Dan Bohus wrote: > Svetlana, > > I think these are all interesting points, and maybe it would be good if > you could participate in our ravencalw meetings. Do you think you'd be > available for a 4pm phone-call today? (using the same setup as we do in > the dialog group). If so, we can discuss this then. I agree, it would be > cool to have a nicer UI. > > Let us know, > Tahnks. > -Dan > > > -----Original Message----- > > From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On > Behalf > > Of Svetlana Stenchikova > > Sent: Thursday, October 05, 2006 10:34 AM > > To: tkharris at cs.cmu.edu > > Cc: 'Dialog Group CMU' > > Subject: Re: RavenclawDev: passing frames to back end seervers + front > end > > > > I see - thank you. > > Current back end servers (NLG and RavenClaw backend) are perl servers > but > > are communicated through the C server backendserver2. If you change > > RavenClaw to pass frames properly, wouldn't this affect just the > > backendserver2? > > > > So, how does Jason communicate with DM, Does it replace the TTY and > act as > > TTY by receiving its messages? I have not yet ran Jason, but we will > be > > also writing a new front-end server to replace the TTY. We don't need > it > > to work remotely (like Jason), we just need a nicer UI to show a demo, > so > > I suppose that we do not need the support for sessions that was > recently > > done to RavenClaw in order to support Jason, right? > > If you have any suggestions to us regarding front end server, we would > > appreciate them. > > > > Thank you, > > Svetlana > > > > --------------------------------------------------------- > > Svetlana Stenchikova, Ph.D. Candidate > > Computer Science Department, Stony Brook University > > http://cs.sunysb.edu/~sveta > > sveta at cs.sunysb.edu > > --------------------------------------------------------- > > > > On Thu, 5 Oct 2006 tkharris at cs.cmu.edu wrote: > > > > > Sure, > > > > > > Oh, the fixup code didn't have anything to do with Jason. Sorry for > the > > > confusion. The inframe is only intended for the backend, and Jason > is a > > > front-end component, so the fixup code wasn't required for Jason. > The > > > reason I have the fixup code is because I needed a new backend, > which > > > happened to be written in c++. > > > > > > -Thomas > > > > > > > Thanks Thomas, this makes sense. > > > > I just have one more question. Your Jason server is a Java server, > why > > is > > > > the workaround code in C? Do you use the C server as a wrapper for > > > > Jason? > > > > > > > > Svetlana > > > > > > > > > > > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > > > > > > >> Yes, the frame is sent by the dialog manager. My fixup code is in > my > > > >> backend > > > >> server to parse the inframe. If you write a java version of the > fixup > > > >> code > > > >> and put it in your java backend, then you can treat the inframe > like > > any > > > >> other galaxy frame and make a call something like the following > to > > get > > > >> the > > > >> inframe properties. > > > >> > > > >> String EventType > > > >> > (String)inframe.getFrame(":event_query").getProperty(":event_type"); > > > >> > > > >> The other solution is to change Ravenclaw to not embed the > inframe as > > a > > > >> string, or at least to make that string a validly-formed galaxy > > frame. > > > >> I'll > > > >> bring this up tomorrow when the group meets. > > > >> > > > >> -Thomas > > > >> > > > >> > -----Original Message----- > > > >> > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > > > >> > Sent: Wednesday, October 04, 2006 12:12 PM > > > >> > To: Thomas K Harris > > > >> > Cc: 'Basia Mucha'; 'Dialog Group CMU' > > > >> > Subject: RE: RavenclawDev: RavenClawDev: reusing agents in > another > > > >> part of > > > >> > atree > > > >> > > > > >> > > > > >> > Thomas, > > > >> > The frame is sent by a dialog manager, right? > > > >> > > > > >> > In our dialog manager we have an agent which calls add_event > method > > of > > > >> the > > > >> > backend and passes an object "event_add" > > > >> > > > > >> > > > > >> > DEFINE_EXECUTE_AGENT( CDBAddEvent, > > > >> > CALL("java_be.add_event backend_error") > > > >> > ) > > > >> > > > > >> > The framework generates the inframe that is passed to the back > end. > > > >> > > > > >> > How would do you embed a galaxy frame in a string when making a > > CALL > > > >> to > > > >> > a back end from the dialog manager? > > > >> > > > > >> > Is this where your fix-up code comes in? Is your fix-up code > part > > of > > > >> the > > > >> > dialog manager (as opposed to being a part of a back-end > server)? > > > >> > > > > >> > thank you, > > > >> > Svetlana > > > >> > > > > >> > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > > >> > > > > >> > > No, it's just the frame that Ravenclaw sends to the backend > that > > has > > > >> a > > > >> > > galaxy frame embedded as a string. Its output frame contents > are > > > >> > accessible > > > >> > > via the normal galaxy frame access calls. > > > >> > > > > > >> > > -Thomas > > > >> > > > > > >> > > > > > >> > > -----Original Message----- > > > >> > > From: Svetlana Stenchikova [mailto:sveta at cs.sunysb.edu] > > > >> > > Sent: Wednesday, October 04, 2006 11:14 AM > > > >> > > To: Thomas K Harris > > > >> > > Cc: 'Basia Mucha'; 'Dialog Group CMU' > > > >> > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in > > another > > > >> part > > > >> > of > > > >> > > atree > > > >> > > > > > >> > > Thanks Thomas, > > > >> > > > > > >> > > in your Jason server you used: > > > >> > > int i > > > >> > > > > Integer.parseInt((String)f.getFrame(":parse").getProperty(":uttid")); > > > >> > > > > > >> > > How did you make that work, did it require some change in > > RavenClaw? > > > >> > > > > > >> > > Svetlana > > > >> > > > > > >> > > --------------------------------------------------------- > > > >> > > Svetlana Stenchikova, Ph.D. Candidate > > > >> > > Computer Science Department, Stony Brook University > > > >> > > http://cs.sunysb.edu/~sveta > > > >> > > sveta at cs.sunysb.edu > > > >> > > --------------------------------------------------------- > > > >> > > > > > >> > > On Wed, 4 Oct 2006, Thomas K Harris wrote: > > > >> > > > > > >> > > > Yes, Ravenclaw uses this pseudo-galaxy-frame format for the > > > >> inframe. I > > > >> > > wrote > > > >> > > > some fix-up code that converts these frames to real galaxy > > frames, > > > >> but > > > >> > the > > > >> > > > code is in c++. The code snippet follows. This is something > > that > > > >> > probably > > > >> > > > needs to be fixed in Ravenclaw eventually, but there's an > > > >> installed > > > >> > code > > > >> > > > base that depends on the current format, so it will take > some > > > >> > > coordination. > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > Gal_PrFrame(f); > > > >> > > > > > > >> > > > char* s_inframe = Gal_StringValue(aStr); > > > >> > > > > > > >> > > > if(s_inframe) { > > > >> > > > > > > >> > > > //frame fixup -> ravenclaw embeds inframe frame > > > >> > > > > > > >> > > > ostringstream fixed; > > > >> > > > > > > >> > > > string notfixed(s_inframe + 1); > > > >> > > > > > > >> > > > istringstream inotfixed(notfixed); > > > >> > > > > > > >> > > > fixed << "{c zap "; > > > >> > > > > > > >> > > > string token; > > > >> > > > > > > >> > > > do { > > > >> > > > > > > >> > > > inotfixed >> token; > > > >> > > > > > > >> > > > if(token == "}") break; > > > >> > > > > > > >> > > > fixed << ':' << token << ' '; > > > >> > > > > > > >> > > > char cpVal[255]; > > > >> > > > > > > >> > > > inotfixed.ignore(); > > > >> > > > > > > >> > > > inotfixed.getline(cpVal, 254); > > > >> > > > > > > >> > > > fixed << '"' << cpVal << "\" "; > > > >> > > > > > > >> > > > } while(inotfixed); > > > >> > > > > > > >> > > > GalUtil_Error("working with fixed version: %s", > > > >> > > > fixed.str().c_str()); > > > >> > > > > > > >> > > > Gal_Frame inframe > > > >> > > > Gal_ReadFrameFromString(fixed.str().c_str()); > > > >> > > > > > > >> > > > } > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > -Thomas > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > _____ > > > >> > > > > > > >> > > > From: > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > > > >> > > > > [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] > > On > > > >> > Behalf > > > >> > > Of > > > >> > > > Basia Mucha > > > >> > > > Sent: Wednesday, October 04, 2006 10:22 AM > > > >> > > > To: Dan Bohus; Dialog Group CMU > > > >> > > > Subject: Re: RavenclawDev: RavenClawDev: reusing agents in > > another > > > >> > part of > > > >> > > > atree > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > Sorry for the last email, I pressed send by mistake. > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > What I wanted to write: > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > We have created a CalendarBackened that receive GFrames > from > > the > > > >> > > > DataManagar. > > > >> > > > > > > >> > > > The GFrame looks like this: > > > >> > > > > > > >> > > > Received frame: > > > >> > > > {c java_be.get_events > > > >> > > > :hub_opaque_data {c admin_info > > > >> > > > :reply_requested 1 > > > >> > > > :session_id "Default" > > > >> > > > :invoked_stype "java_be" > > > >> > > > :tidx 12 > > > >> > > > :provider_id "[8]" > > > >> > > > :timestamp [array: type > GAL_FLOAT_64, 1 > > > >> > elements] > > > >> > > > :scriptless 1 } > > > >> > > > :session_id "Default" > > > >> > > > :tidx 12 > > > >> > > > :inframe "{ > > > >> > > > event_query { > > > >> > > > event_type CLASS > > > >> > > > } > > > >> > > > > > > >> > > > } > > > >> > > > " } > > > >> > > > > > > >> > > > I could easity get the inframe by > > > >> > > > > > > >> > > > String tokens = ((String)f.getProperty(":inframe")); > > > >> > > > > > > >> > > > however is there a way to get the event_type without > parsing > > the > > > >> > string > > > >> > > > meaning something like > > > >> > > > > > > >> > > > String tokesn > > > >> > > > > ((String)f.getPropperty(":inframe.event_query.event_type")???? > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > Thank You for all your help. > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > On 10/4/06, Basia Mucha wrote: > > > >> > > > > > > >> > > > Received frame: > > > >> > > > {c java_be.get_events > > > >> > > > :hub_opaque_data {c admin_info > > > >> > > > :reply_requested 1 > > > >> > > > :session_id "Default" > > > >> > > > :invoked_stype "java_be" > > > >> > > > :tidx 12 > > > >> > > > :provider_id "[8]" > > > >> > > > :timestamp [array: type > GAL_FLOAT_64, 1 > > > >> > elements] > > > >> > > > :scriptless 1 } > > > >> > > > :session_id "Default" > > > >> > > > :tidx 12 > > > >> > > > :inframe "{ > > > >> > > > event_query { > > > >> > > > event_type CLASS > > > >> > > > } > > > >> > > > > > > >> > > > } > > > >> > > > " } > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > -- > > > >> > > > Thanks, > > > >> > > > Basia > > > >> > > > > > > >> > > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > >> > > > >> > > > > > > > > > > > > > > > > > > > From dbohus at cs.cmu.edu Thu Oct 5 19:39:32 2006 From: dbohus at cs.cmu.edu (Dan Bohus) Date: Thu, 5 Oct 2006 19:39:32 -0400 Subject: RavenclawDev: Today's meeting... Message-ID: <1546B8BE23C96940B5B4929DB7CC2343909A68@e2k3.srv.cs.cmu.edu> Hi guys, Here are the notes of today's ravenclaw meeting: 1. VS 2003/2005 - let's plan to switch: svetlana will let us know if she can use 2005; - step 1: we diff thomas' versions with the latest VSS of our versions - step 2: we up to 2005 [ ] thomas will send an email about diffs ... 2. ProcessMonitor: [ ] no more reboots [ ] emails configuration is still in the works... [ ] add an attribute to the startlist so that stuff starts minimized, (maybe a button) [ ] button for each process - how about the python process monitor from galaxy (Thomas) 3. Towards a RavenClaw debugger: get in touch with J and Udhay about this 4. VoIP/Asterix ... 5. User Interface ... - dan will send the TTYRecognition (latest) - thomas will send the java TTY / 6. Change in RavenClaw / Backend2 to use actual galaxy frames... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061005/072edf67/attachment.html From svetastenchikova at gmail.com Sat Oct 7 14:48:21 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Sat, 7 Oct 2006 14:48:21 -0400 Subject: RavenclawDev: dialog manager, execute code when agent is placed on a stack Message-ID: <31cecd6b0610071148r2b2f6417y6aced15e80fbc67@mail.gmail.com> Hi, I would like to execute some code (set a concept value) when an agent is placed on a stack. Can I use any of the existing operations to do this or would I have to create a separate execute agent to do this? I tried ON_INITIALIZATION but it gets executed before the concept is even defined ON_REOPEN does not seem to get executed when an agent is placed on the stack. thank you Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061007/446c3a5e/attachment.html From svetastenchikova at gmail.com Tue Oct 10 17:41:08 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Tue, 10 Oct 2006 17:41:08 -0400 Subject: RavenclawDev: returning frame from a back end Message-ID: <31cecd6b0610101441j10dc66a4g44f51a7944e0d021@mail.gmail.com> Hi, How should a back-end function of a ravenclaw dialog manager format a frame? For example, I am expecting to get a "error" parameter from: CALL("java_be.add_event backend_error") backend_error is declared as: BOOL_SYSTEM_CONCEPT(backend_error) In the java back-end: public GFrame serverOpAddEvent(GFrame f) { ... GFrame eventAdded = new Clause("event_add"); eventAdded.setProperty("error", "false"); return eventAdded; } But the backend_error in DM does not get initialized. Is there a particular way that the return GFrame from the backend server has to be generated? Thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061010/e2a9d26f/attachment-0001.html From dbohus at cs.cmu.edu Tue Oct 10 17:51:41 2006 From: dbohus at cs.cmu.edu (Dan Bohus) Date: Tue, 10 Oct 2006 17:51:41 -0400 Subject: RavenclawDev: returning frame from a back end In-Reply-To: <31cecd6b0610101441j10dc66a4g44f51a7944e0d021@mail.gmail.com> Message-ID: <1546B8BE23C96940B5B4929DB7CC2343909C21@e2k3.srv.cs.cmu.edu> Hi Svetlana, I think this is the same problem with "Ravenclaw frames" and "galaxy frames" but on the output side. Basically what you're doing in the code below is constructing a galaxy frame. Instead ravenclaw expects a single string in that galaxy frame which contains the information in a single string in the "string Ravenclaw frame" format... If this message is too cryptic, let me know and I can send you more details, Dan ________________________________ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of Svetlana Stenchikova Sent: Tuesday, October 10, 2006 5:41 PM To: ravenclaw-developers at cs.cmu.edu Subject: RavenclawDev: returning frame from a back end Hi, How should a back-end function of a ravenclaw dialog manager format a frame? For example, I am expecting to get a "error" parameter from: CALL("java_be.add_event backend_error") backend_error is declared as: BOOL_SYSTEM_CONCEPT(backend_error) In the java back-end: public GFrame serverOpAddEvent(GFrame f) { ... GFrame eventAdded = new Clause("event_add"); eventAdded.setProperty("error", "false"); return eventAdded; } But the backend_error in DM does not get initialized. Is there a particular way that the return GFrame from the backend server has to be generated? Thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061010/22f51aa8/attachment.html From svetastenchikova at gmail.com Tue Oct 10 18:46:50 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Tue, 10 Oct 2006 18:46:50 -0400 Subject: RavenclawDev: returning frame from a back end In-Reply-To: <1546B8BE23C96940B5B4929DB7CC2343909C21@e2k3.srv.cs.cmu.edu> References: <31cecd6b0610101441j10dc66a4g44f51a7944e0d021@mail.gmail.com> <1546B8BE23C96940B5B4929DB7CC2343909C21@e2k3.srv.cs.cmu.edu> Message-ID: <31cecd6b0610101546x59906a22mde72569ff7f4a72c@mail.gmail.com> Thanks Dan, this generally makes sense, but I am not sure how to do this in the java server. The operation function in the java galaxy service returns a GFrame. I can set properties of this frame in any way, but I must return a GFrame, I think. I tried declaring an operation that returns String and it causes runtime exception: java.lang.ClassCastException: java.lang.String This is how a RoomLine return from a perl back end looks like: { suggested_refine none error false results :1 { { date_time { time { start_time 1700 end_time 1800 } date { valid_date true year 2006 month 10 day 11 weekday 3 } } room_size 30 room_projector true room_whiteboard true room_computer true room_network true room_location Wean Hall room_size_spec large room_number 4625 } } } And here is how my java back end frame looks like: Server environment sending frame: {c java_be.add_event error "false" :hub_opaque_data {c admin_info :reply_requested 1 :session_id "Default" :tidx 70 :scriptless 1 :timestamp [array: type GAL_FLOAT_64, 1 elements] :provider_id "[8]" :invoked_stype "java_be" } } Please make a suggestion on how to return a string from a java server. thank you, Svetlana On 10/10/06, Dan Bohus wrote: > > Hi Svetlana, > > > > I think this is the same problem with "Ravenclaw frames" and "galaxy > frames" but on the output side. Basically what you're doing in the code > below is constructing a galaxy frame. Instead ravenclaw expects a single > string in that galaxy frame which contains the information in a single > string in the "string Ravenclaw frame" format? > > > > If this message is too cryptic, let me know and I can send you more > details, > > Dan > > > ------------------------------ > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] *On Behalf Of *Svetlana > Stenchikova > *Sent:* Tuesday, October 10, 2006 5:41 PM > *To:* ravenclaw-developers at cs.cmu.edu > *Subject:* RavenclawDev: returning frame from a back end > > > > Hi, > > How should a back-end function of a ravenclaw dialog manager format a > frame? > > For example, I am expecting to get a "error" parameter from: > > CALL("java_be.add_event backend_error") > > backend_error is declared as: > BOOL_SYSTEM_CONCEPT(backend_error) > > In the java back-end: > > public GFrame serverOpAddEvent(GFrame f) { > ... > > GFrame eventAdded = new Clause("event_add"); > > eventAdded.setProperty("error", "false"); > > return eventAdded; > } > > > But the backend_error in DM does not get initialized. > > Is there a particular way that the return GFrame from the backend server > has to be generated? > > Thank you, > Svetlana > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061010/af5a5e7f/attachment.html From svetastenchikova at gmail.com Wed Oct 11 11:59:42 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Wed, 11 Oct 2006 11:59:42 -0400 Subject: RavenclawDev: changes in request.pm cause no output in TTY Message-ID: <31cecd6b0610110859x3c8bb67ck942f8760a42207ac@mail.gmail.com> Hi, I just made some changes to request.pm and I stopped getting any output in TTY after the "welcome" message. No servers crash, there are no errors that I can see. If I put he old request.pm, it works again. Does anyone know what could possibly cause this? (I made many changes and don't want to revert all the way to original..) thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061011/d45d7dcd/attachment-0001.html From tkharris at cs.cmu.edu Wed Oct 11 12:05:19 2006 From: tkharris at cs.cmu.edu (Thomas K Harris) Date: Wed, 11 Oct 2006 12:05:19 -0400 Subject: RavenclawDev: changes in request.pm cause no output in TTY In-Reply-To: <31cecd6b0610110859x3c8bb67ck942f8760a42207ac@mail.gmail.com> Message-ID: <004801c6ed4f$0c8f1220$e6cb0280@speech.cs.cmu.edu> There's one off-the-wall possibility. I think that pm files themselves have to evaluate to "true". It's usually done by putting a 1; at the end of the file which perhaps you elided. But that's just a wild guess. Can you send a diff? -Thomas _____ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of Svetlana Stenchikova Sent: Wednesday, October 11, 2006 12:00 PM To: ravenclaw-developers at cs.cmu.edu Subject: RavenclawDev: changes in request.pm cause no output in TTY Hi, I just made some changes to request.pm and I stopped getting any output in TTY after the "welcome" message. No servers crash, there are no errors that I can see. If I put he old request.pm, it works again. Does anyone know what could possibly cause this? (I made many changes and don't want to revert all the way to original..) thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061011/9e9edf68/attachment.html From svetastenchikova at gmail.com Wed Oct 11 12:25:23 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Wed, 11 Oct 2006 12:25:23 -0400 Subject: RavenclawDev: changes in request.pm cause no output in TTY In-Reply-To: <004801c6ed4f$0c8f1220$e6cb0280@speech.cs.cmu.edu> References: <31cecd6b0610110859x3c8bb67ck942f8760a42207ac@mail.gmail.com> <004801c6ed4f$0c8f1220$e6cb0280@speech.cs.cmu.edu> Message-ID: <31cecd6b0610110925q54cd6478p9651bab7a62a63b0@mail.gmail.com> Thanks Thomas, I tried adding 1; it still did not work. The old version of Request.pm did not have a 1; either. Attaching the diff. Don't worry about it if it is not clear right away, then I just need to add changes one by one. thank you, Svetlana On 10/11/06, Thomas K Harris wrote: > > There's one off-the-wall possibility. I think that pm files themselves > have to evaluate to "true". It's usually done by putting a > > > > 1; > > > > at the end of the file which perhaps you elided. But that's just a wild > guess. Can you send a diff? > > > > -Thomas > > > ------------------------------ > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] *On Behalf Of *Svetlana > Stenchikova > *Sent:* Wednesday, October 11, 2006 12:00 PM > *To:* ravenclaw-developers at cs.cmu.edu > *Subject:* RavenclawDev: changes in request.pm cause no output in TTY > > > > Hi, > > I just made some changes to request.pm and I stopped getting any output > in TTY after the "welcome" message. > > No servers crash, there are no errors that I can see. If I put he old > request.pm, it works again. > > Does anyone know what could possibly cause this? (I made many changes and > don't want to revert all the way to original..) > > > thank you, > Svetlana > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061011/2ad0fe08/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: dump Type: application/octet-stream Size: 14174 bytes Desc: not available Url : http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061011/2ad0fe08/dump-0001.obj From antoine at cs.cmu.edu Wed Oct 11 12:58:59 2006 From: antoine at cs.cmu.edu (Antoine Raux) Date: Wed, 11 Oct 2006 12:58:59 -0400 Subject: RavenclawDev: changes in request.pm cause no output in TTY In-Reply-To: <31cecd6b0610110925q54cd6478p9651bab7a62a63b0@mail.gmail.com> Message-ID: <00fe01c6ed56$8b978050$03bd0280@sp.cs.cmu.edu> Hi Svetlana, I'm not sure what is the direction of the diff but if < indicate the old and > indicate the new (non-working) version, you seem to be missing a comma at the end of line 64 (first block of the diff file). Generally speaking, missing commas (between a => b elements of the hash) are a common source of NLG crashes. You might wanna check that. antoine _____ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of Svetlana Stenchikova Sent: Wednesday, October 11, 2006 12:25 PM To: Thomas K Harris Cc: ravenclaw-developers at cs.cmu.edu Subject: Re: RavenclawDev: changes in request.pm cause no output in TTY Thanks Thomas, I tried adding 1; it still did not work. The old version of Request.pm did not have a 1; either. Attaching the diff. Don't worry about it if it is not clear right away, then I just need to add changes one by one. thank you, Svetlana On 10/11/06, Thomas K Harris wrote: There's one off-the-wall possibility. I think that pm files themselves have to evaluate to "true". It's usually done by putting a 1; at the end of the file which perhaps you elided. But that's just a wild guess. Can you send a diff? -Thomas _____ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of Svetlana Stenchikova Sent: Wednesday, October 11, 2006 12:00 PM To: ravenclaw-developers at cs.cmu.edu Subject: RavenclawDev: changes in request.pm cause no output in TTY Hi, I just made some changes to request.pm and I stopped getting any output in TTY after the "welcome" message. No servers crash, there are no errors that I can see. If I put he old request.pm, it works again. Does anyone know what could possibly cause this? (I made many changes and don't want to revert all the way to original..) thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061011/3ede0def/attachment.html From svetastenchikova at gmail.com Wed Oct 11 13:47:55 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Wed, 11 Oct 2006 13:47:55 -0400 Subject: RavenclawDev: changes in request.pm cause no output in TTY In-Reply-To: <00fe01c6ed56$8b978050$03bd0280@sp.cs.cmu.edu> References: <31cecd6b0610110925q54cd6478p9651bab7a62a63b0@mail.gmail.com> <00fe01c6ed56$8b978050$03bd0280@sp.cs.cmu.edu> Message-ID: <31cecd6b0610111047p3c4046abif1e00c167d1c4d16@mail.gmail.com> Thanks Antoine, You are correct: < indicates old > indicates new If you are refering to line 64 of the file that i sent, it is "< old" line. I will try to look for the missing "," Svetlana On 10/11/06, Antoine Raux wrote: > > Hi Svetlana, > > > > I'm not sure what is the direction of the diff but if < indicate the old > and > indicate the new (non-working) version, you seem to be missing a comma > at the end of line 64 (first block of the diff file). Generally speaking, > missing commas (between a => b elements of the hash) are a common source of > NLG crashes? You might wanna check that. > > > > antoine > > > ------------------------------ > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] *On Behalf Of *Svetlana > Stenchikova > *Sent:* Wednesday, October 11, 2006 12:25 PM > *To:* Thomas K Harris > *Cc:* ravenclaw-developers at cs.cmu.edu > *Subject:* Re: RavenclawDev: changes in request.pm cause no output in TTY > > > > Thanks Thomas, I tried adding 1; it still did not work. The old version of > Request.pm did not have a 1; either. > > Attaching the diff. Don't worry about it if it is not clear right away, > then I just need to add changes one by one. > > thank you, > Svetlana > > On 10/11/06, *Thomas K Harris* wrote: > > There's one off-the-wall possibility. I think that pm files themselves > have to evaluate to "true". It's usually done by putting a > > > > 1; > > > > at the end of the file which perhaps you elided. But that's just a wild > guess. Can you send a diff? > > > > -Thomas > > > ------------------------------ > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] *On Behalf Of *Svetlana > Stenchikova > *Sent:* Wednesday, October 11, 2006 12:00 PM > *To:* ravenclaw-developers at cs.cmu.edu > *Subject:* RavenclawDev: changes in request.pm cause no output in TTY > > > > Hi, > > I just made some changes to request.pm and I stopped getting any output > in TTY after the "welcome" message. > > No servers crash, there are no errors that I can see. If I put he old > request.pm, it works again. > > Does anyone know what could possibly cause this? (I made many changes and > don't want to revert all the way to original..) > > > thank you, > Svetlana > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061011/785c9337/attachment.html From svetastenchikova at gmail.com Wed Oct 11 14:58:53 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Wed, 11 Oct 2006 14:58:53 -0400 Subject: RavenclawDev: changes in request.pm cause no output in TTY In-Reply-To: <31cecd6b0610111047p3c4046abif1e00c167d1c4d16@mail.gmail.com> References: <31cecd6b0610110925q54cd6478p9651bab7a62a63b0@mail.gmail.com> <00fe01c6ed56$8b978050$03bd0280@sp.cs.cmu.edu> <31cecd6b0610111047p3c4046abif1e00c167d1c4d16@mail.gmail.com> Message-ID: <31cecd6b0610111158s3d40ff6ar3b8501708eaaf2be@mail.gmail.com> I found the bug! I had: "what_can_i_say" => return "you can say something like 'four pm'" "return" is illegal here. Strangely nothing crashed, which made it hard to track the bug. Thank you for your answers. Svetlana On 10/11/06, Svetlana Stenchikova wrote: > > Thanks Antoine, > > You are correct: > < indicates old > > indicates new > > If you are refering to line 64 of the file that i sent, it is "< old" > line. > I will try to look for the missing "," > > Svetlana > > On 10/11/06, Antoine Raux wrote: > > > > Hi Svetlana, > > > > > > > > I'm not sure what is the direction of the diff but if < indicate the old > > and > indicate the new (non-working) version, you seem to be missing a comma > > at the end of line 64 (first block of the diff file). Generally speaking, > > missing commas (between a => b elements of the hash) are a common source of > > NLG crashes? You might wanna check that. > > > > > > > > antoine > > > > > > ------------------------------ > > > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] * On Behalf Of *Svetlana > > Stenchikova > > *Sent:* Wednesday, October 11, 2006 12:25 PM > > *To:* Thomas K Harris > > *Cc:* ravenclaw-developers at cs.cmu.edu > > *Subject:* Re: RavenclawDev: changes in request.pm cause no output in > > TTY > > > > > > > > Thanks Thomas, I tried adding 1; it still did not work. The old version > > of Request.pm did not have a 1; either. > > > > Attaching the diff. Don't worry about it if it is not clear right away, > > then I just need to add changes one by one. > > > > thank you, > > Svetlana > > > > On 10/11/06, *Thomas K Harris* wrote: > > > > There's one off-the-wall possibility. I think that pm files themselves > > have to evaluate to "true". It's usually done by putting a > > > > > > > > 1; > > > > > > > > at the end of the file which perhaps you elided. But that's just a wild > > guess. Can you send a diff? > > > > > > > > -Thomas > > > > > > ------------------------------ > > > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] * On Behalf Of *Svetlana > > Stenchikova > > *Sent:* Wednesday, October 11, 2006 12:00 PM > > *To:* ravenclaw-developers at cs.cmu.edu > > *Subject:* RavenclawDev: changes in request.pm cause no output in TTY > > > > > > > > Hi, > > > > I just made some changes to request.pm and I stopped getting any output > > in TTY after the "welcome" message. > > > > No servers crash, there are no errors that I can see. If I put he old > > request.pm, it works again. > > > > Does anyone know what could possibly cause this? (I made many changes > > and don't want to revert all the way to original..) > > > > > > thank you, > > Svetlana > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061011/1aead177/attachment-0001.html From svetastenchikova at gmail.com Wed Oct 11 15:31:54 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Wed, 11 Oct 2006 15:31:54 -0400 Subject: RavenclawDev: returning frame from a back end In-Reply-To: <31cecd6b0610101546x59906a22mde72569ff7f4a72c@mail.gmail.com> References: <31cecd6b0610101441j10dc66a4g44f51a7944e0d021@mail.gmail.com> <1546B8BE23C96940B5B4929DB7CC2343909C21@e2k3.srv.cs.cmu.edu> <31cecd6b0610101546x59906a22mde72569ff7f4a72c@mail.gmail.com> Message-ID: <31cecd6b0610111231p63ca5545w391e98e633ec092e@mail.gmail.com> Do you think it is possible to return a structure from a java back-end in a format expected by RavenClaw? If so, could you please recomment how, and if not, could someone point to the place in RavenClaw that I could modify to work around this issue? I am sorry to bother you with this question, but we have a demo coming up and listing the events is one of the essential functionality that we wanted to show. Thank you all for your help! Svetlana On 10/10/06, Svetlana Stenchikova wrote: > > Thanks Dan, > > this generally makes sense, but I am not sure how to do this in the java > server. > > The operation function in the java galaxy service returns a GFrame. > > I can set properties of this frame in any way, but I must return a GFrame, > I think. I tried declaring an operation that returns String and it causes > runtime exception: > java.lang.ClassCastException: java.lang.String > > > This is how a RoomLine return from a perl back end looks like: > > { > suggested_refine none > error false > results :1 > { > { > date_time { > time { > start_time 1700 > end_time 1800 > } > date { > valid_date true > year 2006 > month 10 > day 11 > weekday 3 > } > } > room_size 30 > room_projector true > room_whiteboard true > room_computer true > room_network true > room_location Wean Hall > room_size_spec large > room_number 4625 > } > } > } > > > And here is how my java back end frame looks like: > > Server environment sending frame: > {c java_be.add_event > error "false" > :hub_opaque_data {c admin_info > :reply_requested 1 > :session_id "Default" > :tidx 70 > :scriptless 1 > :timestamp [array: type GAL_FLOAT_64, 1 elements] > :provider_id "[8]" > :invoked_stype "java_be" } } > > Please make a suggestion on how to return a string from a java server. > > thank you, > Svetlana > > On 10/10/06, Dan Bohus wrote: > > > > Hi Svetlana, > > > > > > > > I think this is the same problem with "Ravenclaw frames" and "galaxy > > frames" but on the output side. Basically what you're doing in the code > > below is constructing a galaxy frame. Instead ravenclaw expects a single > > string in that galaxy frame which contains the information in a single > > string in the "string Ravenclaw frame" format? > > > > > > > > If this message is too cryptic, let me know and I can send you more > > details, > > > > Dan > > > > > > ------------------------------ > > > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] * On Behalf Of *Svetlana > > Stenchikova > > *Sent:* Tuesday, October 10, 2006 5:41 PM > > *To:* ravenclaw-developers at cs.cmu.edu > > *Subject:* RavenclawDev: returning frame from a back end > > > > > > > > Hi, > > > > How should a back-end function of a ravenclaw dialog manager format a > > frame? > > > > For example, I am expecting to get a "error" parameter from: > > > > CALL("java_be.add_event backend_error") > > > > backend_error is declared as: > > BOOL_SYSTEM_CONCEPT(backend_error) > > > > In the java back-end: > > > > public GFrame serverOpAddEvent(GFrame f) { > > ... > > > > GFrame eventAdded = new Clause("event_add"); > > > > eventAdded.setProperty("error", "false"); > > > > return eventAdded; > > } > > > > > > But the backend_error in DM does not get initialized. > > > > Is there a particular way that the return GFrame from the backend server > > has to be generated? > > > > Thank you, > > Svetlana > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061011/30e32089/attachment.html From dbohus at cs.cmu.edu Wed Oct 11 16:04:15 2006 From: dbohus at cs.cmu.edu (Dan Bohus) Date: Wed, 11 Oct 2006 16:04:15 -0400 Subject: RavenclawDev: returning frame from a back end In-Reply-To: <31cecd6b0610111231p63ca5545w391e98e633ec092e@mail.gmail.com> Message-ID: <1546B8BE23C96940B5B4929DB7CC2343AC483C@e2k3.srv.cs.cmu.edu> Hi Svetlana, Yes, you should indeed return a GFrame from the java backend server. This GFrame should contain one string element, called :outframe which contains the string representation you had below of the desired structure (e.g. like for instance the RoomLine perl returns it). If you look into the BackendServer for RoomLine, essentially what that does is take that string representation and put it in an outframe string slot in a galaxy return frame. Hope this helps, but let me know if it doesn't Dan ________________________________ From: Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] Sent: Wednesday, October 11, 2006 3:32 PM To: Dan Bohus Cc: ravenclaw-developers at cs.cmu.edu Subject: Re: RavenclawDev: returning frame from a back end Do you think it is possible to return a structure from a java back-end in a format expected by RavenClaw? If so, could you please recomment how, and if not, could someone point to the place in RavenClaw that I could modify to work around this issue? I am sorry to bother you with this question, but we have a demo coming up and listing the events is one of the essential functionality that we wanted to show. Thank you all for your help! Svetlana On 10/10/06, Svetlana Stenchikova wrote: Thanks Dan, this generally makes sense, but I am not sure how to do this in the java server. The operation function in the java galaxy service returns a GFrame. I can set properties of this frame in any way, but I must return a GFrame, I think. I tried declaring an operation that returns String and it causes runtime exception: java.lang.ClassCastException: java.lang.String This is how a RoomLine return from a perl back end looks like: { suggested_refine none error false results :1 { { date_time { time { start_time 1700 end_time 1800 } date { valid_date true year 2006 month 10 day 11 weekday 3 } } room_size 30 room_projector true room_whiteboard true room_computer true room_network true room_location Wean Hall room_size_spec large room_number 4625 } } } And here is how my java back end frame looks like: Server environment sending frame: {c java_be.add_event error "false" :hub_opaque_data {c admin_info :reply_requested 1 :session_id "Default" :tidx 70 :scriptless 1 :timestamp [array: type GAL_FLOAT_64, 1 elements] :provider_id "[8]" :invoked_stype "java_be" } } Please make a suggestion on how to return a string from a java server. thank you, Svetlana On 10/10/06, Dan Bohus wrote: Hi Svetlana, I think this is the same problem with "Ravenclaw frames" and "galaxy frames" but on the output side. Basically what you're doing in the code below is constructing a galaxy frame. Instead ravenclaw expects a single string in that galaxy frame which contains the information in a single string in the "string Ravenclaw frame" format... If this message is too cryptic, let me know and I can send you more details, Dan ________________________________ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of Svetlana Stenchikova Sent: Tuesday, October 10, 2006 5:41 PM To: ravenclaw-developers at cs.cmu.edu Subject: RavenclawDev: returning frame from a back end Hi, How should a back-end function of a ravenclaw dialog manager format a frame? For example, I am expecting to get a "error" parameter from: CALL("java_be.add_event backend_error") backend_error is declared as: BOOL_SYSTEM_CONCEPT(backend_error) In the java back-end: public GFrame serverOpAddEvent(GFrame f) { ... GFrame eventAdded = new Clause("event_add"); eventAdded.setProperty("error", "false"); return eventAdded; } But the backend_error in DM does not get initialized. Is there a particular way that the return GFrame from the backend server has to be generated? Thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061011/3b70bf97/attachment-0001.html From svetastenchikova at gmail.com Thu Oct 12 00:23:47 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Thu, 12 Oct 2006 00:23:47 -0400 Subject: RavenclawDev: returning frame from a back end In-Reply-To: <1546B8BE23C96940B5B4929DB7CC2343AC483C@e2k3.srv.cs.cmu.edu> References: <31cecd6b0610111231p63ca5545w391e98e633ec092e@mail.gmail.com> <1546B8BE23C96940B5B4929DB7CC2343AC483C@e2k3.srv.cs.cmu.edu> Message-ID: <31cecd6b0610112123r4a497540wdbb5ef256c7d5d8@mail.gmail.com> OK, it worked after several replacements were done to the string: GFrame eventAdded = new Clause(""); String strRes = tempFrame.toString(); String newstr1 = strRes.replaceAll("\\{c", "{\n"); String newstr2 = newstr1.replaceAll("\\\"", ""); String newstr = newstr2.replaceAll("\\}", "\n}"); eventAdded.setProperty(":outframe", newstr); thanks, Svetlana On 10/11/06, Dan Bohus wrote: > > Hi Svetlana, > > > > Yes, you should indeed return a GFrame from the java backend server. This > GFrame should contain one string element, called :outframe which contains > the string representation you had below of the desired structure (e.g. > like for instance the RoomLine perl returns it). If you look into the > BackendServer for RoomLine, essentially what that does is take that string > representation and put it in an outframe string slot in a galaxy return > frame. > > > > Hope this helps, but let me know if it doesn't > > Dan > > > > > ------------------------------ > > *From:* Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] > *Sent:* Wednesday, October 11, 2006 3:32 PM > *To:* Dan Bohus > *Cc:* ravenclaw-developers at cs.cmu.edu > *Subject:* Re: RavenclawDev: returning frame from a back end > > > > Do you think it is possible to return a structure from a java back-end in > a format expected by RavenClaw? > > If so, could you please recomment how, and if not, could someone point to > the place in RavenClaw that I could modify to work around this issue? > > I am sorry to bother you with this question, but we have a demo coming up > and listing the events is one of the essential functionality that we wanted > to show. > > Thank you all for your help! > > Svetlana > > On 10/10/06, *Svetlana Stenchikova* wrote: > > Thanks Dan, > > this generally makes sense, but I am not sure how to do this in the java > server. > > The operation function in the java galaxy service returns a GFrame. > > I can set properties of this frame in any way, but I must return a GFrame, > I think. I tried declaring an operation that returns String and it causes > runtime exception: > java.lang.ClassCastException: java.lang.String > > > This is how a RoomLine return from a perl back end looks like: > > { > suggested_refine none > error false > results :1 > { > { > date_time { > time { > start_time 1700 > end_time 1800 > } > date { > valid_date true > year 2006 > month 10 > day 11 > weekday 3 > } > } > room_size 30 > room_projector true > room_whiteboard true > room_computer true > room_network true > room_location Wean Hall > room_size_spec large > room_number 4625 > } > } > } > > > And here is how my java back end frame looks like: > > Server environment sending frame: > {c java_be.add_event > error "false" > :hub_opaque_data {c admin_info > :reply_requested 1 > :session_id "Default" > :tidx 70 > :scriptless 1 > :timestamp [array: type GAL_FLOAT_64, 1 elements] > :provider_id "[8]" > :invoked_stype "java_be" } } > > Please make a suggestion on how to return a string from a java server. > > thank you, > Svetlana > > > > On 10/10/06, *Dan Bohus* wrote: > > Hi Svetlana, > > > > I think this is the same problem with "Ravenclaw frames" and "galaxy > frames" but on the output side. Basically what you're doing in the code > below is constructing a galaxy frame. Instead ravenclaw expects a single > string in that galaxy frame which contains the information in a single > string in the "string Ravenclaw frame" format? > > > > If this message is too cryptic, let me know and I can send you more > details, > > Dan > > > ------------------------------ > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] *On Behalf Of *Svetlana > Stenchikova > *Sent:* Tuesday, October 10, 2006 5:41 PM > *To:* ravenclaw-developers at cs.cmu.edu > *Subject:* RavenclawDev: returning frame from a back end > > > > Hi, > > How should a back-end function of a ravenclaw dialog manager format a > frame? > > For example, I am expecting to get a "error" parameter from: > > CALL("java_be.add_event backend_error") > > backend_error is declared as: > BOOL_SYSTEM_CONCEPT(backend_error) > > In the java back-end: > > public GFrame serverOpAddEvent(GFrame f) { > ... > > GFrame eventAdded = new Clause("event_add"); > > eventAdded.setProperty("error", "false"); > > return eventAdded; > } > > > But the backend_error in DM does not get initialized. > > Is there a particular way that the return GFrame from the backend server > has to be generated? > > Thank you, > Svetlana > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061012/fa3d30cb/attachment.html From svetastenchikova at gmail.com Fri Oct 13 00:13:30 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Fri, 13 Oct 2006 00:13:30 -0400 Subject: RavenclawDev: returning frame from a back end; with lists Message-ID: <31cecd6b0610122113o50ddae45h8f9042a799933409@mail.gmail.com> Hi, I am now trying to hard-code a string to return, just for a test: String str = "{\nerror false\n}"; / "{\n" + "error false\n" + "results :1\n" + "{\n" + "{\n" + "date_time {\n" + "time {\n" + " start_time 1700\n" + " end_time 1800\n" + "}\n" + "date {\n" + " valid_date true\n" + " year 2006\n" + " month 10\n" + " day 11\n" + " weekday 3\n" + "}\n" + "}\n" + "}\n" + "}\n" + "}"; GFrame newframe = new Clause(""); newframe.setProperty(":outframe", str); and getting exception in FrameConcept.cpp on line 288 Can anyone see a problem with this hard-coded string? thanks, Svetlana On 10/12/06, Svetlana Stenchikova wrote: > > OK, it worked after several replacements were done to the string: > > GFrame eventAdded = new Clause(""); > > String strRes = tempFrame.toString(); > > String newstr1 = strRes.replaceAll("\\{c", "{\n"); > String newstr2 = newstr1.replaceAll("\\\"", ""); > String newstr = newstr2.replaceAll("\\}", "\n}"); > > eventAdded.setProperty(":outframe", newstr); > > thanks, > Svetlana > > On 10/11/06, Dan Bohus wrote: > > > > Hi Svetlana, > > > > > > > > Yes, you should indeed return a GFrame from the java backend server. > > This GFrame should contain one string element, called :outframe which > > contains the string representation you had below of the desired structure ( > > e.g. like for instance the RoomLine perl returns it). If you look into > > the BackendServer for RoomLine, essentially what that does is take that > > string representation and put it in an outframe string slot in a galaxy > > return frame. > > > > > > > > Hope this helps, but let me know if it doesn't > > > > Dan > > > > > > > > > > ------------------------------ > > > > *From:* Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] > > *Sent:* Wednesday, October 11, 2006 3:32 PM > > *To:* Dan Bohus > > *Cc:* ravenclaw-developers at cs.cmu.edu > > *Subject:* Re: RavenclawDev: returning frame from a back end > > > > > > > > Do you think it is possible to return a structure from a java back-end > > in a format expected by RavenClaw? > > > > If so, could you please recomment how, and if not, could someone point > > to the place in RavenClaw that I could modify to work around this issue? > > > > I am sorry to bother you with this question, but we have a demo coming > > up and listing the events is one of the essential functionality that we > > wanted to show. > > > > Thank you all for your help! > > > > Svetlana > > > > On 10/10/06, *Svetlana Stenchikova* wrote: > > > > Thanks Dan, > > > > this generally makes sense, but I am not sure how to do this in the java > > server. > > > > The operation function in the java galaxy service returns a GFrame. > > > > I can set properties of this frame in any way, but I must return a > > GFrame, I think. I tried declaring an operation that returns String and it > > causes runtime exception: > > java.lang.ClassCastException: java.lang.String > > > > > > This is how a RoomLine return from a perl back end looks like: > > > > { > > suggested_refine none > > error false > > results :1 > > { > > { > > date_time { > > time { > > start_time 1700 > > end_time 1800 > > } > > date { > > valid_date true > > year 2006 > > month 10 > > day 11 > > weekday 3 > > } > > } > > room_size 30 > > room_projector true > > room_whiteboard true > > room_computer true > > room_network true > > room_location Wean Hall > > room_size_spec large > > room_number 4625 > > } > > } > > } > > > > > > And here is how my java back end frame looks like: > > > > Server environment sending frame: > > {c java_be.add_event > > error "false" > > :hub_opaque_data {c admin_info > > :reply_requested 1 > > :session_id "Default" > > :tidx 70 > > :scriptless 1 > > :timestamp [array: type GAL_FLOAT_64, 1 elements] > > :provider_id "[8]" > > :invoked_stype "java_be" } } > > > > Please make a suggestion on how to return a string from a java server. > > > > thank you, > > Svetlana > > > > > > > > On 10/10/06, *Dan Bohus* wrote: > > > > Hi Svetlana, > > > > > > > > I think this is the same problem with "Ravenclaw frames" and "galaxy > > frames" but on the output side. Basically what you're doing in the code > > below is constructing a galaxy frame. Instead ravenclaw expects a single > > string in that galaxy frame which contains the information in a single > > string in the "string Ravenclaw frame" format? > > > > > > > > If this message is too cryptic, let me know and I can send you more > > details, > > > > Dan > > > > > > ------------------------------ > > > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] * On Behalf Of *Svetlana > > Stenchikova > > *Sent:* Tuesday, October 10, 2006 5:41 PM > > *To:* ravenclaw-developers at cs.cmu.edu > > *Subject:* RavenclawDev: returning frame from a back end > > > > > > > > Hi, > > > > How should a back-end function of a ravenclaw dialog manager format a > > frame? > > > > For example, I am expecting to get a "error" parameter from: > > > > CALL("java_be.add_event backend_error") > > > > backend_error is declared as: > > BOOL_SYSTEM_CONCEPT(backend_error) > > > > In the java back-end: > > > > public GFrame serverOpAddEvent(GFrame f) { > > ... > > > > GFrame eventAdded = new Clause("event_add"); > > > > eventAdded.setProperty("error", "false"); > > > > return eventAdded; > > } > > > > > > But the backend_error in DM does not get initialized. > > > > Is there a particular way that the return GFrame from the backend server > > has to be generated? > > > > Thank you, > > Svetlana > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061013/1bb79552/attachment-0001.html From dbohus at cs.cmu.edu Fri Oct 13 07:19:06 2006 From: dbohus at cs.cmu.edu (Dan Bohus) Date: Fri, 13 Oct 2006 07:19:06 -0400 Subject: RavenclawDev: returning frame from a back end; with lists In-Reply-To: <31cecd6b0610122113o50ddae45h8f9042a799933409@mail.gmail.com> Message-ID: <1546B8BE23C96940B5B4929DB7CC2343AC48EC@e2k3.srv.cs.cmu.edu> Hi Svetlana, Hmm, sorry, I'm a bit confused by the beginning of it... String str = "{\nerror false\n}"; / "{\n" + "error false\n" + Does that compile in java? Or is that just a mistype in the email. O/w I can't see anything with the naked eye, but you might try setting a breakpoint right on the line in FrameConcept.cpp where RavenClaw crashes and see what the problem is... Sorry I can't be more helpful, I hope you'll sort it out... We should have had this "string frame" format documented somewhere really well... -Dan ________________________________ From: Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] Sent: Friday, October 13, 2006 12:14 AM To: Dan Bohus Cc: ravenclaw-developers at cs.cmu.edu Subject: Re: RavenclawDev: returning frame from a back end; with lists Hi, I am now trying to hard-code a string to return, just for a test: String str = "{\nerror false\n}"; / "{\n" + "error false\n" + "results :1\n" + "{\n" + "{\n" + "date_time {\n" + "time {\n" + " start_time 1700\n" + " end_time 1800\n" + "}\n" + "date {\n" + " valid_date true\n" + " year 2006\n" + " month 10\n" + " day 11\n" + " weekday 3\n" + "}\n" + "}\n" + "}\n" + "}\n" + "}"; GFrame newframe = new Clause(""); newframe.setProperty(":outframe", str); and getting exception in FrameConcept.cpp on line 288 Can anyone see a problem with this hard-coded string? thanks, Svetlana On 10/12/06, Svetlana Stenchikova wrote: OK, it worked after several replacements were done to the string: GFrame eventAdded = new Clause(""); String strRes = tempFrame.toString(); String newstr1 = strRes.replaceAll("\\{c", "{\n"); String newstr2 = newstr1.replaceAll("\\\"", ""); String newstr = newstr2.replaceAll("\\}", "\n}"); eventAdded.setProperty(":outframe", newstr); thanks, Svetlana On 10/11/06, Dan Bohus < dbohus at cs.cmu.edu > wrote: Hi Svetlana, Yes, you should indeed return a GFrame from the java backend server. This GFrame should contain one string element, called :outframe which contains the string representation you had below of the desired structure (e.g. like for instance the RoomLine perl returns it). If you look into the BackendServer for RoomLine, essentially what that does is take that string representation and put it in an outframe string slot in a galaxy return frame. Hope this helps, but let me know if it doesn't Dan ________________________________ From: Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] Sent: Wednesday, October 11, 2006 3:32 PM To: Dan Bohus Cc: ravenclaw-developers at cs.cmu.edu Subject: Re: RavenclawDev: returning frame from a back end Do you think it is possible to return a structure from a java back-end in a format expected by RavenClaw? If so, could you please recomment how, and if not, could someone point to the place in RavenClaw that I could modify to work around this issue? I am sorry to bother you with this question, but we have a demo coming up and listing the events is one of the essential functionality that we wanted to show. Thank you all for your help! Svetlana On 10/10/06, Svetlana Stenchikova wrote: Thanks Dan, this generally makes sense, but I am not sure how to do this in the java server. The operation function in the java galaxy service returns a GFrame. I can set properties of this frame in any way, but I must return a GFrame, I think. I tried declaring an operation that returns String and it causes runtime exception: java.lang.ClassCastException: java.lang.String This is how a RoomLine return from a perl back end looks like: { suggested_refine none error false results :1 { { date_time { time { start_time 1700 end_time 1800 } date { valid_date true year 2006 month 10 day 11 weekday 3 } } room_size 30 room_projector true room_whiteboard true room_computer true room_network true room_location Wean Hall room_size_spec large room_number 4625 } } } And here is how my java back end frame looks like: Server environment sending frame: {c java_be.add_event error "false" :hub_opaque_data {c admin_info :reply_requested 1 :session_id "Default" :tidx 70 :scriptless 1 :timestamp [array: type GAL_FLOAT_64, 1 elements] :provider_id "[8]" :invoked_stype "java_be" } } Please make a suggestion on how to return a string from a java server. thank you, Svetlana On 10/10/06, Dan Bohus wrote: Hi Svetlana, I think this is the same problem with "Ravenclaw frames" and "galaxy frames" but on the output side. Basically what you're doing in the code below is constructing a galaxy frame. Instead ravenclaw expects a single string in that galaxy frame which contains the information in a single string in the "string Ravenclaw frame" format... If this message is too cryptic, let me know and I can send you more details, Dan ________________________________ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of Svetlana Stenchikova Sent: Tuesday, October 10, 2006 5:41 PM To: ravenclaw-developers at cs.cmu.edu Subject: RavenclawDev: returning frame from a back end Hi, How should a back-end function of a ravenclaw dialog manager format a frame? For example, I am expecting to get a "error" parameter from: CALL("java_be.add_event backend_error") backend_error is declared as: BOOL_SYSTEM_CONCEPT(backend_error) In the java back-end: public GFrame serverOpAddEvent(GFrame f) { ... GFrame eventAdded = new Clause("event_add"); eventAdded.setProperty("error", "false"); return eventAdded; } But the backend_error in DM does not get initialized. Is there a particular way that the return GFrame from the backend server has to be generated? Thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061013/4e0a40da/attachment-0001.html From svetastenchikova at gmail.com Fri Oct 13 09:24:52 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Fri, 13 Oct 2006 09:24:52 -0400 Subject: RavenclawDev: returning frame from a back end; with lists In-Reply-To: <1546B8BE23C96940B5B4929DB7CC2343AC48EC@e2k3.srv.cs.cmu.edu> References: <31cecd6b0610122113o50ddae45h8f9042a799933409@mail.gmail.com> <1546B8BE23C96940B5B4929DB7CC2343AC48EC@e2k3.srv.cs.cmu.edu> Message-ID: <31cecd6b0610130624x3e56bb75j699aef0088d7366f@mail.gmail.com> Mistyped email - sorry -: String str = "{\n" + "error false\n" + "results :1\n" + "{\n" + "{\n" + "date_time {\n" + "time {\n" + " start_time 1700\n" + " end_time 1800\n" + "}\n" + "date {\n" + " valid_date true\n" + " year 2006\n" + " month 10\n" + " day 11\n" + " weekday 3\n" + "}\n" + "}\n" + "}\n" + "}\n" + "}"; On 10/13/06, Dan Bohus wrote: > > Hi Svetlana, > > > > Hmm, sorry, I'm a bit confused by the beginning of it? > > > > String str = "{\nerror false\n}"; > / "{\n" + > "error false\n" + > > > > Does that compile in java? Or is that just a mistype in the email. O/w I > can't see anything with the naked eye, but you might try setting a > breakpoint right on the line in FrameConcept.cpp where RavenClaw crashes > and see what the problem is? Sorry I can't be more helpful, I hope you'll > sort it out? We should have had this "string frame" format documented > somewhere really well? > > > > -Dan > > > > > > > ------------------------------ > > *From:* Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] > *Sent:* Friday, October 13, 2006 12:14 AM > *To:* Dan Bohus > *Cc:* ravenclaw-developers at cs.cmu.edu > *Subject:* Re: RavenclawDev: returning frame from a back end; with lists > > > > Hi, > > I am now trying to hard-code a string to return, just for a test: > > String str = "{\nerror false\n}"; > / "{\n" + > "error false\n" + > "results :1\n" + > "{\n" + > "{\n" + > "date_time {\n" + > "time {\n" + > " start_time 1700\n" + > " end_time 1800\n" + > "}\n" + > "date {\n" + > " valid_date true\n" + > " year 2006\n" + > " month 10\n" + > " day 11\n" + > " weekday 3\n" + > "}\n" + > "}\n" + > "}\n" + > "}\n" + > "}"; > GFrame newframe = new Clause(""); > newframe.setProperty(":outframe", str); > > and getting exception in FrameConcept.cpp on line 288 > > Can anyone see a problem with this hard-coded string? > > thanks, > Svetlana > > On 10/12/06, *Svetlana Stenchikova* wrote: > > OK, it worked after several replacements were done to the string: > > GFrame eventAdded = new Clause(""); > > String strRes = tempFrame.toString(); > > String newstr1 = strRes.replaceAll("\\{c", "{\n"); > String newstr2 = newstr1.replaceAll("\\\"", ""); > String newstr = newstr2.replaceAll("\\}", "\n}"); > > eventAdded.setProperty(":outframe", newstr); > > thanks, > Svetlana > > > > On 10/11/06, *Dan Bohus* < dbohus at cs.cmu.edu> wrote: > > Hi Svetlana, > > > > Yes, you should indeed return a GFrame from the java backend server. This > GFrame should contain one string element, called :outframe which contains > the string representation you had below of the desired structure (e.g. > like for instance the RoomLine perl returns it). If you look into the > BackendServer for RoomLine, essentially what that does is take that string > representation and put it in an outframe string slot in a galaxy return > frame. > > > > Hope this helps, but let me know if it doesn't > > Dan > > > > > ------------------------------ > > *From:* Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] > *Sent:* Wednesday, October 11, 2006 3:32 PM > *To:* Dan Bohus > *Cc:* ravenclaw-developers at cs.cmu.edu > *Subject:* Re: RavenclawDev: returning frame from a back end > > > > Do you think it is possible to return a structure from a java back-end in > a format expected by RavenClaw? > > If so, could you please recomment how, and if not, could someone point to > the place in RavenClaw that I could modify to work around this issue? > > I am sorry to bother you with this question, but we have a demo coming up > and listing the events is one of the essential functionality that we wanted > to show. > > Thank you all for your help! > > Svetlana > > On 10/10/06, *Svetlana Stenchikova* wrote: > > Thanks Dan, > > this generally makes sense, but I am not sure how to do this in the java > server. > > The operation function in the java galaxy service returns a GFrame. > > I can set properties of this frame in any way, but I must return a GFrame, > I think. I tried declaring an operation that returns String and it causes > runtime exception: > java.lang.ClassCastException: java.lang.String > > > This is how a RoomLine return from a perl back end looks like: > > { > suggested_refine none > error false > results :1 > { > { > date_time { > time { > start_time 1700 > end_time 1800 > } > date { > valid_date true > year 2006 > month 10 > day 11 > weekday 3 > } > } > room_size 30 > room_projector true > room_whiteboard true > room_computer true > room_network true > room_location Wean Hall > room_size_spec large > room_number 4625 > } > } > } > > > And here is how my java back end frame looks like: > > Server environment sending frame: > {c java_be.add_event > error "false" > :hub_opaque_data {c admin_info > :reply_requested 1 > :session_id "Default" > :tidx 70 > :scriptless 1 > :timestamp [array: type GAL_FLOAT_64, 1 elements] > :provider_id "[8]" > :invoked_stype "java_be" } } > > Please make a suggestion on how to return a string from a java server. > > thank you, > Svetlana > > > > On 10/10/06, *Dan Bohus* wrote: > > Hi Svetlana, > > > > I think this is the same problem with "Ravenclaw frames" and "galaxy > frames" but on the output side. Basically what you're doing in the code > below is constructing a galaxy frame. Instead ravenclaw expects a single > string in that galaxy frame which contains the information in a single > string in the "string Ravenclaw frame" format? > > > > If this message is too cryptic, let me know and I can send you more > details, > > Dan > > > ------------------------------ > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] *On Behalf Of *Svetlana > Stenchikova > *Sent:* Tuesday, October 10, 2006 5:41 PM > *To:* ravenclaw-developers at cs.cmu.edu > *Subject:* RavenclawDev: returning frame from a back end > > > > Hi, > > How should a back-end function of a ravenclaw dialog manager format a > frame? > > For example, I am expecting to get a "error" parameter from: > > CALL("java_be.add_event backend_error") > > backend_error is declared as: > BOOL_SYSTEM_CONCEPT(backend_error) > > In the java back-end: > > public GFrame serverOpAddEvent(GFrame f) { > ... > > GFrame eventAdded = new Clause("event_add"); > > eventAdded.setProperty("error", "false"); > > return eventAdded; > } > > > But the backend_error in DM does not get initialized. > > Is there a particular way that the return GFrame from the backend server > has to be generated? > > Thank you, > Svetlana > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061013/0be78fba/attachment-0001.html From antoine at cs.cmu.edu Fri Oct 13 09:45:39 2006 From: antoine at cs.cmu.edu (Antoine Raux) Date: Fri, 13 Oct 2006 09:45:39 -0400 Subject: RavenclawDev: returning frame from a back end; with lists In-Reply-To: <31cecd6b0610130624x3e56bb75j699aef0088d7366f@mail.gmail.com> Message-ID: <000f01c6eecd$de94d500$03bd0280@sp.cs.cmu.edu> Hi Svetlana, Are you using actual tab characters between slot names and values or spaces? RavenClaw expect tab characters there (e.g. between "error" and "false", "results" and ":1", etc). Otherwise I can't see anything strange in your frame. If that's not it, could you send the exact exception and line number? antoine _____ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of Svetlana Stenchikova Sent: Friday, October 13, 2006 9:25 AM To: Dan Bohus Cc: ravenclaw-developers at cs.cmu.edu Subject: Re: RavenclawDev: returning frame from a back end; with lists Mistyped email - sorry -: String str = "{\n" + "error false\n" + "results :1\n" + "{\n" + "{\n" + "date_time {\n" + "time {\n" + " start_time 1700\n" + " end_time 1800\n" + "}\n" + "date {\n" + " valid_date true\n" + " year 2006\n" + " month 10\n" + " day 11\n" + " weekday 3\n" + "}\n" + "}\n" + "}\n" + "}\n" + "}"; On 10/13/06, Dan Bohus wrote: Hi Svetlana, Hmm, sorry, I'm a bit confused by the beginning of it. String str = "{\nerror false\n}"; / "{\n" + "error false\n" + Does that compile in java? Or is that just a mistype in the email. O/w I can't see anything with the naked eye, but you might try setting a breakpoint right on the line in FrameConcept.cpp where RavenClaw crashes and see what the problem is. Sorry I can't be more helpful, I hope you'll sort it out. We should have had this "string frame" format documented somewhere really well. -Dan _____ From: Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] Sent: Friday, October 13, 2006 12:14 AM To: Dan Bohus Cc: ravenclaw-developers at cs.cmu.edu Subject: Re: RavenclawDev: returning frame from a back end; with lists Hi, I am now trying to hard-code a string to return, just for a test: String str = "{\nerror false\n}"; / "{\n" + "error false\n" + "results :1\n" + "{\n" + "{\n" + "date_time {\n" + "time {\n" + " start_time 1700\n" + " end_time 1800\n" + "}\n" + "date {\n" + " valid_date true\n" + " year 2006\n" + " month 10\n" + " day 11\n" + " weekday 3\n" + "}\n" + "}\n" + "}\n" + "}\n" + "}"; GFrame newframe = new Clause(""); newframe.setProperty(":outframe", str); and getting exception in FrameConcept.cpp on line 288 Can anyone see a problem with this hard-coded string? thanks, Svetlana On 10/12/06, Svetlana Stenchikova wrote: OK, it worked after several replacements were done to the string: GFrame eventAdded = new Clause(""); String strRes = tempFrame.toString(); String newstr1 = strRes.replaceAll("\\{c", "{\n"); String newstr2 = newstr1.replaceAll("\\\"", ""); String newstr = newstr2.replaceAll("\\}", "\n}"); eventAdded.setProperty(":outframe", newstr); thanks, Svetlana On 10/11/06, Dan Bohus < dbohus at cs.cmu.edu > wrote: Hi Svetlana, Yes, you should indeed return a GFrame from the java backend server. This GFrame should contain one string element, called :outframe which contains the string representation you had below of the desired structure (e.g. like for instance the RoomLine perl returns it). If you look into the BackendServer for RoomLine, essentially what that does is take that string representation and put it in an outframe string slot in a galaxy return frame. Hope this helps, but let me know if it doesn't Dan _____ From: Svetlana Stenchikova [mailto: svetastenchikova at gmail.com] Sent: Wednesday, October 11, 2006 3:32 PM To: Dan Bohus Cc: ravenclaw-developers at cs.cmu.edu Subject: Re: RavenclawDev: returning frame from a back end Do you think it is possible to return a structure from a java back-end in a format expected by RavenClaw? If so, could you please recomment how, and if not, could someone point to the place in RavenClaw that I could modify to work around this issue? I am sorry to bother you with this question, but we have a demo coming up and listing the events is one of the essential functionality that we wanted to show. Thank you all for your help! Svetlana On 10/10/06, Svetlana Stenchikova wrote: Thanks Dan, this generally makes sense, but I am not sure how to do this in the java server. The operation function in the java galaxy service returns a GFrame. I can set properties of this frame in any way, but I must return a GFrame, I think. I tried declaring an operation that returns String and it causes runtime exception: java.lang.ClassCastException: java.lang.String This is how a RoomLine return from a perl back end looks like: { suggested_refine none error false results :1 { { date_time { time { start_time 1700 end_time 1800 } date { valid_date true year 2006 month 10 day 11 weekday 3 } } room_size 30 room_projector true room_whiteboard true room_computer true room_network true room_location Wean Hall room_size_spec large room_number 4625 } } } And here is how my java back end frame looks like: Server environment sending frame: {c java_be.add_event error "false" :hub_opaque_data {c admin_info :reply_requested 1 :session_id "Default" :tidx 70 :scriptless 1 :timestamp [array: type GAL_FLOAT_64, 1 elements] :provider_id "[8]" :invoked_stype "java_be" } } Please make a suggestion on how to return a string from a java server. thank you, Svetlana On 10/10/06, Dan Bohus wrote: Hi Svetlana, I think this is the same problem with "Ravenclaw frames" and "galaxy frames" but on the output side. Basically what you're doing in the code below is constructing a galaxy frame. Instead ravenclaw expects a single string in that galaxy frame which contains the information in a single string in the "string Ravenclaw frame" format. If this message is too cryptic, let me know and I can send you more details, Dan _____ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu ] On Behalf Of Svetlana Stenchikova Sent: Tuesday, October 10, 2006 5:41 PM To: ravenclaw-developers at cs.cmu.edu Subject: RavenclawDev: returning frame from a back end Hi, How should a back-end function of a ravenclaw dialog manager format a frame? For example, I am expecting to get a "error" parameter from: CALL("java_be.add_event backend_error") backend_error is declared as: BOOL_SYSTEM_CONCEPT(backend_error) In the java back-end: public GFrame serverOpAddEvent(GFrame f) { ... GFrame eventAdded = new Clause("event_add"); eventAdded.setProperty("error", "false"); return eventAdded; } But the backend_error in DM does not get initialized. Is there a particular way that the return GFrame from the backend server has to be generated? Thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061013/110eebe7/attachment-0001.html From svetastenchikova at gmail.com Fri Oct 13 09:53:34 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Fri, 13 Oct 2006 09:53:34 -0400 Subject: RavenclawDev: returning frame from a back end; with lists In-Reply-To: <000f01c6eecd$de94d500$03bd0280@sp.cs.cmu.edu> References: <31cecd6b0610130624x3e56bb75j699aef0088d7366f@mail.gmail.com> <000f01c6eecd$de94d500$03bd0280@sp.cs.cmu.edu> Message-ID: <31cecd6b0610130653p257fab70k413a269b7d6258b@mail.gmail.com> Thanks Antoine, I tried tabs and it had the same effect. Actually a space seems to work in case when there is no arrays: String str = "{\nerror true\n}"; gets the error even though there is a space. Svetlana On 10/13/06, Antoine Raux wrote: > > Hi Svetlana, > > > > Are you using actual tab characters between slot names and values or > spaces? RavenClaw expect tab characters there (e.g. between "error" and > "false", "results" and ":1", etc). Otherwise I can't see anything strange in > your frame. If that's not it, could you send the exact exception and line > number? > > > > antoine > > > ------------------------------ > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] *On Behalf Of *Svetlana > Stenchikova > *Sent:* Friday, October 13, 2006 9:25 AM > *To:* Dan Bohus > *Cc:* ravenclaw-developers at cs.cmu.edu > *Subject:* Re: RavenclawDev: returning frame from a back end; with lists > > > > Mistyped email - sorry -: > > String str = > "{\n" + > "error false\n" + > "results :1\n" + > "{\n" + > "{\n" + > "date_time {\n" + > "time {\n" + > " start_time 1700\n" + > " end_time 1800\n" + > "}\n" + > "date {\n" + > " valid_date true\n" + > " year 2006\n" + > " month 10\n" + > " day 11\n" + > " weekday 3\n" + > "}\n" + > "}\n" + > "}\n" + > "}\n" + > "}"; > > > On 10/13/06, *Dan Bohus* wrote: > > Hi Svetlana, > > > > Hmm, sorry, I'm a bit confused by the beginning of it? > > > > String str = "{\nerror false\n}"; > / "{\n" + > "error false\n" + > > > > Does that compile in java? Or is that just a mistype in the email. O/w I > can't see anything with the naked eye, but you might try setting a > breakpoint right on the line in FrameConcept.cpp where RavenClaw crashes > and see what the problem is? Sorry I can't be more helpful, I hope you'll > sort it out? We should have had this "string frame" format documented > somewhere really well? > > > > -Dan > > > > > > > ------------------------------ > > *From:* Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] > *Sent:* Friday, October 13, 2006 12:14 AM > *To:* Dan Bohus > *Cc:* ravenclaw-developers at cs.cmu.edu > *Subject:* Re: RavenclawDev: returning frame from a back end; with lists > > > > Hi, > > I am now trying to hard-code a string to return, just for a test: > > String str = "{\nerror false\n}"; > / "{\n" + > "error false\n" + > "results :1\n" + > "{\n" + > "{\n" + > "date_time {\n" + > "time {\n" + > " start_time 1700\n" + > " end_time 1800\n" + > "}\n" + > "date {\n" + > " valid_date true\n" + > " year 2006\n" + > " month 10\n" + > " day 11\n" + > " weekday 3\n" + > "}\n" + > "}\n" + > "}\n" + > "}\n" + > "}"; > GFrame newframe = new Clause(""); > newframe.setProperty(":outframe", str); > > and getting exception in FrameConcept.cpp on line 288 > > Can anyone see a problem with this hard-coded string? > > thanks, > Svetlana > > On 10/12/06, *Svetlana Stenchikova* wrote: > > OK, it worked after several replacements were done to the string: > > GFrame eventAdded = new Clause(""); > > String strRes = tempFrame.toString(); > > String newstr1 = strRes.replaceAll("\\{c", "{\n"); > String newstr2 = newstr1.replaceAll("\\\"", ""); > String newstr = newstr2.replaceAll("\\}", "\n}"); > > eventAdded.setProperty(":outframe", newstr); > > thanks, > Svetlana > > > > On 10/11/06, *Dan Bohus* < dbohus at cs.cmu.edu> wrote: > > Hi Svetlana, > > > > Yes, you should indeed return a GFrame from the java backend server. This > GFrame should contain one string element, called :outframe which contains > the string representation you had below of the desired structure (e.g. > like for instance the RoomLine perl returns it). If you look into the > BackendServer for RoomLine, essentially what that does is take that string > representation and put it in an outframe string slot in a galaxy return > frame. > > > > Hope this helps, but let me know if it doesn't > > Dan > > > > > ------------------------------ > > *From:* Svetlana Stenchikova [mailto: svetastenchikova at gmail.com] > *Sent:* Wednesday, October 11, 2006 3:32 PM > *To:* Dan Bohus > *Cc:* ravenclaw-developers at cs.cmu.edu > *Subject:* Re: RavenclawDev: returning frame from a back end > > > > Do you think it is possible to return a structure from a java back-end in > a format expected by RavenClaw? > > If so, could you please recomment how, and if not, could someone point to > the place in RavenClaw that I could modify to work around this issue? > > I am sorry to bother you with this question, but we have a demo coming up > and listing the events is one of the essential functionality that we wanted > to show. > > Thank you all for your help! > > Svetlana > > On 10/10/06, *Svetlana Stenchikova* wrote: > > Thanks Dan, > > this generally makes sense, but I am not sure how to do this in the java > server. > > The operation function in the java galaxy service returns a GFrame. > > I can set properties of this frame in any way, but I must return a GFrame, > I think. I tried declaring an operation that returns String and it causes > runtime exception: > java.lang.ClassCastException: java.lang.String > > > This is how a RoomLine return from a perl back end looks like: > > { > suggested_refine none > error false > results :1 > { > { > date_time { > time { > start_time 1700 > end_time 1800 > } > date { > valid_date true > year 2006 > month 10 > day 11 > weekday 3 > } > } > room_size 30 > room_projector true > room_whiteboard true > room_computer true > room_network true > room_location Wean Hall > room_size_spec large > room_number 4625 > } > } > } > > > And here is how my java back end frame looks like: > > Server environment sending frame: > {c java_be.add_event > error "false" > :hub_opaque_data {c admin_info > :reply_requested 1 > :session_id "Default" > :tidx 70 > :scriptless 1 > :timestamp [array: type GAL_FLOAT_64, 1 elements] > :provider_id "[8]" > :invoked_stype "java_be" } } > > Please make a suggestion on how to return a string from a java server. > > thank you, > Svetlana > > > > On 10/10/06, *Dan Bohus* wrote: > > Hi Svetlana, > > > > I think this is the same problem with "Ravenclaw frames" and "galaxy > frames" but on the output side. Basically what you're doing in the code > below is constructing a galaxy frame. Instead ravenclaw expects a single > string in that galaxy frame which contains the information in a single > string in the "string Ravenclaw frame" format? > > > > If this message is too cryptic, let me know and I can send you more > details, > > Dan > > > ------------------------------ > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > ] *On Behalf Of *Svetlana Stenchikova > *Sent:* Tuesday, October 10, 2006 5:41 PM > *To:* ravenclaw-developers at cs.cmu.edu > *Subject:* RavenclawDev: returning frame from a back end > > > > Hi, > > How should a back-end function of a ravenclaw dialog manager format a > frame? > > For example, I am expecting to get a "error" parameter from: > > CALL("java_be.add_event backend_error") > > backend_error is declared as: > BOOL_SYSTEM_CONCEPT(backend_error) > > In the java back-end: > > public GFrame serverOpAddEvent(GFrame f) { > ... > > GFrame eventAdded = new Clause("event_add"); > > eventAdded.setProperty("error", "false"); > > return eventAdded; > } > > > But the backend_error in DM does not get initialized. > > Is there a particular way that the return GFrame from the backend server > has to be generated? > > Thank you, > Svetlana > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061013/d0f32e12/attachment-0001.html From svetastenchikova at gmail.com Fri Oct 13 10:18:34 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Fri, 13 Oct 2006 10:18:34 -0400 Subject: RavenclawDev: returning frame from a back end; with lists In-Reply-To: <31cecd6b0610130653p257fab70k413a269b7d6258b@mail.gmail.com> References: <31cecd6b0610130624x3e56bb75j699aef0088d7366f@mail.gmail.com> <000f01c6eecd$de94d500$03bd0280@sp.cs.cmu.edu> <31cecd6b0610130653p257fab70k413a269b7d6258b@mail.gmail.com> Message-ID: <31cecd6b0610130718v6f284c6k38c1282608b3636e@mail.gmail.com> OK, I think I found where it wants a tab: "time\t{\n" + "date\t{\n" + -Svetlana On 10/13/06, Svetlana Stenchikova wrote: > > Thanks Antoine, > > I tried tabs and it had the same effect. Actually a space seems to work in > case when there is no arrays: > String str = "{\nerror true\n}"; > > gets the error even though there is a space. > > Svetlana > > On 10/13/06, Antoine Raux wrote: > > > > Hi Svetlana, > > > > > > > > Are you using actual tab characters between slot names and values or > > spaces? RavenClaw expect tab characters there (e.g. between "error" and > > "false", "results" and ":1", etc). Otherwise I can't see anything strange in > > your frame. If that's not it, could you send the exact exception and line > > number? > > > > > > > > antoine > > > > > > ------------------------------ > > > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] * On Behalf Of *Svetlana > > Stenchikova > > *Sent:* Friday, October 13, 2006 9:25 AM > > *To:* Dan Bohus > > *Cc:* ravenclaw-developers at cs.cmu.edu > > *Subject:* Re: RavenclawDev: returning frame from a back end; with lists > > > > > > > > Mistyped email - sorry -: > > > > String str = > > "{\n" + > > "error false\n" + > > "results :1\n" + > > "{\n" + > > "{\n" + > > "date_time {\n" + > > "time {\n" + > > " start_time 1700\n" + > > " end_time 1800\n" + > > "}\n" + > > "date {\n" + > > " valid_date true\n" + > > " year 2006\n" + > > " month 10\n" + > > " day 11\n" + > > " weekday 3\n" + > > "}\n" + > > "}\n" + > > "}\n" + > > "}\n" + > > "}"; > > > > > > On 10/13/06, *Dan Bohus* wrote: > > > > Hi Svetlana, > > > > > > > > Hmm, sorry, I'm a bit confused by the beginning of it? > > > > > > > > String str = "{\nerror false\n}"; > > / "{\n" + > > "error false\n" + > > > > > > > > Does that compile in java? Or is that just a mistype in the email. O/w I > > can't see anything with the naked eye, but you might try setting a > > breakpoint right on the line in FrameConcept.cpp where RavenClaw crashes > > and see what the problem is? Sorry I can't be more helpful, I hope you'll > > sort it out? We should have had this "string frame" format documented > > somewhere really well? > > > > > > > > -Dan > > > > > > > > > > > > > > ------------------------------ > > > > *From:* Svetlana Stenchikova [mailto:svetastenchikova at gmail.com] > > *Sent:* Friday, October 13, 2006 12:14 AM > > *To:* Dan Bohus > > *Cc:* ravenclaw-developers at cs.cmu.edu > > *Subject:* Re: RavenclawDev: returning frame from a back end; with lists > > > > > > > > Hi, > > > > I am now trying to hard-code a string to return, just for a test: > > > > String str = "{\nerror false\n}"; > > / "{\n" + > > "error false\n" + > > "results :1\n" + > > "{\n" + > > "{\n" + > > "date_time {\n" + > > "time {\n" + > > " start_time 1700\n" + > > " end_time 1800\n" + > > "}\n" + > > "date {\n" + > > " valid_date true\n" + > > " year 2006\n" + > > " month 10\n" + > > " day 11\n" + > > " weekday 3\n" + > > "}\n" + > > "}\n" + > > "}\n" + > > "}\n" + > > "}"; > > GFrame newframe = new Clause(""); > > newframe.setProperty(":outframe", str); > > > > and getting exception in FrameConcept.cpp on line 288 > > > > Can anyone see a problem with this hard-coded string? > > > > thanks, > > Svetlana > > > > On 10/12/06, *Svetlana Stenchikova* wrote: > > > > OK, it worked after several replacements were done to the string: > > > > GFrame eventAdded = new Clause(""); > > > > String strRes = tempFrame.toString(); > > > > String newstr1 = strRes.replaceAll("\\{c", "{\n"); > > String newstr2 = newstr1.replaceAll("\\\"", ""); > > String newstr = newstr2.replaceAll("\\}", "\n}"); > > > > eventAdded.setProperty(":outframe", newstr); > > > > thanks, > > Svetlana > > > > > > > > On 10/11/06, *Dan Bohus* < dbohus at cs.cmu.edu> wrote: > > > > Hi Svetlana, > > > > > > > > Yes, you should indeed return a GFrame from the java backend server. > > This GFrame should contain one string element, called :outframe which > > contains the string representation you had below of the desired structure ( > > e.g. like for instance the RoomLine perl returns it). If you look into > > the BackendServer for RoomLine, essentially what that does is take that > > string representation and put it in an outframe string slot in a galaxy > > return frame. > > > > > > > > Hope this helps, but let me know if it doesn't > > > > Dan > > > > > > > > > > ------------------------------ > > > > *From:* Svetlana Stenchikova [mailto: svetastenchikova at gmail.com] > > *Sent:* Wednesday, October 11, 2006 3:32 PM > > *To:* Dan Bohus > > *Cc:* ravenclaw-developers at cs.cmu.edu > > *Subject:* Re: RavenclawDev: returning frame from a back end > > > > > > > > Do you think it is possible to return a structure from a java back-end > > in a format expected by RavenClaw? > > > > If so, could you please recomment how, and if not, could someone point > > to the place in RavenClaw that I could modify to work around this issue? > > > > I am sorry to bother you with this question, but we have a demo coming > > up and listing the events is one of the essential functionality that we > > wanted to show. > > > > Thank you all for your help! > > > > Svetlana > > > > On 10/10/06, *Svetlana Stenchikova* wrote: > > > > Thanks Dan, > > > > this generally makes sense, but I am not sure how to do this in the java > > server. > > > > The operation function in the java galaxy service returns a GFrame. > > > > I can set properties of this frame in any way, but I must return a > > GFrame, I think. I tried declaring an operation that returns String and it > > causes runtime exception: > > java.lang.ClassCastException: java.lang.String > > > > > > This is how a RoomLine return from a perl back end looks like: > > > > { > > suggested_refine none > > error false > > results :1 > > { > > { > > date_time { > > time { > > start_time 1700 > > end_time 1800 > > } > > date { > > valid_date true > > year 2006 > > month 10 > > day 11 > > weekday 3 > > } > > } > > room_size 30 > > room_projector true > > room_whiteboard true > > room_computer true > > room_network true > > room_location Wean Hall > > room_size_spec large > > room_number 4625 > > } > > } > > } > > > > > > And here is how my java back end frame looks like: > > > > Server environment sending frame: > > {c java_be.add_event > > error "false" > > :hub_opaque_data {c admin_info > > :reply_requested 1 > > :session_id "Default" > > :tidx 70 > > :scriptless 1 > > :timestamp [array: type GAL_FLOAT_64, 1 elements] > > :provider_id "[8]" > > :invoked_stype "java_be" } } > > > > Please make a suggestion on how to return a string from a java server. > > > > thank you, > > Svetlana > > > > > > > > On 10/10/06, *Dan Bohus* wrote: > > > > Hi Svetlana, > > > > > > > > I think this is the same problem with "Ravenclaw frames" and "galaxy > > frames" but on the output side. Basically what you're doing in the code > > below is constructing a galaxy frame. Instead ravenclaw expects a single > > string in that galaxy frame which contains the information in a single > > string in the "string Ravenclaw frame" format? > > > > > > > > If this message is too cryptic, let me know and I can send you more > > details, > > > > Dan > > > > > > ------------------------------ > > > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu > > ] * On Behalf Of *Svetlana Stenchikova > > *Sent:* Tuesday, October 10, 2006 5:41 PM > > *To:* ravenclaw-developers at cs.cmu.edu > > *Subject:* RavenclawDev: returning frame from a back end > > > > > > > > Hi, > > > > How should a back-end function of a ravenclaw dialog manager format a > > frame? > > > > For example, I am expecting to get a "error" parameter from: > > > > CALL("java_be.add_event backend_error") > > > > backend_error is declared as: > > BOOL_SYSTEM_CONCEPT(backend_error) > > > > In the java back-end: > > > > public GFrame serverOpAddEvent(GFrame f) { > > ... > > > > GFrame eventAdded = new Clause("event_add"); > > > > eventAdded.setProperty("error", "false"); > > > > return eventAdded; > > } > > > > > > But the backend_error in DM does not get initialized. > > > > Is there a particular way that the return GFrame from the backend server > > has to be generated? > > > > Thank you, > > Svetlana > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061013/a3357e94/attachment-0001.html From svetastenchikova at gmail.com Fri Oct 13 11:41:52 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Fri, 13 Oct 2006 11:41:52 -0400 Subject: RavenclawDev: msdev 2005 Message-ID: <31cecd6b0610130841y65d1ff16je84e37fccde35ae8@mail.gmail.com> To follow up on the last week's meeting on RavenClaw: I have confirmed that we have the MSDEV version 2005 in our department thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061013/9a016676/attachment.html From svetastenchikova at gmail.com Wed Oct 25 21:07:51 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Wed, 25 Oct 2006 21:07:51 -0400 Subject: [RavenclawDev 164] regular expressions in grammar mappings? Message-ID: <31cecd6b0610251807t3561839ew235f939ab02ba2bb@mail.gmail.com> Hi, I have a question regarding specifying GRAMMAR_MAPPING in REQUEST and EXPECT agents. Is it possible to use regular expressions (or something like that) to specify grammar scopes, for example "for all descentants of a Task agent" RavenCalendar/Task/* or f"or RequestDateTime agents" */RequestDateTimeAdd Now I have long lists of scopes (as below) for the grammar and it is getting harder to keep track. "@(/RavenCalendar/Task;/RavenCalendar/Task/TaskAddEvent;/RavenCalendar/Task/TaskAddEvent/GetQuery;/RavenCalendar/Task/TaskAddEvent/GetQuery/RequestDateTimeAdd;/RavenCalendar/Task/TaskAddEvent/GetQuery/RequestDateTimeAdd/RequestWhen;/RavenCalendar/AnythingElse)[ AddEvent.date_time]>:datetime,"\ "@(/RavenCalendar/Task/TaskAddEvent;/RavenCalendar/Task/TaskAddEvent/GetQuery;/RavenCalendar/Task/TaskAddEvent/GetQuery/RequestDateTimeAdd;/RavenCalendar/Task/TaskAddEvent/GetQuery/RequestDateTimeAdd/RequestWhen)[ DateTimeSpec.date_time]>:datetime,"\ Thank you Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061025/0427accc/attachment.html From svetastenchikova at gmail.com Wed Oct 25 21:37:31 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Wed, 25 Oct 2006 21:37:31 -0400 Subject: [RavenclawDev 165] Re: regular expressions in grammar mappings? In-Reply-To: <31cecd6b0610251807t3561839ew235f939ab02ba2bb@mail.gmail.com> References: <31cecd6b0610251807t3561839ew235f939ab02ba2bb@mail.gmail.com> Message-ID: <31cecd6b0610251837s283c83caife862b61a6135df0@mail.gmail.com> Hi, I think that I was wrong about this. I see that RoomLine always specifies just the top level agents for the scope: GRAMMAR_MAPPING("@(/RoomLine/Task;/RoomLine/AnythingElse)[ NeedRoom.date_time]>:datetime,"\ "@(/RoomLine/Task;/RoomLine/AnythingElse)[ DateTimeSpec.date_time]>:datetime") So, I guess the default behavior is that the grammar is active in all descendant agents, right? thank you Svetlana On 10/25/06, Svetlana Stenchikova wrote: > > Hi, I have a question regarding specifying GRAMMAR_MAPPING in REQUEST and > EXPECT agents. > > > Is it possible to use regular expressions (or something like that) to > specify grammar scopes, for example > > "for all descentants of a Task agent" RavenCalendar/Task/* > > or f"or RequestDateTime agents" */RequestDateTimeAdd > > > Now I have long lists of scopes (as below) for the grammar and it is > getting harder to keep track. > > "@(/RavenCalendar/Task;/RavenCalendar/Task/TaskAddEvent;/RavenCalendar/Task/TaskAddEvent/GetQuery;/RavenCalendar/Task/TaskAddEvent/GetQuery/RequestDateTimeAdd;/RavenCalendar/Task/TaskAddEvent/GetQuery/RequestDateTimeAdd/RequestWhen;/RavenCalendar/AnythingElse)[ > AddEvent.date_time]>:datetime,"\ > "@(/RavenCalendar/Task/TaskAddEvent;/RavenCalendar/Task/TaskAddEvent/GetQuery;/RavenCalendar/Task/TaskAddEvent/GetQuery/RequestDateTimeAdd;/RavenCalendar/Task/TaskAddEvent/GetQuery/RequestDateTimeAdd/RequestWhen)[ > DateTimeSpec.date_time ]>:datetime,"\ > > > Thank you > Svetlana > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061025/bc09ea1c/attachment.html From svetastenchikova at gmail.com Thu Oct 26 09:12:32 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Thu, 26 Oct 2006 09:12:32 -0400 Subject: [RavenclawDev 166] defining agents in multiple files Message-ID: <31cecd6b0610260612qae3b92dv5c00087c1cae55b1@mail.gmail.com> Hi, I am trying to organize my dialog manager code by defining agents in multiple cpp files. This means that I would need multiple DECLARE_AGENTS for each of the cpp files that defines agents, right? Having multiple DECLARE_AGENTS does not seem to be legal. I am getting this error: RavenCalendarDM error LNK2005: "public: void __thiscall CDTTManagerAgent::CreateDialogTaskAgentome(void)" (?CreateDialogTaskAgentome at CDTTManagerAgent@@QAEXXZ) already defined in RavenCalendarDialogTask.obj Could you please suggest if there is a way around this? (besides keeping all agents in a single cpp file) thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061026/d8aa6006/attachment.html From antoine at cs.cmu.edu Thu Oct 26 09:22:37 2006 From: antoine at cs.cmu.edu (Antoine Raux) Date: Thu, 26 Oct 2006 09:22:37 -0400 Subject: [RavenclawDev 167] Re: defining agents in multiple files In-Reply-To: <31cecd6b0610260612qae3b92dv5c00087c1cae55b1@mail.gmail.com> Message-ID: <003001c6f901$ce74c340$03bd0280@sp.cs.cmu.edu> Hi Svetlana, The way we do this is to create .h files that contain the agents (the DEFINE_AGENCY, DEFINE_INFORM_AGENT, etc blocks) and include those in your main file. You put all the DELCARE_AGENTS in this single main file. hope this helps antoine _____ From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of Svetlana Stenchikova Sent: Thursday, October 26, 2006 9:13 AM To: Dan Bohus Cc: ravenclaw-developers at cs.cmu.edu Subject: [RavenclawDev 166] defining agents in multiple files Hi, I am trying to organize my dialog manager code by defining agents in multiple cpp files. This means that I would need multiple DECLARE_AGENTS for each of the cpp files that defines agents, right? Having multiple DECLARE_AGENTS does not seem to be legal. I am getting this error: RavenCalendarDM error LNK2005: "public: void __thiscall CDTTManagerAgent::CreateDialogTaskAgentome(void)" (?CreateDialogTaskAgentome at CDTTManagerAgent@@QAEXXZ) already defined in RavenCalendarDialogTask.obj Could you please suggest if there is a way around this? (besides keeping all agents in a single cpp file) thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061026/8b2fd9ce/attachment.html From svetastenchikova at gmail.com Thu Oct 26 09:58:45 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Thu, 26 Oct 2006 09:58:45 -0400 Subject: [RavenclawDev 168] Re: defining agents in multiple files In-Reply-To: <003001c6f901$ce74c340$03bd0280@sp.cs.cmu.edu> References: <31cecd6b0610260612qae3b92dv5c00087c1cae55b1@mail.gmail.com> <003001c6f901$ce74c340$03bd0280@sp.cs.cmu.edu> Message-ID: <31cecd6b0610260658m51fa8165g491f931b041b6b7f@mail.gmail.com> Thanks Antoine - it makes sense. Svetlana On 10/26/06, Antoine Raux wrote: > > Hi Svetlana, > > > > The way we do this is to create .h files that contain the agents (the > DEFINE_AGENCY, DEFINE_INFORM_AGENT, etc blocks) and include those in your > main file. You put all the DELCARE_AGENTS in this single main file. > > > > hope this helps > > > > antoine > > > ------------------------------ > > *From:* ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu [mailto: > ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] *On Behalf Of *Svetlana > Stenchikova > *Sent:* Thursday, October 26, 2006 9:13 AM > *To:* Dan Bohus > *Cc:* ravenclaw-developers at cs.cmu.edu > *Subject:* [RavenclawDev 166] defining agents in multiple files > > > > Hi, > > I am trying to organize my dialog manager code by defining agents in > multiple cpp files. > > This means that I would need multiple DECLARE_AGENTS for each of the cpp > files that defines agents, right? > > Having multiple DECLARE_AGENTS does not seem to be legal. > > I am getting this error: > RavenCalendarDM error LNK2005: "public: void __thiscall > CDTTManagerAgent::CreateDialogTaskAgentome(void)" > (?CreateDialogTaskAgentome at CDTTManagerAgent@@QAEXXZ) already defined in > RavenCalendarDialogTask.obj > > > Could you please suggest if there is a way around this? (besides keeping > all agents in a single cpp file) > > thank you > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061026/d8d24878/attachment-0001.html From svetastenchikova at gmail.com Fri Oct 27 23:41:53 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Fri, 27 Oct 2006 23:41:53 -0400 Subject: [RavenclawDev 169] reopening concepts Message-ID: <31cecd6b0610272041n68ec79aes98f21f80907e2abc@mail.gmail.com> Hi, is it possible to REOPEN all concepts that are declared in the above agent without explicitly specifying each concept? I understand that REOPEN concept pushes the concept value into the history. Does it also set the status of the concept to UNAVAILABLE? In Roomline you also call ClearExplicitlyConfirmedHyp() and ClearExplicitlyDisconfirmedHyp() in ResetTask. Why not call clear() which is supposed to clear everything for the concept? thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061027/9a09bee7/attachment.html From svetastenchikova at gmail.com Sat Oct 28 01:05:59 2006 From: svetastenchikova at gmail.com (Svetlana Stenchikova) Date: Sat, 28 Oct 2006 01:05:59 -0400 Subject: [RavenclawDev 170] problems with resetting an agent Message-ID: <31cecd6b0610272205j6b261775v4b5d816d4a3876aa@mail.gmail.com> Hi, I am trying to createan agent (CIdSingleFilter defined below) which identifies a single event in a database. It asks user to specify the type, date, time criterion until only one event matches. eventlistresult is an array concept which is declared in an agency above and gets filled in by the GetEvents NoMatch, RequestClarify, AskWhich are the inform agents which get activated depending on the content of eventlistresult In order to simulate a loop I call ResetThisAgent, which calls RESET_AGENT on IdSingleFilter. If SIZE(eventlistresult)== 1, the agency successfully completes. I would expect that if SIZE(eventlistresult)!= 1, then ResetThisAgent, would place all of the subagents of IdSingleFilter back on stack and continue the loop.Instead I get an exception: *************************************************************************** [COR at 00:52:53.563] Executing dialog agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter ... [WAR at 00:52:53.566] Failure information for Agency /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/NoMatch has not completed, does not have preconditions satisfied, and is not blocked. Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/RequestClarify has completed, does have preconditions satisfied, and is not blocked. Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/AskWhich has not completed, does not have preconditions satisfied, and is not blocked. Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/QueryFilter has completed, does have preconditions satisfied, and is not blocked. Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/DBGetEvents has completed, does have preconditions satisfied, and is not blocked. Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/ResetThisAgent has completed, does have preconditions satisfied, and is not blocked. . [FATAL_ERROR at 00:52:53.566] Agency /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter failed to complete. . *************************************************************************** Can you tell if something is wrong with my logic? thank you //----------------------------------------------------------------------------- // /RavenCalendar/Task/IdSingleFilter //----------------------------------------------------------------------------- DEFINE_AGENCY( CIdSingleFilter, IS_MAIN_TOPIC() // BOOL_SYSTEM_CONCEPT(backend_error)) DEFINE_SUBAGENTS( SUBAGENT(NoMatch, CNoMatch, "") SUBAGENT(RequestClarify, CRequestClarify, "") SUBAGENT(AskWhich, CAskWhich, "") //undefined num SUBAGENT(QueryFilter, CQueryFilter, "") //agency getting concepts SUBAGENT(DBGetEvents, CDBGetEvents, "") // get the list SUBAGENT(ResetThisAgent, CResetThisAgent, "") ) SUCCEEDS_WHEN(AVAILABLE(eventlistresult) && SIZE(eventlistresult)==1) ) //--------------------------------------------------------------------------- // //-------------------------------------------------------------------- DEFINE_EXECUTE_AGENT( CResetThisAgent, RESET_AGENT(..) ) also tried //--------------------------------------------------------------------------- // //-------------------------------------------------------------------- DEFINE_EXECUTE_AGENT( CResetThisAgent, RESET_AGENT(/RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter) ) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061028/f6ac9720/attachment.html